-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add a node for selecting specific shells from preprocessed dwis #194
Conversation
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.
A few initial thoughts.
The big thing I think this needs is a comprehensive unit test for _find_shells
with a bunch of simulated b-val schemes.
Co-authored-by: Taylor Salo <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #194 +/- ##
==========================================
+ Coverage 47.90% 48.57% +0.66%
==========================================
Files 56 56
Lines 7198 7309 +111
Branches 978 999 +21
==========================================
+ Hits 3448 3550 +102
+ Misses 3544 3543 -1
- Partials 206 216 +10 ☔ View full report in Codecov by Sentry. |
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.
I have a couple of ideas for the tests.
Co-authored-by: Taylor Salo <[email protected]>
Background
The SS3T workflow needs to have only b=0s and one shell of b>0s sent to it. Similarly, the BabyAFQ pipeline requires selecting only a few shells for msmt.
Recon Spec
This PR adds a
select_gradients
action that lets users pick which shells to send to a downstream node. The parameters areexpected_n_input_shells
to make sure that this many shells (including the b=0s as a shell) are detected in the input data.An example in a recon spec for HBCD might look like:
Implementation
The trickiest part about this is making it general enough that it can be included in a built-in recon workflow and work with the many different shell schemes out there. The value
0
can be hard-coded because has a specific meaning/use in DWI. Because of the minor variations in b-values we also don't always know immediately what the intended shell b-values are. So the steps for selecting shells areTests and reports
The implementation in this PR creates a Pandas DataFrame with each b-value in the input data and which shell it corresponds to. I think saving this data frame to a tsv would be a sufficient sanity check for users. We had talked about plots with histograms of b-values per assigned shell, but these end up not looking very good/informative when plotted.