Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect phase encode direction in JSON? #16

Open
mangstad opened this issue Apr 26, 2023 · 6 comments
Open

Incorrect phase encode direction in JSON? #16

mangstad opened this issue Apr 26, 2023 · 6 comments

Comments

@mangstad
Copy link

addline = {"PhaseEncodingDirection": "i"}

So at this point, it's creating the generic task JSON files, and it says if direction is LR then phase encode is i and if it's RL it's i-. However, everywhere else earlier in the script for DWI and fieldmap data, it indicates if it's LR it's i- and if it's RL it's i. I used this to convert some HCP data to BIDS and run fMRIprep, and in fact it does appear from my output images as if the fieldmap correction was applied in the wrong direction. I'm re-running right now with the i/i- flipped on the functional images to see if that resolves it, but I expect it to.

@clarkenj
Copy link

Hi @mangstad, I came across your issue as I am also intending to run fMRIPrep on HCP(-EP) data. I wondered if flipping the phase encoding direction as you suggested resolved the issue? Thank you very much, Natasha

@mangstad
Copy link
Author

Yes, flipping the direction resulted in the outputs looking much better.

@clarkenj
Copy link

Great, thank you!

@DAI-Sicheng
Copy link

Hello @mangstad, Thanks for pointing out this issue. So the way to solve this problem is to set the "PhaseEncodingDirection" to i for LR and to -i for RL, or just set "PhaseEncodingDirection" consistently across the script (regardless i for LR or -i for LR) is fine?

I have another question hope you could kindly answer. Running fmriprep requires the "dataset_description.json" file, how do you manage the get this issue solved? Many thanks!

@mangstad
Copy link
Author

mangstad commented Apr 2, 2024

@DAI-Sicheng you do need to set the phase encode direction correctly, not just consistently. Setting it incorrectly will result in the correction being applied incorrectly and will give you distorted data.

For the dataset description file, you just need to create one. The required things in that file don't actually impact the processing in any way, so you just need to create a file that passes the BIDS checks. Info on that file can be found here: https://bids-specification.readthedocs.io/en/stable/modality-agnostic-files.html

@DAI-Sicheng
Copy link

@mangstad Your reply helps a lot, thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants