Version 0.3.9
Release Date: May 30, 2026
Status: Stable release
Bruker loader refactor
epyr/sub/loadBES3T.py and epyr/sub/loadESP.py were heavy monolithic
functions (cyclomatic complexity 60 and 89, respectively). They are now
split into small private helpers covering file resolution, header parsing,
abscissa construction, and the scaling pipeline:
loadBES3T: helpers for IKKF complexity, dimensions, byte order, number format, companion-axis files, linear/non-linear abscissa, and per-channel scaling ('n','P','G','T','c').loadESP: helpers for the JSS flag, dimension resolution from the conflictingANZ/SSX/SSY/RES/REY/XPLSkeys, abscissa source selection (GST/GSI vs HCF/HSW vs XXLB/XXWI), and the power-sweep'P'scaling on the Y-axis.
Every public behavior of the loaders is preserved. The 10 example files in
examples/data/ load identically before and after the refactor.
API surface
eprload()is now fully type-annotated.epyr/__init__.pyno longer usesfrom .X import *: imports are explicit, with the public surface defined by__all__in each submodule. The names exported are unchanged from a user perspective.
Tooling
make formatnow uses Black >= 24, != 25.1.0 (pinned to avoid a grammar-table crash on initialization).mypytarget Python version bumped from 3.8 to 3.9..flake8ignoresI201(isort vs flake8-import-order disagree ontkinter); max cyclomatic complexity raised to 35 with a comment noting which functions still need to be split.flake8,mypy,isortandblackall pass cleanly on theepyr/tree (make quality-fixreturns 0).
Documentation
Public-API docstring example coverage rose from 18% to 53%. Functions enriched include
eprload, theplot_*family, the baselinemodels, thebaseline_*correction functions, the FAIR exporters (save_to_csv,save_to_json,save_to_hdf5,save_to_jpg,convert_bruker_to_fair,batch_convert_directory), and thephysicsconversion helpers.Remaining Google-style
Args:/Returns:blocks converted to NumPy format.epyr/sub/__init__.py,epyr/sub/utils.pyandepyr/eprload.pygained module docstrings.The ReST page
docs/api/epyr.constants.rstwas replaced bydocs/api/epyr.physics.rstto reflect the actual module layout.epyr.constantsremains importable as an alias forepyr.physics.constants.examples/clean/exposes five standalone end-to-end scripts covering load + plot, baseline + fitting, FFT windowing, the 2D slicer, and Rabi frequency analysis.
Repository hygiene
Stale root-level
test_*.pngandtest_epr.txtartifacts removed.epyr/.ipynb_checkpoints/(containing an oldeprplotcheckpoint) deleted..gitignoreextended for root-leveltest_*.png/test_*.txt.
No backwards-incompatible changes.