diff --git a/sdcflows/utils/tests/test_wrangler.py b/sdcflows/utils/tests/test_wrangler.py index 7162b9e61b..40d0971952 100644 --- a/sdcflows/utils/tests/test_wrangler.py +++ b/sdcflows/utils/tests/test_wrangler.py @@ -435,12 +435,12 @@ def gen_layout(bids_dir, database_dir=None): "TotalReadoutTime": 0.5, "PhaseEncodingDirection": "j", "IntendedFor": [ - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-1_part-mag_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-1_part-phase_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-2_part-mag_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-2_part-phase_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-3_part-mag_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-3_part-phase_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-1_part-mag_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-1_part-phase_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-2_part-mag_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-2_part-phase_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-3_part-mag_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-3_part-phase_bold.nii.gz", ], }, }, @@ -455,12 +455,12 @@ def gen_layout(bids_dir, database_dir=None): "TotalReadoutTime": 0.5, "PhaseEncodingDirection": "j", "IntendedFor": [ - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-1_part-mag_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-1_part-phase_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-2_part-mag_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-2_part-phase_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-3_part-mag_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-3_part-phase_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-1_part-mag_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-1_part-phase_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-2_part-mag_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-2_part-phase_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-3_part-mag_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-3_part-phase_bold.nii.gz", ], }, }, @@ -475,12 +475,12 @@ def gen_layout(bids_dir, database_dir=None): "TotalReadoutTime": 0.5, "PhaseEncodingDirection": "j", "IntendedFor": [ - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-1_part-mag_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-1_part-phase_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-2_part-mag_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-2_part-phase_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-3_part-mag_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-3_part-phase_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-1_part-mag_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-1_part-phase_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-2_part-mag_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-2_part-phase_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-3_part-mag_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-3_part-phase_bold.nii.gz", ], }, }, @@ -495,12 +495,12 @@ def gen_layout(bids_dir, database_dir=None): "TotalReadoutTime": 0.5, "PhaseEncodingDirection": "j", "IntendedFor": [ - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-1_part-mag_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-1_part-phase_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-2_part-mag_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-2_part-phase_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-3_part-mag_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-3_part-phase_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-1_part-mag_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-1_part-phase_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-2_part-mag_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-2_part-phase_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-3_part-mag_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-3_part-phase_bold.nii.gz", ], }, }, @@ -515,12 +515,12 @@ def gen_layout(bids_dir, database_dir=None): "TotalReadoutTime": 0.5, "PhaseEncodingDirection": "j", "IntendedFor": [ - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-1_part-mag_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-1_part-phase_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-2_part-mag_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-2_part-phase_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-3_part-mag_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-3_part-phase_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-1_part-mag_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-1_part-phase_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-2_part-mag_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-2_part-phase_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-3_part-mag_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-3_part-phase_bold.nii.gz", ], }, }, @@ -535,12 +535,138 @@ def gen_layout(bids_dir, database_dir=None): "TotalReadoutTime": 0.5, "PhaseEncodingDirection": "j", "IntendedFor": [ - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-1_part-mag_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-1_part-phase_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-2_part-mag_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-2_part-phase_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-3_part-mag_bold.nii.gz", - "bids::sub-01/ses-01/func/sub-01_ses-02_task-rest_echo-3_part-phase_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-1_part-mag_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-1_part-phase_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-2_part-mag_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-2_part-phase_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-3_part-mag_bold.nii.gz", + "bids::sub-01/ses-02/func/sub-01_ses-02_task-rest_echo-3_part-phase_bold.nii.gz", + ], + }, + }, + ], + }, + { + "session": "03", + "anat": [{"suffix": "T1w", "metadata": {"EchoTime": 1}}], + "func": [ + { + "task": "rest", + "echo": "1", + "part": "mag", + "suffix": "bold", + "metadata": { + "EchoTime": 0.0142, + "RepetitionTime": 0.8, + "TotalReadoutTime": 0.5, + "PhaseEncodingDirection": "j", + "IntendedFor": [ + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-1_part-mag_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-1_part-phase_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-2_part-mag_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-2_part-phase_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-3_part-mag_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-3_part-phase_bold.nii.gz", + ], + }, + }, + { + "task": "rest", + "echo": "1", + "part": "phase", + "suffix": "bold", + "metadata": { + "EchoTime": 0.0142, + "RepetitionTime": 0.8, + "TotalReadoutTime": 0.5, + "PhaseEncodingDirection": "j", + "IntendedFor": [ + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-1_part-mag_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-1_part-phase_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-2_part-mag_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-2_part-phase_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-3_part-mag_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-3_part-phase_bold.nii.gz", + ], + }, + }, + { + "task": "rest", + "echo": "2", + "part": "mag", + "suffix": "bold", + "metadata": { + "EchoTime": 0.03893, + "RepetitionTime": 0.8, + "TotalReadoutTime": 0.5, + "PhaseEncodingDirection": "j", + "IntendedFor": [ + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-1_part-mag_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-1_part-phase_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-2_part-mag_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-2_part-phase_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-3_part-mag_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-3_part-phase_bold.nii.gz", + ], + }, + }, + { + "task": "rest", + "echo": "2", + "part": "phase", + "suffix": "bold", + "metadata": { + "EchoTime": 0.03893, + "RepetitionTime": 0.8, + "TotalReadoutTime": 0.5, + "PhaseEncodingDirection": "j", + "IntendedFor": [ + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-1_part-mag_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-1_part-phase_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-2_part-mag_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-2_part-phase_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-3_part-mag_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-3_part-phase_bold.nii.gz", + ], + }, + }, + { + "task": "rest", + "echo": "3", + "part": "mag", + "suffix": "bold", + "metadata": { + "EchoTime": 0.06366, + "RepetitionTime": 0.8, + "TotalReadoutTime": 0.5, + "PhaseEncodingDirection": "j", + "IntendedFor": [ + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-1_part-mag_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-1_part-phase_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-2_part-mag_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-2_part-phase_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-3_part-mag_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-3_part-phase_bold.nii.gz", + ], + }, + }, + { + "task": "rest", + "echo": "3", + "part": "phase", + "suffix": "bold", + "metadata": { + "EchoTime": 0.06366, + "RepetitionTime": 0.8, + "TotalReadoutTime": 0.5, + "PhaseEncodingDirection": "j", + "IntendedFor": [ + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-1_part-mag_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-1_part-phase_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-2_part-mag_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-2_part-phase_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-3_part-mag_bold.nii.gz", + "bids::sub-01/ses-03/func/sub-01_ses-03_task-rest_echo-3_part-phase_bold.nii.gz", ], }, },