-
Notifications
You must be signed in to change notification settings - Fork 161
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
[ENH] Allow .bval and .bvec files for pepolar fmaps #1754
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1754 +/- ##
=======================================
Coverage 87.92% 87.93%
=======================================
Files 16 16
Lines 1375 1351 -24
=======================================
- Hits 1209 1188 -21
+ Misses 166 163 -3 ☔ View full report in Codecov by Sentry. |
I think the other approach I mentioned (adding EDIT: Can you also update the derivative rules for field maps? bids-specification/src/schema/rules/files/deriv/preprocessed_data.yaml Lines 100 to 105 in bd08602
|
Co-authored-by: Taylor Salo <[email protected]>
Thanks! I think you just need to address the issues in the |
Co-authored-by: Taylor Salo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks good to me!
Started having a look yesterday. It's not clear why this isn't showing up in the rendered examples. |
I'm seeing Should it be showing up somewhere else? |
Ah, no. Sorry, it turned out I opened the wrong PR's render. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this LGTM. It would be good to update/duplicate these checks:
bids-specification/src/schema/rules/checks/dwi.yaml
Lines 4 to 44 in bd08602
DWIVolumeCount: | |
issue: | |
code: VOLUME_COUNT_MISMATCH | |
message: | | |
The number of volumes in this scan does not match the number of volumes in the | |
associated '.bvec' and '.bval' files. | |
level: error | |
selectors: | |
- suffix == "dwi" | |
- '"bval" in associations' | |
- '"bvec" in associations' | |
- type(nifti_header) != "null" | |
checks: | |
- associations.bval.n_cols == nifti_header.dim[4] | |
- associations.bvec.n_cols == nifti_header.dim[4] | |
# 30 | |
DWIBvalRows: | |
issue: | |
code: BVAL_MULTIPLE_ROWS | |
message: | | |
'.bval' files should contain exactly one row of values. | |
level: error | |
selectors: | |
- suffix == "dwi" | |
- '"bval" in associations' | |
checks: | |
- associations.bval.n_rows == 1 | |
# 31 | |
DWIBvecRows: | |
issue: | |
code: BVEC_NUMBER_ROWS | |
message: | | |
'.bvec' files should contain exactly three rows of values. | |
level: error | |
selectors: | |
- suffix == "dwi" | |
- '"bvec" in associations' | |
checks: | |
- associations.bvec.n_rows == 3 |
For example, you can update the suffix check to match multiple suffixes with:
- - suffix == "dwi"
+ - intersects([suffix], ["dwi", "epi"])
And do we want to add a check for epi.bval
there must be at least one 0
value?
I think datasets can have non-zero, but low, b-values in these images. In QSIPrep there's a b0-threshold parameter that determines which volumes to treat as b=0. |
What are typical thresholds? 1, 1e-2, 1e2? |
I believe in DIPY it is 50. That said, it may be necessary to define it in terms of the number of orientations: to fit the simplest model (DTI), you need at least 6 DWIs and one low-b. So, in practical terms, an EPI sequence with 5 b=1000 and 1 b=0 is, in reality, not a DWI (this is to say, it would fit best in fmap) Anyways, this is a bit of splitting hairs, so happy to +1 the overall effort. |
Yeah, this is just EPI that may have b-values, not DWI, so that doesn't seem like a problem here. @mattcieslak @tsalo Do you want to make a schema check? Or need guidance? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM! Regarding threshold, I am guessing the b=100 default implemented in qsiprep is based on some use-case that @mattcieslak encountered where the low b-value was larger than 50? This is how DIPY chose that number 😄
Co-authored-by: Chris Markiewicz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Since the spec text has not changed in well over a week, and we've been fiddling around in the schema, I think this should be okay to merge without additional delay. I will allow someone else to do the honors, to ensure I am not alone in this opinion.
I agree. The actual content hasn't changed since @arokem and I approved, so I think we can say that there are still three approvals. |
Closes #1724