fMRIprep and multi-echo complex-valued BOLD fMRI data

Hi everyone,

We’re collecting multi-band multi-echo BOLD fMRI data.
While we currently don’t intend using complex-valued data (magnitude+phase), we do plan to make the data publicly available in the futrue, and would like it to be as useful as possible for future researchers. Therefore, we are reconstructing it as complex valued data.

I was wondering if anyone has any advice on how to best convert these data to BIDS. Specifically, we collect two short scans with AP and PA phase encoding for EPI distortion correction, and I wasn’t sure how to incorporate this into the BIDS config file. Perhaps there isn’t any standard processing pipeline for such data, and in this case I will only run dcm2bids on the magnitude data, and keep the source data for future researchers.

If you do have any advice on using complex-valued data with fmriprep, that would be greatly appreciated.

Many thanks!

Hi @roeysc,

As you can see in the BIDS specification here (Magnetic Resonance Imaging - Brain Imaging Data Structure v1.9.0), you can use the part-<> label to separate magnitude, phase, real, etc…

If these are just fieldmaps, these would go under the fmap folder with the epi suffix. You’ll want to specify the direction (dir-AP/PA) as a custom entitiy, and make sure you use the intendedFor field to map the field maps to the associated BOLD files. If you have not looked at the dcm2bids documentation (Create a config file - dcm2bids documentation) I encourage you to do so.

I would personally convert everything to BIDS that you can, and give the researcher the choice to ignore/include data as they wish.


Dear Steven,
Thank you so much for your quick reply!

Sorry for not being clearer: Indeed I’m using the part-mag and part-phase labels, as well as the dir-AP and dir-PA as appropriate.
My concerns are mostly regarding the intendedFor field. Since I have never worked with phase data, I wasn’t sure if simply adding the phase data files as targets for distortion correction is appropriate.

Thanks again,


One thing to keep in mind is that if the phase data have phase wraps (sudden jumps between -pi and pi), when you warp or interpolate the data (like in SDC), you will be introducing errors. It would be safer to process the real and imaginary parts separately and compute the phase and magnitude after all the processing.

Hi Roey, I could be wrong, but I don’t think you have to worry about the IntendedFor field in the json file for those specific bold files. If you have the bold data set up with part-mag and part-phase (e.g. rf1-sra-data/code/ at main · DVS-Lab/rf1-sra-data · GitHub), that should allow future researchers use it appropriately (e.g., for framewise SDC, as discussed here: Multi-echo fmaps: Echo 1 and 2 difference unreasonable?).

Best wishes,

Thanks @pvelasco and @dvsmith for these helpful insights!

1 Like