Changelog
Latest Changes
v0.3.33
- Fixed
Fixed
FutureWarningmessages from pandas.Set default numeric type for prior knowledge to float.
- Changed
Updated logging statements to more applicable levels (e.g. INFO to DEBUG).
Changed tight layout to constrained layout for figures with subplots in
visualization.py.Simplified OS test matrix by skipping Python 3.9, 3.11, 3.13.
Disabled preview for
HSVDinitializerintests/step2_simple.ipynbto reduce CI/CD failures.
v0.3.32
- Added
Added support for Python 3.13 and 3.14.
Modernized CI/CD workflows with reusable workflows and new triggers.
Created a legacy branch
legacy2025and labeled it asv0.3.29-legacy2025for users who need to maintain compatibility with Python 3.6 and 3.7.
- Fixed
Fixed a bug that
.vscodeis not ignored in the.gitignorefile.
- Changed
Updated minimum Python version requirement from 3.6 to 3.8 across all configuration files
Updated recommended Python version from 3.8 to 3.12.
Expanded test matrix to cover Python 3.8-3.14 on Ubuntu, Windows, and macOS.
Removed older Intel-based macOS (
macos-13) from test matrix.Changed the default python version for readthedocs from 3.8 to 3.12.
Updated documentation to reflect the new minimum and recommended Python versions, and added notes for legacy users to download the
legacy2025branch when needed.
v0.3.31
- Fixed
Fixed a bug in the web interface where non-
.txtformat FIDs were incorrectly identified as.txtfiles, causing program crashes.Fixed a bug in both the web interface and command-line script where the code attempted to access non-existent
result_sumandsimple_pdfrom the fitted result object.
v0.3.30
- Added
Added a new “Simple FID Simulation” mode to the Streamlit app
script/amaresfit_gui.py. This mode allows users to simulate FIDs using prior knowledge dataset and perturbed the parameters.
- s needed
Added
extra_line_broadeningtofid.simulate_fidto allow users to add extra line broadening to the simulated FID before adding noise. This avoid SNR bias introduced by extra global linebroadening factors.
- Fixed
Fixed a bug in the Streamlit app where editing prior knowledge (PK) would remove
#symbols from comment rows, causing file parsing to fail when the comment line appears as the first line
v0.3.29
- Added
Added a streamlit app
script/amaresfit_gui.pyto provide a graphical user interface for pyAMARES.
v0.3.28
- Fixed
Fixed a bug in CRLB calculation that caused failures when multiple fitting parameters were fixed.
Fixed logger print format typos across multiple files.
v0.3.27
- Added
Added
logger.pymodule to API documentation.Added more comprehensive
ruffchecking configurations inpyproject.toml.
- Changed
Replaced remaining
printandwarningstatements with the new logging system.Reorganized import statements across multiple files to follow best practices (alphabetical ordering, standard library imports first).
Excluded Jupyter notebooks and third-party code from
rufflinting.Updated long description in
setup.pywith proper line breaks for PEP-8 standards.
v0.3.26
- Added
Added comprehensive code formatting with
ruffas mentioned in Issue #5.Added
ruffrequirements to setup.py with dedicated install option:pip install -e ".[ruff]"Added
devdependencies in setup.py to include jupyter, documentation, and code quality tools.Added GitHub CI/CD configuration with
ruff.ymlfor automated code quality checks.Added CONTRIBUTING.rst to documentation with guidelines for contributors.
- Changed
Significantly reformatted codebase using
rufffor consistent code style.Updated documentation structure with inclusion of CONTRIBUTING.rst.
Revised README.rst with improved contributor guidelines.
Updated docs/source/index.rst to include links to contribution information.
v0.3.25
- Added
Added centralized logging system with
pyAMARES/libs/logger.pymodule for better debugging and output management.Implemented configurable log levels (DEBUG, INFO, WARNING) via
get_logger()andset_log_level()functions.Replaced print statements with proper logging in several modules (
PriorKnowledge.py,fid.py,lmfit.py,crlb.py).Added ability to control output verbosity, especially useful when processing multiple spectra in loops.
- Changed
Improved code consistency by standardizing status and warning messages across the package.
Enhanced user experience with cleaner console output and better filtering options.
- Fixed
Addressed console flooding issues when processing large batches of spectra.
Thanks to @andrewendlinger for contributing this version in PR #4.
v0.3.24
- Added
Added
testsdirectory to the package with Jupyter notebook test examples.Implemented CI/CD pipeline testing against multiple Python versions (3.7, 3.8, 3.10, and 3.12) on Ubuntu-22.04.
- Fixed
Fixed an image link in README.rst
v0.3.23
- Fixed
Fixed compatibility issues with Numpy 2.0 and Scipy 1.14.0+ and above.
Fixed a critical bug introduced in v0.3.18 where the incorrectly included
simple_dfbrokefitAMARESwhen using HSVD generated parameters.
v0.3.22
- Fixed
Fixed a bug in
initialize_FIDwhere J-coupling constants in the priori knowledge spreadsheet could not be float numbers.
v0.3.21
- Added
Added
delta_phaseparameter toinitialize_FIDfor applying additional phase offset (in degrees) to the prior knowledge phase values.Added
delta_phaseto scriptamaresfit.py
v0.3.20
- Added
Added
scale_amplitudetoinitialize_FIDto scale the amplitude of input prior knowledge dataset.Added
scale_amplitudeto scriptamaresfit.pyAdded a bool
notebooktorun_parallel_fitting_with_progressto toggle the Progress Bar for jupyter notebook.
- Fixed
Fixed an important but not critical bug where lowerbound (
lval) parameter of linewidthdkread from prior knowledge dataset byinitialize_FIDwas always ignored and set to 0 in all versions prior to v0.3.20.Fixed a critical bug introduced in v0.3.19 (commit e319a5c) that broke the function
run_parallel_fitting_with_progress.Install
hlsvdproonly whenplatform.machine()returnsx86_64oramd64.
v0.3.19
- Added
Added
remove_zero_paddingfunction to eliminate zero-filled data points that could cause incorrect SNR calculations.
v0.3.18
- Added
Added
simple_dfDataframe to thefid_parameters.
- Fixed
Fixed a typo in the equation in
what.rst.
v0.3.17
- Added
Added
objective_funcparameter tomultiprocessing.run_parallel_fitting_with_progressandmultiprocessing.fit_datasetfunctionsFixed minor typos
v0.3.16
- Added
Added
params_to_result_pd, which is the inverse function ofparams_to_result_pd.
v0.3.15
- Fixed
Fixed a critical bug where J-coupling expressions ending with
Hzwere incorrectly interpreted asppm.Fixed a critical bug that prevented correct parsing of prior knowledge when there was a space in J-coupling strings, such as “0.125 ppm” and “15 Hz”.
Loosen the bounds of chemical shift of ATP peaks in the attached example prior knowledge datasets of human brain at 7T.
Updated the
simple_tutorial.ipynbto use the new prior knowledge dataset and the new API.
v0.3.14
- Added
Added
print_lmfit_fitting_results, a function to print keylmfitfitting results from thefitting_results.out_obj.
- Fixed
Changed the version number from
0.4.0to0.3.10to better manage version increments.
v0.3.13
- Added
Added
result_pd_to_params, a function that converts fitted results from a DataFrame format into a Parameters object for use withsimulate_fid.
- Fixed
Set
normalize_fid=Falseto be turn it off forinitialize_FIDby default.
v0.3.12
- Fixed
Fixed a bug in the
sum_multipletsfunction that prevented the SNR multiplets from being added.Revised the printouts for when
initialize_with_lmis enabled.
v0.3.11
- Fixed
Updated the
result["phase"]andresult["phase_sd"]to be wrapped according to the minimum and maximum degree constraints defined in the prior knowledge dataset.
v0.3.10
- Added
Added the
initialize_with_lmoption to bothfitAMARESandrun_parallel_fitting_with_progressfunctions.Added a
highlight_dataframefunction that highlights rows in a DataFrame based on the values of a specified column.
- Fixed
Updated docstrings in numerous functions to ensure they render properly.
Add
result["phase"] = (result["phase"] + 180) % 360 - 180toreport.pyto wrap ~360 degrees to ~0Fixed a bug in
readmat.pyFix a bug that the internal initializer
initialize_with_lmalways uses the input method to initialize. Now it usesleastqsas the internal initializer.
v0.3.9
- Added
The peak-wise Signal-to-Noise Ratio (SNR) is now added to each
result_pd. The Standard Deviation (SD) of the noise is obtained from the last 10% of points in the FID.
- Fixed
Mute
__version__and__author__printouts.
v0.3.8
- Added
Add a
read_fidallfunction to read GE MNS Research Pack fidall generated MAT-files.
v0.3.7
- Fixed
Instead of try .. catch, use
def is_mat_file_v7_3(filename)to identify if a file is V-7.3
v0.3.6
- Added
The
readmrsfunction now supports any MAT-files containing either anfidordatavariable. This enhancement makes it compatible with GE fidall reconstructed MAT-files as well as Matlab formats written by jMRUI.
v0.3.5
- Fixed
Fixed a bug where, if the ppm needs to be flipped while the carrier frequency is not 0 ppm, the resulting spectrum looks wrong with a
fftshift().
v0.3.4
- Added
An argument
noise_vartoinitialize_FIDthat allows users to select CRLB estimation methods based on user-defined noise variance. By default, it employs the noise variance estimation method used by OXSA, which estimates noise from the residual. Alternatively, users can opt for jMRUI’s default method, which estimates noise from the end of the FID.
v0.3.3
- Added
Fixed the
carrierplaceholder. Ifcarrieris not 0 ppm, shift the center frequency accordingly.
v0.3.2
- Added
Updated the
generateparameterto allow a single number in the bounds region to fix a parameter. This update resolves issues with parameter bounds specification.
v0.3.1
- Added
Introduced a
read_niftiplaceholder to facilitate future support for the NIFTI file format.
This document describes all notable changes to pyAMARES.