-
Notifications
You must be signed in to change notification settings - Fork 24
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
RF: Split PEPolar fieldmaps by intent, if available #342
Conversation
The failure is related to the HCP test dataset.
Some of this is bad metadata (should be |
With nipreps-data/HCP101006#2, I get $ sdcflows-find-estimators -v /data/nipreps/test_data/HCP101006/
[sdcflow.wrangler - DEBUG]: Found PHASEDIFF estimation from 2 sources:
- sub-101006/fmap/sub-101006_phasediff.nii.gz
- sub-101006/fmap/sub-101006_magnitude1.nii.gz
[sdcflow.wrangler - DEBUG]: Failed to construct unnamed PEPOLAR estimation from 1 sources:
- sub-101006/fmap/sub-101006_dir-LR_epi.nii.gz
Error: Insufficient sources to estimate a fieldmap.
[sdcflow.wrangler - DEBUG]: Failed to construct unnamed PEPOLAR estimation from 1 sources:
- sub-101006/fmap/sub-101006_dir-RL_epi.nii.gz
Error: Insufficient sources to estimate a fieldmap.
[sdcflow.wrangler - DEBUG]: Found single PE fieldmap sub-101006/fmap/sub-101006_dir-LR_epi.nii.gz
[sdcflow.wrangler - DEBUG]: Found single PE target sub-101006/func/sub-101006_task-rest_dir-RL_sbref.nii.gz
[sdcflow.wrangler - DEBUG]: Found PEPOLAR estimation from 2 sources:
- sub-101006/fmap/sub-101006_dir-LR_epi.nii.gz
- sub-101006/func/sub-101006_task-rest_dir-RL_sbref.nii.gz
[sdcflow.wrangler - DEBUG]: Found single PE fieldmap sub-101006/fmap/sub-101006_dir-RL_epi.nii.gz
[sdcflow.wrangler - DEBUG]: Found single PE target sub-101006/func/sub-101006_task-rest_dir-LR_sbref.nii.gz
[sdcflow.wrangler - DEBUG]: Found PEPOLAR estimation from 2 sources:
- sub-101006/fmap/sub-101006_dir-RL_epi.nii.gz
- sub-101006/func/sub-101006_task-rest_dir-LR_sbref.nii.gz
[sdcflow.wrangler - DEBUG]: Skipping fmap-less estimation
Estimation for </data/nipreps/test_data/HCP101006> complete. Found:
sub-101006
FieldmapEstimation(sources=<2 files>, method=<EstimatorType.PHASEDIFF: 3>, bids_id='auto_00000')
None fmap/sub-101006_phasediff.nii.gz
None fmap/sub-101006_magnitude1.nii.gz
FieldmapEstimation(sources=<2 files>, method=<EstimatorType.PEPOLAR: 2>, bids_id='auto_00001')
i fmap/sub-101006_dir-LR_epi.nii.gz
i- func/sub-101006_task-rest_dir-RL_sbref.nii.gz
FieldmapEstimation(sources=<2 files>, method=<EstimatorType.PEPOLAR: 2>, bids_id='auto_00002')
i- fmap/sub-101006_dir-RL_epi.nii.gz
i func/sub-101006_task-rest_dir-LR_sbref.nii.gz |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #342 +/- ##
==========================================
+ Coverage 88.26% 88.48% +0.21%
==========================================
Files 25 25
Lines 2080 2110 +30
Branches 320 331 +11
==========================================
+ Hits 1836 1867 +31
+ Misses 202 201 -1
Partials 42 42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@oesteban What do you think about this change, philosophically? Can consider implementation details later. |
I won't be able to have a close look until tomorrow. At the outset, I'm happy to improve usability when possible. If this doesn't interact with the B0 identifiers approach, then why not? However, I would prefer people start using the identifiers as they are more explicit about the intent. |
df30a4e
to
78c2342
Compare
Will go ahead then. This should have no impact on B0Field markers.
Agreed. The context here is a dataset the user doesn't fully control. The intent is clear, whether or not it's good practice. |
Encountered a dataset (cc @demidenm) with 6 fieldmaps, identifiable with
IntendedFor
. SDCFlows combined them into a two fieldmaps with three scans in each direction.I understand that one goal was to provide better, more uniform fieldmaps, but I don't think that should come at the cost of ignoring clear intent. If the user wants to combine the fieldmaps to use on all images, they may do so explicitly.
This approach also groups fieldmaps with missing
IntendedFor
or with an empty list as a value. It would be the responsibility of downstream code to interpret whether to apply these fieldmaps to any EPI data.