-
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
feat(get_trt): Allow estimated and fallback TotalReadoutTime #477
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #477 +/- ##
==========================================
- Coverage 83.86% 83.85% -0.01%
==========================================
Files 30 30
Lines 2807 2819 +12
Branches 360 365 +5
==========================================
+ Hits 2354 2364 +10
- Misses 383 384 +1
- Partials 70 71 +1 ☔ View full report in Codecov by Sentry. |
9585cbb
to
fcd3b8a
Compare
fcd3b8a
to
24332c1
Compare
We previously allowed a KeyError to be raised, but that makes falling back more difficult. This puts the entire PEDir-dependent branch inside an if-block.
Given that the only point of contention here is the default value of a flag and not the overall logic, and that the current default is consistent with the preexisting behavior, I'm going to merge this as "safe". If you disagree with my response, we can change the default in a separate PR. There is also the opportunity to set a different default behavior for an app like fMRIPrep/dMRIPrep where it calls this function. |
2.12.0 (March 21, 2025) Feature release in the 2.12.x series. This release migrates from the deprecated ``niworkflows.reporting`` module to the ``nireports`` package. * FIX: AttributeError for _ApplyCoeffsFieldInputSpec (#481) * ENH: Allow running SyN SDC without using prior (#480) * ENH: Allow estimated and fallback TotalReadoutTime (#477) * RF: Transition from niworkflows reporting interfaces (#473) * DOC: Fix broken link [skip ci] (#482) * MNT: Add `defaults` to `conda` channels in `build-test-publish` GHA (#474) * MNT: Update `niworkflows` version to 1.11.0 (#478)
This is work toward nipreps/fmriprep#3009.
The primary purpose is to recover SyN-SDC in cases where TRT is not calculable. When we calculated displacement fields and applied them without round-tripping through a field in Hz, this didn't matter. Now that we do, it would be good to allow tools to supply a trivial value in these cases. I would suggest a power of 2 that is in the neighborhood of a plausible value, such as 0.03125, which only modifies the exponent of a floating point value, and not the significand, minimizing the potential for accumulating floating point error.
While I'm here, I provide a boolean flag (
False
by default) to fall back to EstimatedTotalReadoutTime or EstimatedEffectiveEchoSpacing.The order of precedence (if both
use_estimated
andfallback
are enabled) is:We could instead move
Estimated*
to afterWaterFatShift
, if that would be better.Closes #249.