-
-
Notifications
You must be signed in to change notification settings - Fork 2
[Improvement] General revision of functions, classes and public methods documentation #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Copilot
wants to merge
194
commits into
main
Choose a base branch
from
copilot/fix-38
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
|
try again |
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (33.33%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.
🚀 New features to boost your workflow:
|
Co-authored-by: acsenrafilho <9722993+acsenrafilho@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [Improvement] General revision of functions, classes and public methods documentation
[Improvement] General revision of functions, classes and public methods documentation
Aug 1, 2025
…rove atlas URL retrieval method
…_brain_atlas function
…dling, and add methods for T1-weighted and label data collection
…prove template image handling from BrainAtlas, and enhance registration process with console status updates
…ement correction, including error handling and space normalization validation
- Created `test_multi_te_mapping.py` to test MultiTE_ASLMapping class, including methods for setting brain masks, CBF and ATT maps, and creating maps. - Implemented tests for error handling when ASLData is incomplete or when invalid parameters are provided. - Added `test_te_mapping.py` for T2Scalar_ASLMapping class, verifying initialization, error handling for missing TE and PLD values, and successful T2 map creation. - Removed the outdated `test_reconstruction.py` file to streamline test organization and improve maintainability.
…ce T2 fitting logic, and add unit tests for initialization and error scenarios
- Created `test_multi_te_mapping.py` to test MultiTE_ASLMapping class, including methods for setting brain masks, CBF and ATT maps, and creating maps. - Implemented tests for error handling when ASLData is incomplete or when invalid parameters are provided. - Added `test_te_mapping.py` for T2Scalar_ASLMapping class, verifying initialization, error handling for missing TE and PLD values, and successful T2 map creation. - Removed the outdated `test_reconstruction.py` file to streamline test organization and improve maintainability.
… T2 fitting process, and improve error handling for TE and PLD values
…ce T2 fitting logic, and add unit tests for initialization and error scenarios
- Created `test_multi_te_mapping.py` to test MultiTE_ASLMapping class, including methods for setting brain masks, CBF and ATT maps, and creating maps. - Implemented tests for error handling when ASLData is incomplete or when invalid parameters are provided. - Added `test_te_mapping.py` for T2Scalar_ASLMapping class, verifying initialization, error handling for missing TE and PLD values, and successful T2 map creation. - Removed the outdated `test_reconstruction.py` file to streamline test organization and improve maintainability.
… T2 fitting process, and improve error handling for TE and PLD values
…ce T2 fitting logic, and add unit tests for initialization and error scenarios
- Created `test_multi_te_mapping.py` to test MultiTE_ASLMapping class, including methods for setting brain masks, CBF and ATT maps, and creating maps. - Implemented tests for error handling when ASLData is incomplete or when invalid parameters are provided. - Added `test_te_mapping.py` for T2Scalar_ASLMapping class, verifying initialization, error handling for missing TE and PLD values, and successful T2 map creation. - Removed the outdated `test_reconstruction.py` file to streamline test organization and improve maintainability.
…ce T2 fitting logic, and add unit tests for initialization and error scenarios
…nd validate head movement correction output
* ENH: Add parameterized tests for ASLData input values (ld, pld, te) * ENH: Add 'AAT2022' to parameterized atlas names for testing BrainAtlas creation * ENH: Add GitHub Actions workflow for version bumping and publishing to PyPI * ENH: Add bump2version configuration for automated versioning and tagging * ENH: Remove bumpversion configuration from pyproject.toml * ENH: Add validation for bump_type input in GitHub Actions workflow * WIP: Add download_brain_atlas function to download Cucaracha models from a given URL * WIP: Implement brain normalization function for image registration using ANTsPy * ENH: Add multiple brain atlas JSON files with metadata and descriptions * ENH: Add multiple brain atlas JSON files with metadata and descriptions * ENH: Add unit tests for BrainAtlas class to validate atlas listing and URL retrieval * STY: Clean up whitespace and ensure consistent formatting in download_brain_atlas function * ENH: Remove unused kaggle_tools.py file and associated download_brain_atlas function * ENH: Refactor brain normalization function to space normalization, improve template image handling from BrainAtlas, and enhance registration process with console status updates * ENH: Implement space normalization function and head movement correction, refactor registration methods, and remove obsolete files * ENH: Refactor registration tests to improve error handling and add comprehensive tests for rigid body and space normalization functions * ENH: Add tests for error handling in setting atlas and retrieving URL and labels for known atlases * ENH: Add LGPHCC2022 brain atlas JSON file and remove obsolete LGPHCCxxxx file * ENH: Add AICHA2021 brain atlas JSON file and remove obsolete AICHAxxxx file * ENH: Add AAL32024 brain atlas JSON file and remove obsolete AAL2015 file * ENH: Add additional metadata fields to brain atlas JSON files for CAPRSC, DKA, and HA * ENH: Add JHA2005 brain atlas JSON file and remove obsolete JHAxxxx file * ENH: Add FCA7N2011 brain atlas JSON file and remove obsolete FCA7Nxxxx file * ENH: Update description in MA2012 brain atlas JSON file for clarity * ENH: Remove deprecated brain atlas JSON files and add updated versions for DKA2006, HA2003, and MA2012 * ENH: Add unit tests for BrainAtlas class functionality * ENH: Implement ASL data registration with normalization and error handling * ENH: Add tests for apply_transformation function to validate output and error handling * ENH: Refactor asl_template_registration to improve normalization process and update ASLData handling * BUG: Fix linter * WIP: Fixing asl_template_normalization to use M0 volume first * ENH: Refactor asl_template_registration to prioritize M0 image for normalization and improve atlas integration * ENH: Add tests for apply_transformation with BrainAtlas reference input handling * STY: Refactor asl_template_registration for improved readability and structure * REF: Update import paths and replace ants.image_read with load_image for atlas image loading in asl_template_registration * ENH: Add unit tests for rigid body registration and head movement correction * WIP: Implement initial structure for ASLRegistration class with pipeline comments * ENH: Improve ASL template registration by normalizing pcasl volumes and updating progress reporting * ENH: Fix linter and merge conflicts * ENH: Remove unused parameter from asl_template_registration and delete obsolete test file * WIP: Update test_space_normalization_success to use actual ASLData paths and add new test for transform type Affine * Add T2Scalar_ASLMapping to __all__ in __init__.py * Add unit tests for MultiTE and T2Scalar ASL mapping functionalities - Created `test_multi_te_mapping.py` to test MultiTE_ASLMapping class, including methods for setting brain masks, CBF and ATT maps, and creating maps. - Implemented tests for error handling when ASLData is incomplete or when invalid parameters are provided. - Added `test_te_mapping.py` for T2Scalar_ASLMapping class, verifying initialization, error handling for missing TE and PLD values, and successful T2 map creation. - Removed the outdated `test_reconstruction.py` file to streamline test organization and improve maintainability. * Remove unused import of asl_t2_scalar_multi_te from t2_mapping.py * Refactor T2Scalar_ASLMapping: improve multiprocessing handling, enhance T2 fitting logic, and add unit tests for initialization and error scenarios * DOC: Add Copilot instructions and code commit guidelines * ENH: Implement image loading test for M0 using numpy array * DOC: Update copilot instructions with detailed commit message guidelines and prefix patterns * ENH: Refactor image loading and saving in tests, add error handling for invalid image inputs * ENH: Enhance head movement correction by adding flexible reference volume selection and transformation proportion calculations * Add T2Scalar_ASLMapping to __all__ in __init__.py * Add unit tests for MultiTE and T2Scalar ASL mapping functionalities - Created `test_multi_te_mapping.py` to test MultiTE_ASLMapping class, including methods for setting brain masks, CBF and ATT maps, and creating maps. - Implemented tests for error handling when ASLData is incomplete or when invalid parameters are provided. - Added `test_te_mapping.py` for T2Scalar_ASLMapping class, verifying initialization, error handling for missing TE and PLD values, and successful T2 map creation. - Removed the outdated `test_reconstruction.py` file to streamline test organization and improve maintainability. * Refactor T2Scalar_ASLMapping: improve multiprocessing handling, enhance T2 fitting logic, and add unit tests for initialization and error scenarios * DOC: Add Copilot instructions and code commit guidelines * Add T2Scalar_ASLMapping to __all__ in __init__.py * Add unit tests for MultiTE and T2Scalar ASL mapping functionalities - Created `test_multi_te_mapping.py` to test MultiTE_ASLMapping class, including methods for setting brain masks, CBF and ATT maps, and creating maps. - Implemented tests for error handling when ASLData is incomplete or when invalid parameters are provided. - Added `test_te_mapping.py` for T2Scalar_ASLMapping class, verifying initialization, error handling for missing TE and PLD values, and successful T2 map creation. - Removed the outdated `test_reconstruction.py` file to streamline test organization and improve maintainability. * Refactor T2Scalar_ASLMapping: improve multiprocessing handling, enhance T2 fitting logic, and add unit tests for initialization and error scenarios * Add T2Scalar_ASLMapping to __all__ in __init__.py * WIP: Add T2Scalar_ASLMapping initial implementation * Add unit tests for MultiTE and T2Scalar ASL mapping functionalities - Created `test_multi_te_mapping.py` to test MultiTE_ASLMapping class, including methods for setting brain masks, CBF and ATT maps, and creating maps. - Implemented tests for error handling when ASLData is incomplete or when invalid parameters are provided. - Added `test_te_mapping.py` for T2Scalar_ASLMapping class, verifying initialization, error handling for missing TE and PLD values, and successful T2 map creation. - Removed the outdated `test_reconstruction.py` file to streamline test organization and improve maintainability. * WIP: Refactor T2Scalar_ASLMapping: streamline initialization, enhance T2 fitting process, and improve error handling for TE and PLD values * Refactor T2Scalar_ASLMapping: improve multiprocessing handling, enhance T2 fitting logic, and add unit tests for initialization and error scenarios * Add T2Scalar_ASLMapping to __all__ in __init__.py * WIP: Add T2Scalar_ASLMapping initial implementation * Add unit tests for MultiTE and T2Scalar ASL mapping functionalities - Created `test_multi_te_mapping.py` to test MultiTE_ASLMapping class, including methods for setting brain masks, CBF and ATT maps, and creating maps. - Implemented tests for error handling when ASLData is incomplete or when invalid parameters are provided. - Added `test_te_mapping.py` for T2Scalar_ASLMapping class, verifying initialization, error handling for missing TE and PLD values, and successful T2 map creation. - Removed the outdated `test_reconstruction.py` file to streamline test organization and improve maintainability. * WIP: Refactor T2Scalar_ASLMapping: streamline initialization, enhance T2 fitting process, and improve error handling for TE and PLD values * Refactor T2Scalar_ASLMapping: improve multiprocessing handling, enhance T2 fitting logic, and add unit tests for initialization and error scenarios * ENH: Implement image loading test for M0 using numpy array * ENH: Add test for creating ASLData object with PCASL as numpy array and validate head movement correction output * ENH: Implement image loading test for M0 using numpy array * ENH: Implement image loading test for M0 using numpy array * STY: Fix linter * DEL: Remove copilot instructions document * STY: Fix linter * BUG: Update ASLData initialization in space normalization test for consistency
* WIP: Add download_brain_atlas function to download Cucaracha models from a given URL * ENH: Add antspyx and kagglehub dependencies to pyproject.toml * WIP: Add Brain Atlas data structure and methods for atlas management * ENH: Create __init__.py for asltk.data package initialization * WIP: Implement brain normalization function for image registration using ANTsPy * Implement code changes to enhance functionality and improve performance * ENH: Refactor BrainAtlas class to remove hardcoded atlas data and improve atlas URL retrieval method * ENH: Add multiple brain atlas JSON files with metadata and descriptions * ENH: Add multiple brain atlas JSON files with metadata and descriptions * ENH: Add unit tests for BrainAtlas class to validate atlas listing and URL retrieval * STY: Clean up whitespace and ensure consistent formatting in download_brain_atlas function * ENH: Remove unused kaggle_tools.py file and associated download_brain_atlas function * ENH: Update MNI2009.json to include dataset URL and detailed labels for brain regions * ENH: Refactor BrainAtlas class to improve atlas loading and error handling, and add methods for T1-weighted and label data collection * ENH: Refactor brain normalization function to space normalization, improve template image handling from BrainAtlas, and enhance registration process with console status updates * ENH: Add comprehensive tests for rigid body registration and head movement correction, including error handling and space normalization validation * ENH: Add data.brain_atlas reference to documentation and include it in the navigation * ENH: Add initial test suite for registration module * ENH: Implement space normalization function and head movement correction, refactor registration methods, and remove obsolete files * ENH: Refactor registration tests to improve error handling and add comprehensive tests for rigid body and space normalization functions * ENH: Add tests for head movement correction function, including success and error cases * ENH: Add tests for error handling in setting atlas and retrieving URL and labels for known atlases * ENH: Update Python version matrix in CI workflows to include 3.11, 3.12, and 3.13 * ENH: Improve docstring for head movement correction function to clarify parameters, exceptions, and return values * ENH: Update code formatting check step in CI workflow to use 'lint_check' task * ENH: Update CI workflow to use 'lint_check' task for code formatting checks and add 'lint_check' command to taskipy * ENH: Add dataset DOI and citation DOIs to MNI2009 brain atlas JSON * ENH: Update Python version matrix in CI workflows to include 3.11, 3.12, and 3.13 * ENH: Remove Python 3.13 from version matrix in CI workflows for develop and main branches * ENH: Add workflow_dispatch trigger to CI for develop branch * ENH: Add test for ParcellationReport class to validate report generation and saving * ENH: Implement BasicReport and ParcellationReport classes for report generation * ENH: Update Python version matrix in CI workflows to only include 3.9 for develop and main branches * ENH: Add LGPHCC2022 brain atlas JSON file and remove obsolete LGPHCCxxxx file * ENH: Add AICHA2021 brain atlas JSON file and remove obsolete AICHAxxxx file * ENH: Add AAL32024 brain atlas JSON file and remove obsolete AAL2015 file * ENH: Add additional metadata fields to brain atlas JSON files for CAPRSC, DKA, and HA * ENH: Add JHA2005 brain atlas JSON file and remove obsolete JHAxxxx file * ENH: Add FCA7N2011 brain atlas JSON file and remove obsolete FCA7Nxxxx file * ENH: Update AAT2022 brain atlas JSON file with dataset URL, DOI, and detailed labels * ENH: Update HOCSA2006 brain atlas JSON file with dataset URL, DOI, and detailed labels * ENH: Update description in MA2012 brain atlas JSON file for clarity * STY: fix linter * WIP: Parcellation Report partial implementation * ENH: Remove deprecated brain atlas JSON files and add updated versions for DKA2006, HA2003, and MA2012 * STY: Fix linter * STY: Fix linter and isort * BUG: Correct JSON formatting in HOCSA2006 brain atlas file * ENH: Add unit tests for BrainAtlas class functionality * WIP: ParcellationReport tests * BUG: Update mask loading to handle numpy arrays in space_normalization function * ENH: Implement ASL data registration with normalization and error handling * WIP: Fix file path for saving regions DataFrame in ParcellationReport * ENH: Add tests for asl_template_registration function to validate input types and error handling * ENH: Implement progress bar for volume registration in asl_template_registration function * ENH: Add tests for apply_transformation function to validate output and error handling * WIP: Adjusting asl_template_registration method * ENH: Add tests for ASLData class to validate copy behavior and length calculation * ENH: Implement deep copy method for ASLData class and add length calculation for ASL data volumes * STY: Remove outdated TODO comments related to atlas resources and compatibility checks * DOC: Add Brain Parcellation Reports module and update navigation in mkdocs.yml * ENH: Add apply_transformation function to apply a list of transformations to an image * ENH: Remove console logging from space_normalization function to streamline registration process * ENH: Refactor asl_template_registration to improve normalization process and update ASLData handling * DOC: Update docstrings in BasicReport class for improved clarity and structure * BUG: Fix linter * ENH: Update lint task name to lint_check in CI workflows for consistency * BUG: Improve docstring for copy method in ASLData class for clarity * ENH: Update pre_test task to use lint_check for consistency in CI workflows * WIP: Fixing asl_template_normalization to use M0 volume first * BUG: Improve type checks in apply_transformation function for moving and reference images * ENH: Refactor asl_template_registration to prioritize M0 image for normalization and improve atlas integration * ENH: Implement tests for asl_template_registration to validate success and error cases * ENH: Add tests for apply_transformation with BrainAtlas reference input handling * BUG: Update error messages in apply_transformation tests for clarity on input requirements * WIP: commenting asl_template_registration tests for a while * STY: Refactor asl_template_registration for improved readability and structure * BUG: Fix type checking for reference_image in apply_transformation function * ENH: Add pytest-mock dependency for improved testing capabilities * ENH: Add tests for BasicReport and ASLData, including error handling and warnings * DOC: Update import path for load_image and save_image functions in getting_started.md * STY: Refactor import paths for load_image and save_image functions; remove unused utils.py * ENH: Implement load_image and save_image functions for BIDS directory handling; add ASL data serialization methods * STY: Update import path for collect_data_volumes in gaussian.py * STY: Add TODO comments for fixing T1 data loading and adjusting Kaggle datasets for 2mm resolution * REF: Update import paths and replace ants.image_read with load_image for atlas image loading in asl_template_registration * WIP: New modules to image orientation validation * ENH: Add unit tests for rigid body registration and head movement correction * STY: Remove commented-out test placeholder for brain mask dimension check * WIP: Implement initial structure for ASLRegistration class with pipeline comments * DOC: Add initial Copilot instructions for ASL toolkit usage and guidelines * ENH: Add VSCode settings for Python testing configuration and commit message guidelines * ENH: Improve ASL template registration by normalizing pcasl volumes and updating progress reporting * ENH: Fix linter and merge conflicts * ENH: Simplify workflow names for CI configurations * BUG: Update lint check task name in CI workflows for consistency * BUG: Update assertion in test_basic_report_generate_report_abstract_method to check for TypeError * ENH: Remove unused parameter from asl_template_registration and delete obsolete test file * ENH: Remove unused ASLRegistration class and add tests for head movement correction functionality * ENH: Refactor space_normalization function by removing unused parameters and comments, and improving parameter handling * DOC: Improve ASLData constructor documentation for clarity and detail * ENH: Improve image resizing logic and optimize orientation analysis for better performance * WIP: Update test_space_normalization_success to use actual ASLData paths and add new test for transform type Affine * BUG: Fix M0 image loading to support both file paths and numpy arrays * ENH: Implement image loading test for M0 using numpy array * ENH: Add test for creating ASLData object with PCASL as numpy array and validate head movement correction output * DOC: Improve head movement correction function with detailed docstring and update ASLData object * BUG: Support loading ASL image from numpy array in ASLData initialization * ENH: Add new test files for image manipulation and statistics, including various test cases for ASL model functions and image loading/saving functionalities * ENH: Implement calculate_snr and analyze_image_properties functions for medical image analysis, including SNR calculation and image property assessment * ENH: Refactor image property analysis by removing redundant function and integrating analyze_image_properties for improved clarity and efficiency * REF: Refactor smoothing functionality by moving it to aux_methods.py and updating tests * REF: Update smoothing function references in CBF, MultiDW, and MultiTE mapping files * Add T2Scalar_ASLMapping to __all__ in __init__.py * WIP: Add T2Scalar_ASLMapping initial implementation * Add unit tests for MultiTE and T2Scalar ASL mapping functionalities - Created `test_multi_te_mapping.py` to test MultiTE_ASLMapping class, including methods for setting brain masks, CBF and ATT maps, and creating maps. - Implemented tests for error handling when ASLData is incomplete or when invalid parameters are provided. - Added `test_te_mapping.py` for T2Scalar_ASLMapping class, verifying initialization, error handling for missing TE and PLD values, and successful T2 map creation. - Removed the outdated `test_reconstruction.py` file to streamline test organization and improve maintainability. * WIP: Refactor T2Scalar_ASLMapping: streamline initialization, enhance T2 fitting process, and improve error handling for TE and PLD values * Remove unused import of asl_t2_scalar_multi_te from t2_mapping.py * Refactor T2Scalar_ASLMapping: improve multiprocessing handling, enhance T2 fitting logic, and add unit tests for initialization and error scenarios * TEST: Add tests for handling DW values in ASL data, T2 map retrieval, and brain mask functionality * TEST: Add median smoothing tests with default parameters, different sizes, and invalid inputs * ENH: Refactor T2Scalar_ASLMapping: enhance error handling for TE/PLD values, add logging for T2 map creation process, and restore multiprocessing functions * STY: Remove commented TODO regarding LD/PLD size check in CBFMapping.create_map method * ENH: Add validation for smoothing_params in _apply_smoothing_to_maps function * DOC: Add Copilot instructions and code commit guidelines * DOC: Improve documentation for T2Scalar_ASLMapping class and load_image function * ENH: Add T2 Scalar Mapping script with argument parsing and processing logic * ENH: Add T2 Scalar Mapping script documentation and update navigation in mkdocs * ENH: Add script entries for ASLTK command line tools in pyproject.toml * ENH: Update command usage in documentation and script help for clarity * BUG: Fix M0 image loading to support both file paths and numpy arrays * ENH: Implement image loading test for M0 using numpy array * ENH: Add test for creating ASLData object with PCASL as numpy array and validate head movement correction output * BUG: Support loading ASL image from numpy array in ASLData initialization * ENH: Improve SNR and mean intensity calculations with ROI support and error handling * ENH: Add tests for calculate_mean_intensity and improve calculate_snr tests with ROI support * ENH: Add reference volume selection functionality with SNR and mean intensity methods * DOC: Update copilot instructions with detailed commit message guidelines and prefix patterns * ENH: Rename parameter 'transformation_matrix' to 'transforms' in apply_transformation function for clarity * ENH: Improve ASLData class by adding warnings for 4D M0 images and averaging functionality for M0 images * ENH: Refactor image loading and saving in tests, add error handling for invalid image inputs * ENH: Enhance head movement correction by adding flexible reference volume selection and transformation proportion calculations * ENH: Add select_reference_volume function and corresponding tests for reference volume selection * ENH: Update error message for invalid reference volume and add validation check in head movement correction tests * STY: Update import statement for load_image to correct module path * STY: Update import statement for load_image to correct module path * STY: Update import statement for load_image to correct module path * Add T2Scalar_ASLMapping to __all__ in __init__.py * Add unit tests for MultiTE and T2Scalar ASL mapping functionalities - Created `test_multi_te_mapping.py` to test MultiTE_ASLMapping class, including methods for setting brain masks, CBF and ATT maps, and creating maps. - Implemented tests for error handling when ASLData is incomplete or when invalid parameters are provided. - Added `test_te_mapping.py` for T2Scalar_ASLMapping class, verifying initialization, error handling for missing TE and PLD values, and successful T2 map creation. - Removed the outdated `test_reconstruction.py` file to streamline test organization and improve maintainability. * Refactor T2Scalar_ASLMapping: improve multiprocessing handling, enhance T2 fitting logic, and add unit tests for initialization and error scenarios * DOC: Add Copilot instructions and code commit guidelines * ENH: Bumpversion v0.5.0 * Add T2Scalar_ASLMapping to __all__ in __init__.py * Add unit tests for MultiTE and T2Scalar ASL mapping functionalities - Created `test_multi_te_mapping.py` to test MultiTE_ASLMapping class, including methods for setting brain masks, CBF and ATT maps, and creating maps. - Implemented tests for error handling when ASLData is incomplete or when invalid parameters are provided. - Added `test_te_mapping.py` for T2Scalar_ASLMapping class, verifying initialization, error handling for missing TE and PLD values, and successful T2 map creation. - Removed the outdated `test_reconstruction.py` file to streamline test organization and improve maintainability. * Refactor T2Scalar_ASLMapping: improve multiprocessing handling, enhance T2 fitting logic, and add unit tests for initialization and error scenarios * Add T2Scalar_ASLMapping to __all__ in __init__.py * WIP: Add T2Scalar_ASLMapping initial implementation * Add unit tests for MultiTE and T2Scalar ASL mapping functionalities - Created `test_multi_te_mapping.py` to test MultiTE_ASLMapping class, including methods for setting brain masks, CBF and ATT maps, and creating maps. - Implemented tests for error handling when ASLData is incomplete or when invalid parameters are provided. - Added `test_te_mapping.py` for T2Scalar_ASLMapping class, verifying initialization, error handling for missing TE and PLD values, and successful T2 map creation. - Removed the outdated `test_reconstruction.py` file to streamline test organization and improve maintainability. * WIP: Refactor T2Scalar_ASLMapping: streamline initialization, enhance T2 fitting process, and improve error handling for TE and PLD values * Refactor T2Scalar_ASLMapping: improve multiprocessing handling, enhance T2 fitting logic, and add unit tests for initialization and error scenarios * Add T2Scalar_ASLMapping to __all__ in __init__.py * WIP: Add T2Scalar_ASLMapping initial implementation * Add unit tests for MultiTE and T2Scalar ASL mapping functionalities - Created `test_multi_te_mapping.py` to test MultiTE_ASLMapping class, including methods for setting brain masks, CBF and ATT maps, and creating maps. - Implemented tests for error handling when ASLData is incomplete or when invalid parameters are provided. - Added `test_te_mapping.py` for T2Scalar_ASLMapping class, verifying initialization, error handling for missing TE and PLD values, and successful T2 map creation. - Removed the outdated `test_reconstruction.py` file to streamline test organization and improve maintainability. * WIP: Refactor T2Scalar_ASLMapping: streamline initialization, enhance T2 fitting process, and improve error handling for TE and PLD values * Refactor T2Scalar_ASLMapping: improve multiprocessing handling, enhance T2 fitting logic, and add unit tests for initialization and error scenarios * ENH: Implement image loading test for M0 using numpy array * ENH: Add test for creating ASLData object with PCASL as numpy array and validate head movement correction output * ENH: Implement image loading test for M0 using numpy array * ENH: Implement image loading test for M0 using numpy array * STY: Fix linter * STY: Remove unused import of load_image from asltk.utils * DEL: Remove copilot instructions document * STY: Comment out unused imports and class definitions in report modules and tests
* ENH: Add parameterized tests for ASLData input values (ld, pld, te) * ENH: Add 'AAT2022' to parameterized atlas names for testing BrainAtlas creation * ENH: Add GitHub Actions workflow for version bumping and publishing to PyPI * ENH: Add bump2version configuration for automated versioning and tagging * ENH: Remove bumpversion configuration from pyproject.toml * ENH: Add validation for bump_type input in GitHub Actions workflow * WIP: Add download_brain_atlas function to download Cucaracha models from a given URL * WIP: Implement brain normalization function for image registration using ANTsPy * ENH: Add multiple brain atlas JSON files with metadata and descriptions * ENH: Add multiple brain atlas JSON files with metadata and descriptions * ENH: Add unit tests for BrainAtlas class to validate atlas listing and URL retrieval * STY: Clean up whitespace and ensure consistent formatting in download_brain_atlas function * ENH: Remove unused kaggle_tools.py file and associated download_brain_atlas function * ENH: Refactor brain normalization function to space normalization, improve template image handling from BrainAtlas, and enhance registration process with console status updates * ENH: Implement space normalization function and head movement correction, refactor registration methods, and remove obsolete files * ENH: Refactor registration tests to improve error handling and add comprehensive tests for rigid body and space normalization functions * ENH: Add tests for error handling in setting atlas and retrieving URL and labels for known atlases * ENH: Add LGPHCC2022 brain atlas JSON file and remove obsolete LGPHCCxxxx file * ENH: Add AICHA2021 brain atlas JSON file and remove obsolete AICHAxxxx file * ENH: Add AAL32024 brain atlas JSON file and remove obsolete AAL2015 file * ENH: Add additional metadata fields to brain atlas JSON files for CAPRSC, DKA, and HA * ENH: Add JHA2005 brain atlas JSON file and remove obsolete JHAxxxx file * ENH: Add FCA7N2011 brain atlas JSON file and remove obsolete FCA7Nxxxx file * ENH: Update description in MA2012 brain atlas JSON file for clarity * ENH: Remove deprecated brain atlas JSON files and add updated versions for DKA2006, HA2003, and MA2012 * ENH: Add unit tests for BrainAtlas class functionality * ENH: Implement ASL data registration with normalization and error handling * ENH: Add tests for apply_transformation function to validate output and error handling * ENH: Refactor asl_template_registration to improve normalization process and update ASLData handling * BUG: Fix linter * WIP: Fixing asl_template_normalization to use M0 volume first * ENH: Refactor asl_template_registration to prioritize M0 image for normalization and improve atlas integration * ENH: Add tests for apply_transformation with BrainAtlas reference input handling * STY: Refactor asl_template_registration for improved readability and structure * REF: Update import paths and replace ants.image_read with load_image for atlas image loading in asl_template_registration * ENH: Add unit tests for rigid body registration and head movement correction * WIP: Implement initial structure for ASLRegistration class with pipeline comments * ENH: Improve ASL template registration by normalizing pcasl volumes and updating progress reporting * ENH: Fix linter and merge conflicts * ENH: Remove unused parameter from asl_template_registration and delete obsolete test file * WIP: Update test_space_normalization_success to use actual ASLData paths and add new test for transform type Affine * Add T2Scalar_ASLMapping to __all__ in __init__.py * Add unit tests for MultiTE and T2Scalar ASL mapping functionalities - Created `test_multi_te_mapping.py` to test MultiTE_ASLMapping class, including methods for setting brain masks, CBF and ATT maps, and creating maps. - Implemented tests for error handling when ASLData is incomplete or when invalid parameters are provided. - Added `test_te_mapping.py` for T2Scalar_ASLMapping class, verifying initialization, error handling for missing TE and PLD values, and successful T2 map creation. - Removed the outdated `test_reconstruction.py` file to streamline test organization and improve maintainability. * Remove unused import of asl_t2_scalar_multi_te from t2_mapping.py * Refactor T2Scalar_ASLMapping: improve multiprocessing handling, enhance T2 fitting logic, and add unit tests for initialization and error scenarios * DOC: Add Copilot instructions and code commit guidelines * ENH: Implement image loading test for M0 using numpy array * DOC: Update copilot instructions with detailed commit message guidelines and prefix patterns * ENH: Refactor image loading and saving in tests, add error handling for invalid image inputs * ENH: Enhance head movement correction by adding flexible reference volume selection and transformation proportion calculations * Add T2Scalar_ASLMapping to __all__ in __init__.py * Add unit tests for MultiTE and T2Scalar ASL mapping functionalities - Created `test_multi_te_mapping.py` to test MultiTE_ASLMapping class, including methods for setting brain masks, CBF and ATT maps, and creating maps. - Implemented tests for error handling when ASLData is incomplete or when invalid parameters are provided. - Added `test_te_mapping.py` for T2Scalar_ASLMapping class, verifying initialization, error handling for missing TE and PLD values, and successful T2 map creation. - Removed the outdated `test_reconstruction.py` file to streamline test organization and improve maintainability. * Refactor T2Scalar_ASLMapping: improve multiprocessing handling, enhance T2 fitting logic, and add unit tests for initialization and error scenarios * DOC: Add Copilot instructions and code commit guidelines * Add T2Scalar_ASLMapping to __all__ in __init__.py * Add unit tests for MultiTE and T2Scalar ASL mapping functionalities - Created `test_multi_te_mapping.py` to test MultiTE_ASLMapping class, including methods for setting brain masks, CBF and ATT maps, and creating maps. - Implemented tests for error handling when ASLData is incomplete or when invalid parameters are provided. - Added `test_te_mapping.py` for T2Scalar_ASLMapping class, verifying initialization, error handling for missing TE and PLD values, and successful T2 map creation. - Removed the outdated `test_reconstruction.py` file to streamline test organization and improve maintainability. * Refactor T2Scalar_ASLMapping: improve multiprocessing handling, enhance T2 fitting logic, and add unit tests for initialization and error scenarios * Add T2Scalar_ASLMapping to __all__ in __init__.py * WIP: Add T2Scalar_ASLMapping initial implementation * Add unit tests for MultiTE and T2Scalar ASL mapping functionalities - Created `test_multi_te_mapping.py` to test MultiTE_ASLMapping class, including methods for setting brain masks, CBF and ATT maps, and creating maps. - Implemented tests for error handling when ASLData is incomplete or when invalid parameters are provided. - Added `test_te_mapping.py` for T2Scalar_ASLMapping class, verifying initialization, error handling for missing TE and PLD values, and successful T2 map creation. - Removed the outdated `test_reconstruction.py` file to streamline test organization and improve maintainability. * WIP: Refactor T2Scalar_ASLMapping: streamline initialization, enhance T2 fitting process, and improve error handling for TE and PLD values * Refactor T2Scalar_ASLMapping: improve multiprocessing handling, enhance T2 fitting logic, and add unit tests for initialization and error scenarios * Add T2Scalar_ASLMapping to __all__ in __init__.py * WIP: Add T2Scalar_ASLMapping initial implementation * Add unit tests for MultiTE and T2Scalar ASL mapping functionalities - Created `test_multi_te_mapping.py` to test MultiTE_ASLMapping class, including methods for setting brain masks, CBF and ATT maps, and creating maps. - Implemented tests for error handling when ASLData is incomplete or when invalid parameters are provided. - Added `test_te_mapping.py` for T2Scalar_ASLMapping class, verifying initialization, error handling for missing TE and PLD values, and successful T2 map creation. - Removed the outdated `test_reconstruction.py` file to streamline test organization and improve maintainability. * WIP: Refactor T2Scalar_ASLMapping: streamline initialization, enhance T2 fitting process, and improve error handling for TE and PLD values * Refactor T2Scalar_ASLMapping: improve multiprocessing handling, enhance T2 fitting logic, and add unit tests for initialization and error scenarios * ENH: Implement image loading test for M0 using numpy array * ENH: Add test for creating ASLData object with PCASL as numpy array and validate head movement correction output * ENH: Implement image loading test for M0 using numpy array * ENH: Implement image loading test for M0 using numpy array * STY: Fix linter * DEL: Remove copilot instructions document * STY: Fix linter * BUG: Update ASLData initialization in space normalization test for consistency
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses issue #38 by conducting a comprehensive review and improvement of documentation across all functions, classes, and public methods in the
asltkpackage. The review identified and fixed several documentation gaps, typos, and inconsistencies that had accumulated during recent development.Key Documentation Improvements
Missing Docstrings Added
_check_mask_valuesinaux_methods.py: Added comprehensive documentation explaining validation logic for brain mask processingasl_model_multi_dwinmodels/signal_dynamic.py: Added detailed docstring with mathematical model description and parameter explanationsutils.py: Added docstrings for_check_input_path,_get_file_from_folder_layout, and_make_bids_pathGrammar and Spelling Corrections
ASLDataconstructor documentationParameter Documentation Enhancements
iterationsandconverge_mininrigid_body_registrationExamples and Usage Clarification
Quality Assurance
blueandisortThis comprehensive documentation review ensures that all public interfaces are properly documented and that the documentation accurately describes the current implementation, addressing the concerns raised in issue #38 about potential documentation drift during recent development.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.