-
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
FIX: Refactoring the B0FieldTransform
implementation
#346
Conversation
@effigies thanks much for looking at this draft -- this is a very good moment to give me feedback since I don't plan to work on this for a few hours. |
@oesteban Everything here so far makes sense. I do think the idea of returning to Hz and then resampling that scalar map seems almost guaranteed to be fine. We could do a 2-4x upsampling when generating the |
ce25d24
to
5617345
Compare
75be890
to
fe4faf1
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #346 +/- ##
==========================================
- Coverage 81.99% 80.53% -1.46%
==========================================
Files 26 26
Lines 2271 2296 +25
Branches 281 286 +5
==========================================
- Hits 1862 1849 -13
- Misses 362 402 +40
+ Partials 47 45 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Mathias is off. I'll review in an hour or so. |
No rush, if not possible it's fine too - I'll keep going and we can have that look at the end. Thanks! |
19513f6
to
dea2408
Compare
The last commit should be a candidate to give this an end... See the git commit message for more details. 🚀 |
182f3e5
to
001c3f9
Compare
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.
Couple big issues. Still looking through this.
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.
Okay, I've read through this now. Only one additional comment, and it's more of a nit-pick as series with degenerate spatial dimensions are probably going to break in other ways...
6a8c5c3
to
6678591
Compare
Okay, I've been working on the docstring and on pacifying tests. I have opened #369 for a test that will require further investigation. This could be closed after beefing up tests a little. This is the plan: 1 - Add a recent EPI "pepolar" correction pair, and one fmap2epi affine. I have data I can distribute for this, with DWI with 6 b=0 acquired sufficient time apart to have visible head motion. |
BTW, these EPI are LAS I have them for both LR/RL and PA/AP PEs. |
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 passing comments
da4c183
to
3266cf8
Compare
Can we maybe go ahead without tinkering with the test dataset and keep this in mind when we write the CLI of SDCFlows? I think we are not far from pinning that one down and your thoughts are very useful there. |
3266cf8
to
1e5dbe4
Compare
Okay, believe it or not, this is coming to an end :) I have decided to leave the head motion correction transforms out of this PR (see Should we try to merge this today? I've checked and all tests are looking gorgeous (I'm even surprised how the phasediff correction is on pair with the quality level of pepolar maps). |
1e5dbe4
to
0f24b6b
Compare
Agreed. Absolutely does not need doing here. |
Sorry, I started a final review on Friday and wasn't able to get back to it yesterday. Will do it first thing today. |
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.
gave another quick pass
("out_warp", "fieldwarp_ref")]), | ||
(resample, outputnode, [("out_field", "fieldmap")]), | ||
# (resample_ref, outputnode, [("out_field", "fieldmap_ref")]), | ||
# TODO - take reference from brainextraction workflow |
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.
still todo?
sdcflows/transform.py
Outdated
target_reference = deoblique_and_zooms( | ||
listify(self.coeffs)[-1], | ||
target_reference, | ||
) | ||
|
||
# Generate tensor-product B-Spline weights | ||
for level in listify(self.coeffs): |
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.
listify
is potentially called 3 times on self.coeffs
- perhaps we save the cycles and just set to a variable?
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.
Okay. Overall looks good. Most suggestions are for maintainability, not bugs caught.
Co-authored-by: Mathias Goncalves <[email protected]> Co-authored-by: Chris Markiewicz <[email protected]>
c78c74e
to
107f56e
Compare
@effigies it looks our tests dislike the new version of pybids released two days ago:
Do you have any quick ideas of why this is happening? EDIT: seems related to bids-standard/pybids#1009 |
515d8c9
to
3c024ea
Compare
According to |
Co-authored-by: Mathias Goncalves <[email protected]>
779c239
to
ea12e7f
Compare
Co-authored-by: Mathias Goncalves <[email protected]>
🎉 |
…3077) ## Changes proposed in this pull request * Accommodate nipreps/sdcflows#346 * Convert ITK transforms from `.mat` (MATLAB) to text format
This PR defines a new interface for the
ApplyCoeffsField
node, and dismissesTransformCoefficients
because that projection is really not necessary.Resolves: #345.