TL;DR — Full version history for Pyneapple. Each entry covers Added, Changed, Fixed, and Removed changes per release. Versions v1.6.0–v1.6.2 are intermediate releases between the v1.5.6 and v1.7.0 tags. Pre-releases (v0.6.0–v0.7.3) are noted as such.
FitResultpublic container and internal_PixelFitResultdataclass introduced insrc/pyneapple/result.py; all fitters now populateresults_with aFitResultafter fitting andFitResultis exported from the top-levelpyneapplepackage
- Minimum supported Python version lowered from 3.12 to 3.9
tomli>=2.0added as a conditional dependency (python_version < "3.11") to backport the stdlibtomllibmodule- Ruff
target-versionupdated topy39; Blacktarget-versionextended to cover py39–py312 IDEALFitter.step_toltype changed fromlist[float]/np.ndarraytodict[str, float]keyed bymodel.param_names, consistent with howp0andboundsare specified; TOML configs update from a flat list to a[Fitting.ideal.step_tol]sub-tablenumpy,scipy, andnibabeldependencies split into Python-version-specific ranges (<3.10,>=3.10,<3.11,>=3.11) to ensure compatible versions are resolved across all supported Python releases
import tomllibinsrc/pyneapple/io/toml.pyreplaced with atry/except ImportErrorshim that falls back totomlion Python < 3.11isinstance(value, h5py.Group | h5py.Dataset)insrc/pyneapple/io/hdf5.pyreplaced with the tuple formisinstance(value, (h5py.Group, h5py.Dataset))— runtime|union inisinstance()requires Python 3.10+- Missing
from __future__ import annotationsadded tosrc/pyneapple/fitters/ideal.py— without it,X | Yunion annotations in function signatures were evaluated at class definition time and raisedTypeErroron Python 3.9 ConstrainedCurveFitSolver:fraction_constraint=Truenow correctly raisesValueErrorwhenfit_reduced=False(full-mode signals are not normalised, so the hard constraintsum(f_i) <= 1is not physically meaningful) and works as intended withfit_reduced=Trueorfit_s0=True(normalised / amplitude-scaled reduced models)IDEALFitter: cubic-interpolated parameter maps are now clamped to global solver bounds before step-wise bounds are derived, preventing out-of-range initial guesses caused by interpolation overshootIDEALFitter: a warning is now logged and all voxels are fitted when no voxels survive the segmentation threshold at a coarse IDEAL step, preventing a silent collapse of the multi-resolution chainIDEALFitter._validate_step_tol()now raises aValueErrorwhose message contains "step_tol" when the dict keys do not matchmodel.param_namesconfigure_logging()no longer attaches a console sink by default; a sink is only added when explicitly requested, preventing duplicate log outputCurveFitSolver: passingn_pools=Nonein multi-threading configuration no longer raises an error
SegmentedFitterwas missing frompyneapple.fitters.__init__— it is now properly exported and available asfrom pyneapple.fitters import SegmentedFitter
⚠️ Major breaking changes — This release restructures the entire codebase to follow scikit-learn conventions. See release_draft.md for comprehensive migration guide.
- scikit-learn Style Architecture: Modular structure with
Models,Solvers, andFittersfollowing sklearn estimator patterns - Models: Stateless, pure math forward model functions (
forward,jacobian,residual) —MonoExpModel,BiExpModel,TriExpModel,NNLSModel - Solvers: Curve fitting backends —
CurveFitSolver,NNLSSolver,ConstrainedCurveFitSolver - Fitters: High-level fitting orchestrators —
PixelWiseFitter,SegmentationWiseFitter,IDEALFitter,SegmentedFitter - Registry-based plugin discovery via entry points for models, solvers, and fitters
pyneapple.iomodule: New I/O utilities for NIfTI, b-values, TOML configs, Excel, and HDF5pyneapple.utilitymodule: New utilities for spectrum processing, plotting, and validation- New CLI tools:
pyneapple pixelwise,pyneapple segmented,pyneapple ideal,pyneapple segmentationwise - Optional dependencies support:
pip install pyneapple[excel,plotting,export] - New TOML config format with
[Fitting]section replacing old[General]withClassfield - SegmentedFitter for two-step model fitting workflow
- NIfTI export with
reconstruct_mapsandsave_spectrum_to_nifti - Excel export with
save_params_to_excelandsave_spectrum_to_excel - HDF5 export with gzip compression
- TOML config format redesigned: Removed
Classfield, restructured under[Fitting]section - CLI interface redesign:
pyneapple pixelwise/segmented/ideal/segmentationwisereplacespyneapple-fitdata - Model naming unified:
BiExpFitModel→BiExpModel,MonoExpFitModel→MonoExpModel, etc. - Logging API:
configure_logging()frompyneapplereplacesfrom pyneapple.utils import logger - Moved from
poetrytouvfor package management
pyneapple/parameters/module entirely:Parameters,IVIMParams,IVIMSegmentedParams,NNLSParams,NNLSCVParams,IDEALParams,BaseBoundaryDictpyneapple/results/module entirely:Results,IVIMResults,IVIMSegmentedResults,NNLSResults,ResultDictpyneapple/fitting/module entirely:FitDataand all fitting functionspyneapple/utils/module entirely:logger,plotting,processingradimgarraysubmodule:RadImgArray,SegImgArrayno longer availablepygpufitmodule: Moved to separate package- JSON/TOML parameter files: All files in
examples/parameters/replaced with new format - Example scripts:
ivim_fitdata_script.py,nnls_fitdata_script.py - Old fitting modes:
fit_pixel_wise(),fit_segmentation_wise(),fit_ivim_segmented(),fit_ideal()
- Various import path corrections and cleanup
- HDF5 data storage and export (3D/4D support, dict import,
sparselibrary for N-D arrays) (#198, #199) - NIfTI helper functions and refactored results saving for NIfTI format
- Dedicated IO module consolidating JSON, TOML, NIfTI, and HDF5 operations
fit_optparameter to track fitting type (pixelwise / segmentation / segmented / ideal)- NNLS peak merging and cutoff handling
- Comprehensive test suites for HDF5, NIfTI, and IO integration
- Switched from
scipy.sparsetosparselibrary for N-D array support - GPU fitter model retrieval and constraint handling improved (#197)
DataExportdocumentation expanded
fit_optdefaulting to empty string- GPU fitter constraints and import errors
- NNLS model params not passed properly
- Shape calculation issues
- Missing logger output
fit_t1_steamoption for T1 STEAM correction (#193)- Example TOML files for BiExp IVIM and NNLS fitting
- Fit example scripts and extended example descriptions
- T1 fit check during results export
- IVIM results refactored: unified S0 and fraction extraction method
dimstepnow always returnsnp.ndarray- Class descriptions and type hints updated throughout
- Segmented test issues after IVIM results rework
- Additional small-fraction extraction edge case
- Parameter class invoke error
- JSON-to-
params_fileconversion issues
- TOML parameter file import and export (#168)
- TOML test suite and import examples
- TOML documentation
- Dependencies:
tomli,tomli-w,tomlkit
params.jsonrenamed toparams.fileto support multiple formats- Backward compatible with existing JSON parameter files
- Custom loguru-based logger (#167)
- Configurable log levels; file output support
- Logger tests; log level set to
ERRORfor pytest runs - Linux GPUFit library (Ubuntu 22.04 LTS)
- Model class restructuring: base fit model classes, explicit mono/bi/tri-exponential models, GPU model constructor (#171)
- Dynamic dict-based parameter handling replacing static file loading (#184)
- Replaced
printstatements throughout codebase with loguru calls reducedrenamed tofit_reduced;fit_s0andfit_t1properly propagated- Model wrapper pattern replaced with direct model classes
- Moved parameter file fixtures from
fitting/toparameters/ *_comment*attributes renamed to*description*tox.inimoved intopyproject.toml
LOG_LEVELvariable naming- Removed unwanted global variables and file output side effects
- Missing segmented S0 value
kwargsoverwriting boolean settings
- Full GPUfit integration for CUDA GPU fitting
- Explicit mono-, bi-, and tri-exponential models (replaces multi-exponential wrapper)
- New result classes for structured IVIM and NNLS output
- Individual pixel-by-pixel boundary support (
btype) (#197) - pytest-mock and pytest-cov; fitting, boundary, and GPU fitter test suites
- Python 3.13 support
- Model wrapper deprecated in favor of explicit model classes
- Parameter files restructured; files from v1.3.1 or older are no longer supported
- Segmented fitting reworked with two sub-parameter classes
- Boundary system reworked to altered dict structure with order handling
- MonoExp equation order (
exp(D1) * S0) fit_s0addition toparams2D1position in first segmented fit pass- NNLS results boolean parsing and variable array length
- Removed IVIM parameter reorder array — all models now use the same parameter set
- S0 and fraction extraction issues for IVIM fitting
- Typos, broken conditionals, and
fit_modelselection issues
- IDEAL fitting moved to a separate branch; IDEAL files removed from
mainuntil stable (#156)
- Full GPU integration for all supported model types
kwargspassing for GPU fitter tuning
- Fitting models reworked to share a unified interface across CPU and GPU backends (#158)
- GPU fitting via
pygpufitfor CUDA-capable GPUs (#150)
RadImgArrayimplementation for image array handling (#145)
- UI components extracted from the fitting library
- Load b-values option via context menu (#131)
- IVIM fixed parameters support (#136)
- Python 3.9 support (#138)
- Save results bug (#127)
First public release.
- Pixel-wise and segmentation-wise IVIM fitting (mono-, bi-, tri-exponential models)
- NNLS spectral fitting
- JSON parameter file support
- Core test suite
- Basic UI (subsequently removed in v1.3.1)
- IDEAL fitting shipped as work-in-progress
- New package structure with icons and cleaned directory layout
- NNLS and NNLS-regularised parameter unification (#88)
- File dialog memory (
last_dirproperty) (#96)
reg = 0fitting edge case (#59)- Fit area selection (#64)
- Zero-padding (#89)
- IDEAL fitting fixes (#85)
- Various UI and import cleanup (#67, #97)
- Initial IDEAL fitting support
Minor patch. No release notes available.
Initial pre-release. No release notes available.