-
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
ENH: Allow Jacobian correction to be toggled on/off #462
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #462 +/- ##
==========================================
+ Coverage 83.66% 83.67% +0.01%
==========================================
Files 32 32
Lines 2816 2818 +2
Branches 377 378 +1
==========================================
+ Hits 2356 2358 +2
Misses 390 390
Partials 70 70 ☔ View full report in Codecov by Sentry. |
baf7bd8
to
8dfbccf
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.
LGTM, little nits
@@ -73,6 +73,7 @@ def _sdc_unwarp( | |||
coordinates: np.ndarray, | |||
pe_info: Tuple[int, float], | |||
hmc_xfm: np.ndarray | None, | |||
jacobian: bool, |
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.
Assuming you've checked all instances - inserting a new parameter in the middle of a non keyword only function makes me nervous
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.
That's what testing's for. And yes, I've checked.
Co-authored-by: Mathias Goncalves <goncalves.mathias@gmail.com>
Jacobian correction is optional in fMRIPrep, but it can't be toggled when calling SDCFlows resampling, as in SDCFlows workflows. This:
ApplyCoeffsField
andinit_unwarp_wf
to take a booleanjacobian
argument that determine whether the Jacobian will be applied.init_unwarp_wf
toTrue
to avoid changing behavior in downstream tools that do not upgrade and decide to disable it.False
forApplyCoeffsField
. This seems the more conservative option for an interface.jacobian=True
when addingApplyCoeffsField
to theinit_topup_wf
workflow andjacobian=False
in theinit_syn_sdc_wf
The main thing this enables is fixing nipreps/fmriprep#3366.