-
Notifications
You must be signed in to change notification settings - Fork 27
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
IntendedFor is ignored by wrangler.find_estimators #266
Comments
Looking at the wrangler code, I can see that some options that were working in the previous version might no longer possible. In addition, from the code logic it seems that if a dataset includes fieldmaps for DWI but not for BOLD, it might require using |
Any potential fix for that issue? sdcflows/sdcflows/utils/wrangler.py Lines 295 to 299 in 83b064e
as I cannot get any results with that query in a simple pybids example.
Is querying files with metadata functional in pybids? |
I think I solved a part of the puzzle about pybids not finding the B0FieldIdentifier tagged files. sdcflows/sdcflows/utils/wrangler.py Lines 295 to 299 in 83b064e
If I query layout.get(B0FieldIdentifier=bids.layout.Query.ANY) I do get the fieldmaps where that value is not empty.In fact it doesn't seem possible to query that an entity with list value contains a string from the BIDSLayout.get if I am not mistaken, so that won't be an easy fix.@mgxd @oesteban what do you think? |
I agree layout.get(B0FieldIdentifier='myb0id') should work out |
You mean it should work with list, getting a match if any value in the list matches? |
|
I can't wrap my head around how to make B0Field* work with sdcflows for pepolar with a single phase-reversed epi fmap. It seems that sdcflows is making assumptions about the scheme that are not set in the BIDS specs (which I convene is quite loose). https://bids-specification.readthedocs.io/en/stable/04-modality-specific-files/01-magnetic-resonance-imaging-data.html#echo-planar-imaging-and-b0-mapping From the spec, one could set B0Fields in different ways to achieve the same goal which is for each bold find a pair of epis (_bold|_sbref|_epi) with opposite phase encoding direction (pedir):
The first way seems easier to fix. |
@bpinsard did this get fully resolved? |
I think the B0Field issues are resolved, but the problems with IntendedFor are not. I will try to find some time to have a small test case to replicate. |
I am trying the new fMRIPrep release 21.0.1, and I have never ending topup on pilot multi-echo data.
Trying to investigate why, I found out that SDCFlow ignored the
IntendedFor
and topup is run on 20+ incongruent volumes (echoes with different distortions level from all possible epi fieldmap in the session).Looking at the code, if I am not mistaken, it seems that the
IntendedFor
will never be used as the following code will take all EPI and return a single estimator per session.sdcflows/sdcflows/utils/wrangler.py
Lines 291 to 304 in 56a02bf
and then IntendedFor are skipped because the epi fmap is already used above.
sdcflows/sdcflows/utils/wrangler.py
Lines 313 to 314 in 56a02bf
I would say that this issue is not multi-echo specific as it did not only aggregate echoes from the same series. The BIDS might be faulty as IntendedFor in multi-echo fMRI and phase-reversed EPI fmap is not detailled in the doc (I set it such that the each echo index _epi.json be IntendedFor the same echo index _bold.nii.gz).
I could make changes to use the new B0FieldIdentifiers BIDS tags, but it would be good if that worked on legacy BIDS datasets using IntendedFor.
Let me know if that's clear or if you need more info on the dataset.
The text was updated successfully, but these errors were encountered: