i tried to run fmriprep with fieldmap correction using a phasediff image and one magnitude image. According to the BIDS documentation Case 1: Phase difference image and at least one magnitude image. I got the following error:
traits.trait_errors.TraitError: The trait ‘in_files’ of an IntraModalMergeInputSpec instance is an existing file name, but the path ‘/data/sub-01/ses-01/fmap/sub-01_ses-01_magnitude2.nii’ does not exist.
It seems to search for another magnitude image but according to the BIDS structure i only need one?
Can you share your actual BIDS tree (the tree command is useful here, if you have it), and the contents of the relevant .json files for your fieldmaps?
I have a suspicion there might be an issue with expecting .nii vis .nii.gz.
I had the same problem (also have one phasediff and one magnitude-image), but I “solved” it by copying the magnitude image and renaming the original one “*magnitude1.nii.gz” and the copied one “*magnitude2.nii.gz”, which then resolved the error when running fmriprep. Perhaps this info helps in debugging the issue!
Okay, so it’s only one volume. For now, you’ll need to add --ignore fieldmaps to your fmriprep command, because we don’t support phasediff distortion correction without both magnitude1 and magnitude2.
I’ve opened an issue on the fmriprep Github to be sure that we handle this case correctly, whether it is to disable fieldmaps or to use an alternative algorithm. Please direct any further discussion, there.