Skip to content

Releases: darksim33/Pyneapple

v1.7.0

19 Jan 14:45

Choose a tag to compare

Release Summary: v1.5.6 → v1.7.0

Overview

This summary covers four major releases with significant enhancements to Pyneapple's capabilities, including logger implementation, TOML support, IVIM results improvements, and comprehensive IO functionality.


📦 Version 1.7.0 (Latest) - IO Update

Major Features

  • HDF5 Support (#198, #199)

    • Complete HDF5 data storage and export functionality
    • Transform ResultDicts to Arrays before HDF5 export
    • Support for 3D and 4D data structures
    • Switched from scipy.sparse to sparse library for N-D support
    • Dict import capabilities
    • Comprehensive test suite
  • NIfTI Support

    • NIfTI helper functions for medical imaging
    • Refactored results saving for NIfTI format
    • Comprehensive test suite with preparation helpers
  • NNLS Enhancements

    • Cutoff handling and peak merging
    • Improved peak handling with IVIM T1 flag
    • Comprehensive results test suite
    • Fixed variable array length issues

Improvements

  • GPU fitter model retrieval and constraint handling (#197)
  • Expanded DataExport documentation
  • Added fit_opt parameter to track fitting type (pixel/segmentation/segmented/ideal)
  • Moved JSON and TOML operations to dedicated IO module
  • Enhanced type support and hints throughout codebase

Bug Fixes

  • Default fit_opt to empty string
  • GPU fitter constraints and imports
  • NNLS model params not passed properly
  • Shape calculation issues
  • Missing logger output

📦 Version 1.6.2 - IVIM Results Patch

Key Changes

  • IVIM Results Refactoring

    • Switched from separate S0 and f extraction to unified method
    • Fixed segmented test issues
    • Improved extraction logic
  • Core Fixes

    • Additional small fraction issue resolved
    • dimstep now always returns np.ndarray
    • Parameter class invoke error fixed
    • JSON to params_file conversion issues
  • Testing & Quality

    • seg_args tests for mean calculations
    • Updated radimgarray commit
    • Removed unused methods and imports
    • Pylance compatibility improvements

Documentation

  • Updated class descriptions
  • Fixed type hints

📦 Version 1.6.1 - TOML Parameter Support

Major Feature: TOML Support (#168)

  • TOML File Format
    • Added TOML parameter file import/export
    • Renamed params.json to params.file for format flexibility
    • TOML packages added to dependencies (tomli, tomli-w, tomlkit)

Implementation Details

  • TOML test suite
  • TOML import examples
  • TOML documentation
  • Backward compatible with JSON files

Dependencies

  • tomli ^2.0.1 for Python <3.11
  • tomli-w ^1.0.0 for Python <3.11
  • tomlkit ^0.12.0 for Python >=3.11

📦 Version 1.6.0 - Logger Implementation

Major Feature: Custom Logger (#167)

  • Loguru Integration
    • Custom logger implementation using loguru
    • Replaced print statements throughout codebase
    • File output support for logs
    • Configurable log levels

Logger Features

  • Top-level logger access
  • Option to get/set log level dynamically
  • File output redirection
  • pytest integration (log level set to ERROR for tests)
  • Logger tests added

Supporting Changes

  • Added tox.ini to pyproject.toml
  • Linux GPUFit library (Ubuntu 22.04 LTS)
  • Moved tox.ini to test directory
  • kwargs passing for GPU fitter tuning
  • More realistic kidney fitting values in JSON files

Bug Fixes

  • LOG_LEVEL variable naming
  • Removed global variables
  • Stopped unwanted file output
  • Model-related issues
  • Missing segmented S0

🔄 Cross-Version Major Changes

Models Rework (#163, #171)

Implemented across v1.6.0-v1.6.2

  • Model Class Restructuring

    • Created base fit model classes
    • Moved from wrapper pattern to direct model classes
    • Added model properties to dedicated model class
    • IVIM model loader implementation
    • Mono, Bi, and Tri exponential models
    • GPU model constructor
  • Model Improvements

    • fit_reduced, fit_S0, fit_t1 properly pass values
    • Renamed reduced to fit_reduced for clarity
    • Updated NNLSCV model
    • Refactored *_comment* to *description*
    • Added S0 model options and tests
  • Segmented Fitting

    • Reworked to use two sub-parameter classes
    • Fixed component handling improved
    • Better S0 and fraction extraction
    • Unit and integration tests added

Boundary System Rework (#178, #197)

Implemented across v1.6.1-v1.7.0

  • Individual Boundaries

    • Pixel-by-pixel boundary support (btype)
    • Individual bounds for fit functions
    • GPU fit individual boundaries
    • Boundary validity checks
  • Structure Changes

    • Reworked to altered dict structure
    • Boundary order handling
    • Default btype and individual bound returns
    • Comprehensive test suite
  • Constraint Handling

    • Fixed constrain_types for individual bounds
    • Improved constraint returns
    • Better handling of missing f and D values

Parameters Import Update (#109, #184)

Implemented in v1.6.0

  • Dynamic Parameter Handling

    • Switched from static file-based to dynamic dict-based
    • Better file structure with tables/dicts
    • Model parameters from model class directly
    • Capitalized boundary keys allowed
  • File Organization

    • Moved file fixtures to _files
    • Parameter fixtures to _parameters
    • Moved parameter files from fitting to parameters directory
    • Created dynamic parameter file creator

Documentation Improvements (#191)

Implemented in v1.6.2

  • Comprehensive Documentation

    • Detailed model descriptions
    • IVIM models documentation
    • NNLS description
    • Example TOML files for different cases
    • Fit example scripts
    • Extended example descriptions
    • Fixed equation expressions
  • Examples

    • IVIM parameters file example
    • BiExp IVIM TOML
    • NNLS fitting script
    • FitData IVIM example script

T1 Fitting Fix (#190, #193)

Implemented in v1.6.2

  • Added fit_t1_steam for models
  • Tests for new T1 fitting with fixes
  • Updated documentation with T1 STEAM option
  • Removed model from Args (no longer needed)
  • T1 fit check for export

Testing Infrastructure

Continuous improvements across all versions

  • Test Coverage Expansion

    • pytest-mock and pytest-cov added
    • Fitting tests initialized
    • Boundary tests
    • GPU fitter tests
    • NNLS results tests
    • NIfTI tests
    • HDF5 tests
    • Segmented fitting tests
  • Test Organization

    • Moved fixtures to conftest
    • Refactored mocks
    • Added pytest marks (slow, gpu, ideal)
    • Improved test structure

Python Version Support

  • Added Python 3.13 support
  • Maintained support for 3.9, 3.10, 3.11, 3.12

Code Quality Improvements

Across all versions

  • Extensive type hint additions
  • Black code formatting
  • Ruff import organization
  • Removed unused imports and methods
  • Improved docstring formats
  • Better error handling
  • Pyright configuration

🐛 Notable Bug Fixes Summary

Data Handling

  • b_values handling (array vs list)
  • Shape calculations
  • Array dimension handling
  • Segmentation key handling with int keys

Fitting

  • NNLS model params passing
  • kwargs overwriting bools
  • MonoExp equation order (exp(D1)*S0)
  • fit_s0 addition to params2
  • D1 position in first fit

Results

  • NNLS results boolean parsing
  • Variable array length for NNLS
  • Fixed component handling
  • S0 and fraction extraction

Configuration

  • JSON to params_file conversion
  • TOML import issues
  • Parameter file path resolution
  • Model selection logic

📊 Statistics

  • Total Commits: 344
  • Major Versions: 4 (v1.6.0, v1.6.1, v1.6.2, v1.7.0)
  • Pull Requests: 10+ merged
  • Major Features: 4 (Logger, TOML, IVIM Patch, IO Module)
  • Major Refactorings: 3 (Models, Boundaries, Parameters)

🎯 Breaking Changes

v1.6.0

  • Changed default parameter file handling from static to dynamic
  • Model wrapper pattern replaced with direct model classes

Notes

  • Most changes maintain backward compatibility
  • Configuration file structure enhanced but old formats supported where possible

What's Changed

Full Changelog: v1.5.6...v1.7.0

v1.5.6

21 Mar 11:50

Choose a tag to compare

Added GPUfit capabilities and reworked models to look the same across CPU and GPU fitting approaches.
The fitting procedure and json parameter files were update to support new functionality. Therefore, parameter files from v1.3.1 or older are no longer supported.
The whole package structure is streamlined to better match the used fitting approaches by introducing new classes for result handling. The multi exponential wrapper was depreciated and is no longer available in favor of explizit models to match GPU fitting. (Might be reintroduced in the future.)

What's Changed

  • v1.3.3: direct fitting by @darksim33 in #148
  • v1.4.0: Added GPU fitting with pygpufit for CUDA GPUs by @darksim33 in #150
  • v1.5.0: Full GPU integration and Model rework c092bb7
  • v1.5.1: moved IDEAL to branch #156 and remove files from main branch until ideal is working properly 186a7fd
  • v1.5.2: updated doc with new fitting and parameter instructions and detail
  • v1.5.3: fix typos, conditionals and fit_model issues 94979ca
  • v1.5.4: fix s0 and fraction related issues for ivim 10d14b1
  • v1.5.5: fix: remove reorder array since all models use the same set of parameters for ivim 2748c4d
  • v1.5.6: fix: change fit_type: default is now set in the parameters file but can be overwritten during function calls 09572ea

Full Changelog: v1.3.1...v1.5.6

v1.3.1

09 Nov 20:00
4f66a4f

Choose a tag to compare

What's Changed

Full Changelog: v1.1.1...v1.3.1

Release v1.1.1

08 Oct 14:23

Choose a tag to compare

What's Changed

Full Changelog: v1.0.0...v1.1.1

Release v1.0

29 Apr 15:29

Choose a tag to compare

First Pyneapple Release for public repo.
Added main testing and ui properties.
Fitting for IVIM and NNLS is up and Running.
IDEAL is still work in progress.

v0.7.3

17 Apr 11:17

Choose a tag to compare

v0.7.3 Pre-release
Pre-release

Version with new package structure, icons and clean directory

What's Changed

New Contributors

Full Changelog: v0.7.0...v0.7.3

v0.7.0

15 Feb 13:25

Choose a tag to compare

v0.7.0 Pre-release
Pre-release

Added IDEAL support.