Summary of what happened:
I am using fmriprep 25.2.2 to process a longitudinal functional MRI dataset with annual MRI sessions. I am specifically using fmriprep v25.2.2 for the “–subject-anatomical-reference sessionwise” flag, as some of these participants had neurosurgery after their first MRI session.
For this project, MRI data was reviewed for quality after each session: participants returned within a week to repeat “bad” scans (and only “bad” scans; good scans were not repeated). So if a participant returned to repeat only a T1w image, their bids directory will look like this:
sub-001/
|–ses-01/
| |–func/
| |–sub-001_ses-01_bold.nii
|–ses-01-repeat/
| |–anat/
| |–sub-001_ses-01-repeat_T1w.nii
|–ses-02/
|–anat/
| |–sub-001_ses-02_T1w.nii
|–func/
|–sub-001_ses-02_bold.nii
For these participants, how can I instruct fmriprep to use “sub-001_ses-01-repeat_T1w.nii” for processing of “sub-00_ses-01_bold.nii” while still using the “–subject-anatomical-reference sessionwise” flag? Alternatively, if there is no good solution and I have to merge ses-01 and ses-01-repeat, what is the best practice for documenting this merger of sessions within the bids format?