- Fixed
- Fixed
FutureWarningmessages from pandas. - Set default numeric type for prior knowledge to float.
- Fixed
- 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.
Thanks to @bastigw for contributing this version in PR #10.
- 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.
- Fixed a bug that
- 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.
Thanks to @bastigw for contributing this version in PR #9.
- 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.
- Fixed a bug in the web interface where non-
- 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.
- Added a new "Simple FID Simulation" mode to the Streamlit app
- 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.
- Added
- 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
- Fixed a bug in the Streamlit app where editing prior knowledge (PK) would remove
- Added
- Added a streamlit app
script/amaresfit_gui.pyto provide a graphical user interface for pyAMARES.
- Added a streamlit app
- Fixed
- Fixed a bug in CRLB calculation that caused failures when multiple fitting parameters were fixed.
- Fixed logger print format typos across multiple files.
- Added
- Added
logger.pymodule to API documentation. - Added more comprehensive
ruffchecking configurations inpyproject.toml.
- Added
- 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.
- Replaced remaining
- 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.
- Added comprehensive code formatting with
- 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.
- Significantly reformatted codebase using
- 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.
- Added centralized logging system with
- 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.
- 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.
- Added
- Fixed
- Fixed an image link in README.rst
- 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.
- Fixed
- Fixed a bug in
initialize_FIDwhere J-coupling constants in the priori knowledge spreadsheet could not be float numbers.
- Fixed a bug in
- Added
- Added
delta_phaseparameter toinitialize_FIDfor applying additional phase offset (in degrees) to the prior knowledge phase values. - Added
delta_phaseto scriptamaresfit.py
- Added
- Added
- Added
scale_amplitudetoinitialize_FIDto scale the amplitude of input prior knowledge dataset. - Added
scale_amplitudeto scriptamaresfit.py - Added a bool
notebooktorun_parallel_fitting_with_progressto toggle the Progress Bar for jupyter notebook.
- Added
- 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.
- Fixed an important but not critical bug where lowerbound (
- Added
- Added
remove_zero_paddingfunction to eliminate zero-filled data points that could cause incorrect SNR calculations.
- Added
- Added
- Added
simple_dfDataframe to thefid_parameters.
- Added
- Fixed
- Fixed a typo in the equation in
what.rst.
- Fixed a typo in the equation in
- Added
- Added
objective_funcparameter tomultiprocessing.run_parallel_fitting_with_progressandmultiprocessing.fit_datasetfunctions - Fixed minor typos
- Added
- Added
- Added
params_to_result_pd, which is the inverse function ofparams_to_result_pd.
- Added
- 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.
- Fixed a critical bug where J-coupling expressions ending with
- Added
- Added
print_lmfit_fitting_results, a function to print keylmfitfitting results from thefitting_results.out_obj.
- Added
- Fixed
- Changed the version number from
0.4.0to0.3.10to better manage version increments.
- Changed the version number from
- Added
- Added
result_pd_to_params, a function that converts fitted results from a DataFrame format into a Parameters object for use withsimulate_fid.
- Added
- Fixed
- Set
normalize_fid=Falseto be turn it off forinitialize_FIDby default.
- Set
- 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.
- Fixed a bug in the
- 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.
- Updated the
- 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.
- Added the
- Fixed
- Updated docstrings in numerous functions to ensure they render properly.
- Add
result["phase"] = (result["phase"] + 180) % 360 - 180toreport.pyto wrap ~360 degrees to ~0 - Fixed a bug in
readmat.py - Fix a bug that the internal initializer
initialize_with_lmalways uses the input method to initialize. Now it usesleastqsas the internal initializer.
- 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.
- The peak-wise Signal-to-Noise Ratio (SNR) is now added to each
- Fixed
- Mute
__version__and__author__printouts.
- Mute
- Added
- Add a
read_fidallfunction to read GE MNS Research Pack fidall generated MAT-files.
- Add a
- Fixed
- Instead of try .. catch, use
def is_mat_file_v7_3(filename)to identify if a file is V-7.3
- Instead of try .. catch, use
- 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.
- The
- 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().
- 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
- 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.
- An argument
- Added
- Fixed the
carrierplaceholder. Ifcarrieris not 0 ppm, shift the center frequency accordingly.
- Fixed the
- Added
- Updated the
generateparameterto allow a single number in the bounds region to fix a parameter. This update resolves issues with parameter bounds specification.
- Updated the
- Added
- Introduced a
read_niftiplaceholder to facilitate future support for the NIFTI file format.
- Introduced a
This document describes all notable changes to pyAMARES.