sdcflows 2.5.2__tar.gz → 2.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sdcflows-2.5.2 → sdcflows-2.6.0}/.maint/MAINTAINERS.md +0 -1
- {sdcflows-2.5.2 → sdcflows-2.6.0}/.maint/PIs.md +0 -1
- {sdcflows-2.5.2 → sdcflows-2.6.0}/CHANGES.rst +24 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/Makefile +0 -1
- {sdcflows-2.5.2 → sdcflows-2.6.0}/PKG-INFO +7 -4
- {sdcflows-2.5.2 → sdcflows-2.6.0}/README.rst +1 -1
- sdcflows-2.6.0/env.yml +25 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/min-requirements.txt +2 -1
- {sdcflows-2.5.2 → sdcflows-2.6.0}/requirements.txt +2 -1
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/__init__.py +5 -6
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/_version.py +1 -1
- sdcflows-2.6.0/sdcflows/data/__init__.py +182 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/data/fmap-any_registration.json +2 -1
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/data/fmap-any_registration_testing.json +2 -1
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/fieldmaps.py +2 -2
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/interfaces/bspline.py +140 -116
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/interfaces/tests/test_bspline.py +9 -8
- sdcflows-2.6.0/sdcflows/tests/test_transform.py +358 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/test_version.py +8 -10
- sdcflows-2.6.0/sdcflows/transform.py +793 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/workflows/apply/correction.py +11 -25
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/workflows/apply/registration.py +20 -32
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/workflows/apply/tests/test_correction.py +32 -46
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/workflows/apply/tests/test_registration.py +22 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/workflows/fit/pepolar.py +10 -11
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/workflows/fit/syn.py +7 -11
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/workflows/tests/test_base.py +3 -3
- sdcflows-2.6.0/sdcflows/workflows/tests/test_integration.py +220 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows.egg-info/PKG-INFO +7 -4
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows.egg-info/SOURCES.txt +2 -1
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows.egg-info/requires.txt +4 -1
- {sdcflows-2.5.2 → sdcflows-2.6.0}/setup.cfg +5 -7
- sdcflows-2.5.2/sdcflows/tests/test_transform.py +0 -183
- sdcflows-2.5.2/sdcflows/transform.py +0 -454
- sdcflows-2.5.2/sdcflows/workflows/apply/tests/fieldcoeff.nii.gz +0 -0
- sdcflows-2.5.2/sdcflows/workflows/tests/__init__.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/.maint/CONTRIBUTORS.md +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/.maint/FORMER.md +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/.maint/ROADMAP.md +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/.maint/update_authors.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/.maint/update_requirements.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/CONTRIBUTING.md +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/LICENSE +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/MANIFEST.in +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/pyproject.toml +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/cli/__init__.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/cli/find_estimators.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/cli/tests/__init__.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/cli/tests/test_find_estimators.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/conftest.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/data/affine.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/data/flirtsch/b02b0.cnf +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/data/flirtsch/b02b0_1.cnf +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/data/flirtsch/b02b0_2.cnf +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/data/flirtsch/b02b0_4.cnf +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/data/flirtsch/b02b0_quick.cnf +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/data/fmap_atlas.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/data/fmap_atlas_2_MNI152NLin2009cAsym_affine.mat +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/data/sd_syn.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/data/sd_syn_sloppy.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/data/translation_rigid.json +0 -0
- {sdcflows-2.5.2/sdcflows/data → sdcflows-2.6.0/sdcflows/interfaces}/__init__.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/interfaces/brainmask.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/interfaces/epi.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/interfaces/fmap.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/interfaces/reportlets.py +0 -0
- {sdcflows-2.5.2/sdcflows/interfaces → sdcflows-2.6.0/sdcflows/interfaces/tests}/__init__.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/interfaces/tests/test_epi.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/interfaces/tests/test_fmap.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/interfaces/tests/test_reportlets.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/interfaces/tests/test_utils.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/interfaces/utils.py +0 -0
- {sdcflows-2.5.2/sdcflows/interfaces → sdcflows-2.6.0/sdcflows}/tests/__init__.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/dataset_description.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/anat/sub-01_FLAIR.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/anat/sub-01_T1w.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/anat/sub-01_T2w.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/dwi/sub-01_dir-AP_dwi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/dwi/sub-01_dir-AP_sbref.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/dwi/sub-01_dir-AP_sbref.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/dwi/sub-01_dir-LR_dwi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/dwi/sub-01_dir-LR_sbref.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/dwi/sub-01_dir-LR_sbref.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/dwi/sub-01_dir-PA_dwi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/dwi/sub-01_dir-PA_sbref.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/dwi/sub-01_dir-PA_sbref.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/dwi/sub-01_dir-RL_dwi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/dwi/sub-01_dir-RL_sbref.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/dwi/sub-01_dir-RL_sbref.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_acq-single_dir-PA_epi.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_acq-single_dir-PA_epi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_dir-AP_epi.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_dir-AP_epi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_dir-LR_epi.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_dir-LR_epi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_dir-PA_epi.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_dir-PA_epi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_dir-RL_epi.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_dir-RL_epi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_fieldmap.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_fieldmap.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_magnitude.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_magnitude1.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_magnitude2.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_phase1.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_phase1.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_phase2.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_phase2.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_phasediff.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/fmap/sub-01_phasediff.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/func/sub-01_task-rest_bold.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsA/sub-01/func/sub-01_task-rest_sbref.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/dataset_description.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/anat/sub-01_ses-1_FLAIR.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/anat/sub-01_ses-1_T1w.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/anat/sub-01_ses-1_T2w.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/dwi/sub-01_ses-1_dir-AP_dwi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/dwi/sub-01_ses-1_dir-AP_sbref.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/dwi/sub-01_ses-1_dir-AP_sbref.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/dwi/sub-01_ses-1_dir-LR_dwi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/dwi/sub-01_ses-1_dir-LR_sbref.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/dwi/sub-01_ses-1_dir-LR_sbref.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/dwi/sub-01_ses-1_dir-PA_dwi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/dwi/sub-01_ses-1_dir-PA_sbref.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/dwi/sub-01_ses-1_dir-PA_sbref.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/dwi/sub-01_ses-1_dir-RL_dwi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/dwi/sub-01_ses-1_dir-RL_sbref.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/dwi/sub-01_ses-1_dir-RL_sbref.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_acq-single_dir-PA_epi.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_acq-single_dir-PA_epi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_dir-AP_epi.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_dir-AP_epi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_dir-LR_epi.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_dir-LR_epi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_dir-PA_epi.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_dir-PA_epi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_dir-RL_epi.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_dir-RL_epi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_fieldmap.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_fieldmap.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_magnitude.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_magnitude1.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_magnitude2.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_phase1.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_phase1.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_phase2.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_phase2.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_phasediff.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/fmap/sub-01_ses-1_phasediff.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/func/sub-01_ses-1_task-rest_bold.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsB/sub-01/ses-1/func/sub-01_ses-1_task-rest_sbref.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/dataset_description.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/anat/sub-01_FLAIR.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/anat/sub-01_T1w.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/anat/sub-01_T2w.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/dwi/sub-01_dir-AP_dwi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/dwi/sub-01_dir-AP_sbref.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/dwi/sub-01_dir-AP_sbref.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/dwi/sub-01_dir-LR_dwi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/dwi/sub-01_dir-LR_sbref.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/dwi/sub-01_dir-LR_sbref.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/dwi/sub-01_dir-PA_dwi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/dwi/sub-01_dir-PA_sbref.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/dwi/sub-01_dir-PA_sbref.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/dwi/sub-01_dir-RL_dwi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/dwi/sub-01_dir-RL_sbref.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/dwi/sub-01_dir-RL_sbref.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_acq-single_dir-PA_epi.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_acq-single_dir-PA_epi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_dir-AP_epi.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_dir-AP_epi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_dir-LR_epi.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_dir-LR_epi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_dir-PA_epi.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_dir-PA_epi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_dir-RL_epi.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_dir-RL_epi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_fieldmap.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_fieldmap.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_magnitude.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_magnitude1.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_magnitude2.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_phase1.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_phase1.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_phase2.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_phase2.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_phasediff.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/fmap/sub-01_phasediff.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/func/sub-01_task-rest_bold.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/sub-01/func/sub-01_task-rest_sbref.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/dsC/task-rest_bold.json +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/epi.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/field-coeff-tests.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/topup-coeff-fixed.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/topup-coeff.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/data/topup-field.nii.gz +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/tests/test_fieldmaps.py +0 -0
- {sdcflows-2.5.2/sdcflows/tests → sdcflows-2.6.0/sdcflows/utils}/__init__.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/utils/bimap.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/utils/epimanip.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/utils/misc.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/utils/phasemanip.py +0 -0
- {sdcflows-2.5.2/sdcflows/utils → sdcflows-2.6.0/sdcflows/utils/tests}/__init__.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/utils/tests/test_misc.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/utils/tests/test_phasemanip.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/utils/tests/test_tools.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/utils/tests/test_wrangler.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/utils/tools.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/utils/wrangler.py +0 -0
- {sdcflows-2.5.2/sdcflows/utils/tests → sdcflows-2.6.0/sdcflows/viz}/__init__.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/viz/utils.py +0 -0
- {sdcflows-2.5.2/sdcflows/viz → sdcflows-2.6.0/sdcflows/workflows}/__init__.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/workflows/ancillary.py +0 -0
- {sdcflows-2.5.2/sdcflows/workflows → sdcflows-2.6.0/sdcflows/workflows/apply}/__init__.py +0 -0
- {sdcflows-2.5.2/sdcflows/workflows/apply → sdcflows-2.6.0/sdcflows/workflows/apply/tests}/__init__.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/workflows/base.py +0 -0
- {sdcflows-2.5.2/sdcflows/workflows/apply/tests → sdcflows-2.6.0/sdcflows/workflows/fit}/__init__.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/workflows/fit/fieldmap.py +0 -0
- {sdcflows-2.5.2/sdcflows/workflows/fit → sdcflows-2.6.0/sdcflows/workflows/fit/tests}/__init__.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/workflows/fit/tests/test_fit.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/workflows/fit/tests/test_pepolar.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/workflows/fit/tests/test_phdiff.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/workflows/fit/tests/test_syn.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/workflows/outputs.py +0 -0
- {sdcflows-2.5.2/sdcflows/workflows/fit → sdcflows-2.6.0/sdcflows/workflows}/tests/__init__.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows/workflows/tests/test_ancillary.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows.egg-info/dependency_links.txt +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows.egg-info/entry_points.txt +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows.egg-info/top_level.txt +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/sdcflows.egg-info/zip-safe +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/setup.py +0 -0
- {sdcflows-2.5.2 → sdcflows-2.6.0}/tools/cache_templateflow.py +0 -0
|
@@ -12,4 +12,3 @@ If you are participating because of your affiliation with another organization (
|
|
|
12
12
|
| Esteban | Oscar | @oesteban | 0000-0001-8435-6191 | Lausanne University Hospital and University of Lausanne, Lausanne, Switzerland |
|
|
13
13
|
| Goncalves | Mathias | @mgxd | 0000-0002-7252-7771 | Department of Psychology, Stanford University, CA, USA |
|
|
14
14
|
| Markiewicz | Christopher J. | @effigies | 0000-0002-6533-164X | Department of Psychology, Stanford University, CA, USA |
|
|
15
|
-
|
|
@@ -14,4 +14,3 @@ If you are participating because of your affiliation with another organization (
|
|
|
14
14
|
| Poldrack | Russell A. | @poldrack | 0000-0001-6755-0259 | Department of Psychology, Stanford University, CA, USA |
|
|
15
15
|
| Satterthwaite | Theodore D. | | 0000-0001-7072-9399 | Perelman School of Medicine, University of Pennsylvania, PA, USA |
|
|
16
16
|
| Gorgolewski | Krzysztof J. | @chrisgorgo | 0000-0003-3321-7583 | Google LLC |
|
|
17
|
-
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
2.6.0 (November 10, 2023)
|
|
2
|
+
=========================
|
|
3
|
+
New feature release in the 2.6.0 series.
|
|
4
|
+
|
|
5
|
+
This release resolves a number of issues with fieldmaps inducing distortions
|
|
6
|
+
during correction. Phase difference and direct fieldmaps are now masked correctly,
|
|
7
|
+
preventing the overestimation of distortions outside the brain. Additionally,
|
|
8
|
+
we now implement Jacobian weighting during unwarping, which corrects for compression
|
|
9
|
+
and expansion effects on signal intensity.
|
|
10
|
+
|
|
11
|
+
* FIX: Mask fieldmap before fitting spline field (#396)
|
|
12
|
+
* FIX: Interpolate to floating point values (#394)
|
|
13
|
+
* FIX: Refactoring the ``B0FieldTransform`` implementation (#346)
|
|
14
|
+
* FIX: Nipype workflows like to be passed absolute paths (phasediff fieldmap) (#374)
|
|
15
|
+
* ENH: Implement Jacobian weighting during unwarp (#391)
|
|
16
|
+
* ENH: Output target2fmap_xfm from coeff2epi_wf (#381)
|
|
17
|
+
* ENH: Add data loader to sdcflows.data, drop pkg_resources (#379)
|
|
18
|
+
* RF: Use scipy.interpolate.BSpline to construct spline basis (#393)
|
|
19
|
+
* DOC: Use latest sphinx to fix bad sphinx/furo interaction (#390)
|
|
20
|
+
* DOC: Fix missing dependency when merging new data loader (#380)
|
|
21
|
+
* MNT: Update emprical values in test to allow transition to new scipy's BSpline (#387)
|
|
22
|
+
* MNT: Add pre-commit config (#375)
|
|
23
|
+
* MNT: Add a seed to random generator of coefficients (#368)
|
|
24
|
+
|
|
1
25
|
2.5.2 (November 09, 2023)
|
|
2
26
|
=========================
|
|
3
27
|
Bug-fix release in the 2.5.x series.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sdcflows
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.6.0
|
|
4
4
|
Summary: Susceptibility Distortion Correction (SDC) workflows for EPI MR schemes.
|
|
5
5
|
Home-page: https://www.nipreps.org/sdcflows
|
|
6
6
|
Author: The SDCflows developers
|
|
@@ -9,22 +9,25 @@ License: Apache-2.0
|
|
|
9
9
|
Project-URL: Documentation, https://www.nipreps.org/sdcflows
|
|
10
10
|
Project-URL: GitHub, https://github.com/nipreps/sdcflows
|
|
11
11
|
Project-URL: fMRIPrep, https://fmriprep.readthedocs.io
|
|
12
|
-
Classifier: Development Status ::
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
13
|
Classifier: Intended Audience :: Science/Research
|
|
14
14
|
Classifier: Topic :: Scientific/Engineering :: Image Recognition
|
|
15
15
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.8
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
21
|
Requires-Python: >=3.8
|
|
20
22
|
Description-Content-Type: text/x-rst; charset=UTF-8
|
|
21
23
|
License-File: LICENSE
|
|
22
24
|
Requires-Dist: attrs>=20.1.0
|
|
25
|
+
Requires-Dist: importlib_resources>=5.7; python_version < "3.11"
|
|
23
26
|
Requires-Dist: nibabel>=3.1.0
|
|
24
27
|
Requires-Dist: nipype<2.0,>=1.8.5
|
|
25
28
|
Requires-Dist: traits<6.4
|
|
26
29
|
Requires-Dist: niworkflows>=1.7.0
|
|
27
|
-
Requires-Dist: nitransforms>=
|
|
30
|
+
Requires-Dist: nitransforms>=23.0.1
|
|
28
31
|
Requires-Dist: numpy>=1.21.0
|
|
29
32
|
Requires-Dist: pybids>=0.15.1
|
|
30
33
|
Requires-Dist: scikit-image>=0.18
|
|
@@ -87,7 +90,7 @@ SDCFlows
|
|
|
87
90
|
.. image:: https://github.com/nipreps/sdcflows/workflows/Deps%20&%20CI/badge.svg
|
|
88
91
|
:target: https://github.com/nipreps/sdcflows/actions
|
|
89
92
|
|
|
90
|
-
SDCFlows (*Susceptibility Distortion Correction workFlows*) is a Python library of
|
|
93
|
+
SDCFlows (*Susceptibility Distortion Correction workFlows*) is a Python library of
|
|
91
94
|
*NiPype*-based workflows to preprocess *B0* mapping data, estimate the corresponding
|
|
92
95
|
fieldmap and finally correct for susceptibility distortions.
|
|
93
96
|
Susceptibility-derived distortions are typically displayed by images acquired with EPI
|
|
@@ -13,7 +13,7 @@ SDCFlows
|
|
|
13
13
|
.. image:: https://github.com/nipreps/sdcflows/workflows/Deps%20&%20CI/badge.svg
|
|
14
14
|
:target: https://github.com/nipreps/sdcflows/actions
|
|
15
15
|
|
|
16
|
-
SDCFlows (*Susceptibility Distortion Correction workFlows*) is a Python library of
|
|
16
|
+
SDCFlows (*Susceptibility Distortion Correction workFlows*) is a Python library of
|
|
17
17
|
*NiPype*-based workflows to preprocess *B0* mapping data, estimate the corresponding
|
|
18
18
|
fieldmap and finally correct for susceptibility distortions.
|
|
19
19
|
Susceptibility-derived distortions are typically displayed by images acquired with EPI
|
sdcflows-2.6.0/env.yml
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: sdcflows
|
|
2
|
+
channels:
|
|
3
|
+
- https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/public/
|
|
4
|
+
- conda-forge
|
|
5
|
+
# Update this ~yearly; last updated April 2023
|
|
6
|
+
dependencies:
|
|
7
|
+
- python=3.10
|
|
8
|
+
# Intel Math Kernel Library for numpy
|
|
9
|
+
- mkl=2022.1
|
|
10
|
+
- mkl-service=2.4
|
|
11
|
+
# Base scientific python stack; required by FSL, so pinned here
|
|
12
|
+
- numpy=1.26
|
|
13
|
+
- scipy=1.11
|
|
14
|
+
- matplotlib=3.8
|
|
15
|
+
- pandas=2.1
|
|
16
|
+
- h5py=3.8
|
|
17
|
+
# Dependencies compiled against numpy, best to stick with conda
|
|
18
|
+
- scikit-image=0.22
|
|
19
|
+
# Utilities
|
|
20
|
+
- graphviz=6.0
|
|
21
|
+
# Workflow dependencies: ANTs
|
|
22
|
+
- ants=2.4.4
|
|
23
|
+
# Workflow dependencies: FSL (versions pinned in 6.0.6.2)
|
|
24
|
+
- fsl-fugue=2201.2
|
|
25
|
+
- fsl-topup=2203.1
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# Auto-generated by .maint/update_requirements.py
|
|
2
2
|
attrs==20.1.0
|
|
3
|
+
importlib_resources==5.7; python_version < "3.11"
|
|
3
4
|
nibabel==3.1.0
|
|
4
5
|
nipype==1.8.5
|
|
5
6
|
traits<6.4
|
|
6
7
|
niworkflows==1.7.0
|
|
7
|
-
nitransforms==
|
|
8
|
+
nitransforms==23.0.1
|
|
8
9
|
numpy==1.21.0
|
|
9
10
|
pybids==0.15.1
|
|
10
11
|
scikit-image==0.18
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# Auto-generated by .maint/update_requirements.py
|
|
2
2
|
attrs>=20.1.0
|
|
3
|
+
importlib_resources>=5.7; python_version < "3.11"
|
|
3
4
|
nibabel>=3.1.0
|
|
4
5
|
nipype<2.0,>=1.8.5
|
|
5
6
|
traits<6.4
|
|
6
7
|
niworkflows>=1.7.0
|
|
7
|
-
nitransforms>=
|
|
8
|
+
nitransforms>=23.0.1
|
|
8
9
|
numpy>=1.21.0
|
|
9
10
|
pybids>=0.15.1
|
|
10
11
|
scikit-image>=0.18
|
|
@@ -4,11 +4,10 @@ __copyright__ = "2022, The NiPreps developers"
|
|
|
4
4
|
try:
|
|
5
5
|
from ._version import __version__
|
|
6
6
|
except ModuleNotFoundError:
|
|
7
|
-
from
|
|
8
|
-
|
|
7
|
+
from importlib.metadata import version, PackageNotFoundError
|
|
9
8
|
try:
|
|
10
|
-
__version__ =
|
|
11
|
-
except
|
|
9
|
+
__version__ = version(__packagename__)
|
|
10
|
+
except PackageNotFoundError:
|
|
12
11
|
__version__ = "0+unknown"
|
|
13
|
-
del
|
|
14
|
-
del
|
|
12
|
+
del version
|
|
13
|
+
del PackageNotFoundError
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""Version file, automatically generated by setuptools_scm."""
|
|
2
|
-
__version__ = "2.
|
|
2
|
+
__version__ = "2.6.0"
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"""SDCFlows data files
|
|
2
|
+
|
|
3
|
+
.. autofunction:: load
|
|
4
|
+
|
|
5
|
+
.. automethod:: load.readable
|
|
6
|
+
|
|
7
|
+
.. automethod:: load.as_path
|
|
8
|
+
|
|
9
|
+
.. automethod:: load.cached
|
|
10
|
+
|
|
11
|
+
.. autoclass:: Loader
|
|
12
|
+
"""
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
|
|
15
|
+
import atexit
|
|
16
|
+
import os
|
|
17
|
+
from contextlib import AbstractContextManager, ExitStack
|
|
18
|
+
from functools import cached_property
|
|
19
|
+
from pathlib import Path
|
|
20
|
+
from types import ModuleType
|
|
21
|
+
from typing import Union
|
|
22
|
+
|
|
23
|
+
try:
|
|
24
|
+
from functools import cache
|
|
25
|
+
except ImportError: # PY38
|
|
26
|
+
from functools import lru_cache as cache
|
|
27
|
+
|
|
28
|
+
try: # Prefer backport to leave consistency to dependency spec
|
|
29
|
+
from importlib_resources import as_file, files
|
|
30
|
+
except ImportError:
|
|
31
|
+
from importlib.resources import as_file, files # type: ignore
|
|
32
|
+
|
|
33
|
+
try: # Prefer stdlib so Sphinx can link to authoritative documentation
|
|
34
|
+
from importlib.resources.abc import Traversable
|
|
35
|
+
except ImportError:
|
|
36
|
+
from importlib_resources.abc import Traversable
|
|
37
|
+
|
|
38
|
+
__all__ = ["load"]
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class Loader:
|
|
42
|
+
"""A loader for package files relative to a module
|
|
43
|
+
|
|
44
|
+
This class wraps :mod:`importlib.resources` to provide a getter
|
|
45
|
+
function with an interpreter-lifetime scope. For typical packages
|
|
46
|
+
it simply passes through filesystem paths as :class:`~pathlib.Path`
|
|
47
|
+
objects. For zipped distributions, it will unpack the files into
|
|
48
|
+
a temporary directory that is cleaned up on interpreter exit.
|
|
49
|
+
|
|
50
|
+
This loader accepts a fully-qualified module name or a module
|
|
51
|
+
object.
|
|
52
|
+
|
|
53
|
+
Expected usage::
|
|
54
|
+
|
|
55
|
+
'''Data package
|
|
56
|
+
|
|
57
|
+
.. autofunction:: load_data
|
|
58
|
+
|
|
59
|
+
.. automethod:: load_data.readable
|
|
60
|
+
|
|
61
|
+
.. automethod:: load_data.as_path
|
|
62
|
+
|
|
63
|
+
.. automethod:: load_data.cached
|
|
64
|
+
'''
|
|
65
|
+
|
|
66
|
+
from sdcflows.data import Loader
|
|
67
|
+
|
|
68
|
+
load_data = Loader(__package__)
|
|
69
|
+
|
|
70
|
+
:class:`~Loader` objects implement the :func:`callable` interface
|
|
71
|
+
and generate a docstring, and are intended to be treated and documented
|
|
72
|
+
as functions.
|
|
73
|
+
|
|
74
|
+
For greater flexibility and improved readability over the ``importlib.resources``
|
|
75
|
+
interface, explicit methods are provided to access resources.
|
|
76
|
+
|
|
77
|
+
+---------------+----------------+------------------+
|
|
78
|
+
| On-filesystem | Lifetime | Method |
|
|
79
|
+
+---------------+----------------+------------------+
|
|
80
|
+
| `True` | Interpreter | :meth:`cached` |
|
|
81
|
+
+---------------+----------------+------------------+
|
|
82
|
+
| `True` | `with` context | :meth:`as_path` |
|
|
83
|
+
+---------------+----------------+------------------+
|
|
84
|
+
| `False` | n/a | :meth:`readable` |
|
|
85
|
+
+---------------+----------------+------------------+
|
|
86
|
+
|
|
87
|
+
It is also possible to use ``Loader`` directly::
|
|
88
|
+
|
|
89
|
+
from sdcflows.data import Loader
|
|
90
|
+
|
|
91
|
+
Loader(other_package).readable('data/resource.ext').read_text()
|
|
92
|
+
|
|
93
|
+
with Loader(other_package).as_path('data') as pkgdata:
|
|
94
|
+
# Call function that requires full Path implementation
|
|
95
|
+
func(pkgdata)
|
|
96
|
+
|
|
97
|
+
# contrast to
|
|
98
|
+
|
|
99
|
+
from importlib_resources import files, as_file
|
|
100
|
+
|
|
101
|
+
files(other_package).joinpath('data/resource.ext').read_text()
|
|
102
|
+
|
|
103
|
+
with as_file(files(other_package) / 'data') as pkgdata:
|
|
104
|
+
func(pkgdata)
|
|
105
|
+
|
|
106
|
+
.. automethod:: readable
|
|
107
|
+
|
|
108
|
+
.. automethod:: as_path
|
|
109
|
+
|
|
110
|
+
.. automethod:: cached
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
def __init__(self, anchor: Union[str, ModuleType]):
|
|
114
|
+
self._anchor = anchor
|
|
115
|
+
self.files = files(anchor)
|
|
116
|
+
self.exit_stack = ExitStack()
|
|
117
|
+
atexit.register(self.exit_stack.close)
|
|
118
|
+
# Allow class to have a different docstring from instances
|
|
119
|
+
self.__doc__ = self._doc
|
|
120
|
+
|
|
121
|
+
@cached_property
|
|
122
|
+
def _doc(self):
|
|
123
|
+
"""Construct docstring for instances
|
|
124
|
+
|
|
125
|
+
Lists the public top-level paths inside the location, where
|
|
126
|
+
non-public means has a `.` or `_` prefix or is a 'tests'
|
|
127
|
+
directory.
|
|
128
|
+
"""
|
|
129
|
+
top_level = sorted(
|
|
130
|
+
os.path.relpath(p, self.files) + "/"[: p.is_dir()]
|
|
131
|
+
for p in self.files.iterdir()
|
|
132
|
+
if p.name[0] not in (".", "_") and p.name != "tests"
|
|
133
|
+
)
|
|
134
|
+
doclines = [
|
|
135
|
+
f"Load package files relative to ``{self._anchor}``.",
|
|
136
|
+
"",
|
|
137
|
+
"This package contains the following (top-level) files/directories:",
|
|
138
|
+
"",
|
|
139
|
+
*(f"* ``{path}``" for path in top_level),
|
|
140
|
+
]
|
|
141
|
+
|
|
142
|
+
return "\n".join(doclines)
|
|
143
|
+
|
|
144
|
+
def readable(self, *segments) -> Traversable:
|
|
145
|
+
"""Provide read access to a resource through a Path-like interface.
|
|
146
|
+
|
|
147
|
+
This file may or may not exist on the filesystem, and may be
|
|
148
|
+
efficiently used for read operations, including directory traversal.
|
|
149
|
+
|
|
150
|
+
This result is not cached or copied to the filesystem in cases where
|
|
151
|
+
that would be necessary.
|
|
152
|
+
"""
|
|
153
|
+
return self.files.joinpath(*segments)
|
|
154
|
+
|
|
155
|
+
def as_path(self, *segments) -> AbstractContextManager[Path]:
|
|
156
|
+
"""Ensure data is available as a :class:`~pathlib.Path`.
|
|
157
|
+
|
|
158
|
+
This method generates a context manager that yields a Path when
|
|
159
|
+
entered.
|
|
160
|
+
|
|
161
|
+
This result is not cached, and any temporary files that are created
|
|
162
|
+
are deleted when the context is exited.
|
|
163
|
+
"""
|
|
164
|
+
return as_file(self.files.joinpath(*segments))
|
|
165
|
+
|
|
166
|
+
@cache
|
|
167
|
+
def cached(self, *segments) -> Path:
|
|
168
|
+
"""Ensure data is available as a :class:`~pathlib.Path`.
|
|
169
|
+
|
|
170
|
+
Any temporary files that are created remain available throughout
|
|
171
|
+
the duration of the program, and are deleted when Python exits.
|
|
172
|
+
|
|
173
|
+
Results are cached so that multiple calls do not unpack the same
|
|
174
|
+
data multiple times, but the cache is sensitive to the specific
|
|
175
|
+
argument(s) passed.
|
|
176
|
+
"""
|
|
177
|
+
return self.exit_stack.enter_context(as_file(self.files.joinpath(*segments)))
|
|
178
|
+
|
|
179
|
+
__call__ = cached
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
load = Loader(__package__)
|
|
@@ -450,10 +450,10 @@ class FieldmapEstimation:
|
|
|
450
450
|
kwargs["mode"] = str(self.method).rpartition(".")[-1].lower()
|
|
451
451
|
self._wf = init_fmap_wf(**kwargs)
|
|
452
452
|
self._wf.inputs.inputnode.magnitude = [
|
|
453
|
-
str(f.path) for f in self.sources if f.suffix.startswith("magnitude")
|
|
453
|
+
str(f.path.absolute()) for f in self.sources if f.suffix.startswith("magnitude")
|
|
454
454
|
]
|
|
455
455
|
self._wf.inputs.inputnode.fieldmap = [
|
|
456
|
-
(str(f.path), f.metadata)
|
|
456
|
+
(str(f.path.absolute()), f.metadata)
|
|
457
457
|
for f in self.sources
|
|
458
458
|
if f.suffix in ("fieldmap", "phasediff", "phase2", "phase1")
|
|
459
459
|
]
|