-
Notifications
You must be signed in to change notification settings - Fork 29
feat: Add workflow arguments for metadata estimates and fallback TRT #479
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #479 +/- ##
==========================================
- Coverage 84.32% 84.04% -0.29%
==========================================
Files 30 30
Lines 2846 2870 +24
Branches 367 374 +7
==========================================
+ Hits 2400 2412 +12
- Misses 376 384 +8
- Partials 70 74 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
73a4104
to
fc91066
Compare
fc91066
to
0595ff0
Compare
0595ff0
to
0f3c1de
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.
Looks reasonable :)
I've got a broken nipreps/fmriprep#3423 that is paired with this. I figure I should get that working before merging this. Was aiming for 25.0, but it was delayed enough. |
b567cf6
to
cdd481f
Compare
msg = "Missing readout timing information for <%s>. %s" | ||
extra = "Explicit fallback must be provided." | ||
have_trt = False | ||
try: | ||
get_trt(self.metadata, in_file=self.path) | ||
except ValueError as exc: | ||
raise MetadataError( | ||
f"Missing readout timing information for <{self.path}>." | ||
) from exc | ||
have_trt = True | ||
except ValueError: | ||
with suppress(ValueError): | ||
get_trt(self.metadata, in_file=self.path, use_estimate=True) | ||
extra = "Estimated timing is available." | ||
|
||
if not have_trt: | ||
logger.warning(msg, self.path, extra) |
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.
@oesteban Your review of changes to this class would be appreciated. I didn't see an obvious way to thread config options into __attrs_post_init__
, so instead I settled for emitting warnings at object creation time. This may push errors down into runtime that would currently be caught. I'll see about having fMRIPrep run the check at workflow build time.
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.
Actually, best place to put it was in the sdcflows preproc workflow generator.
2.13.0 (May 15, 2025) Feature release in the 2.13.x series. This release addresses some longstanding issues with the SyN-SDC workflow, improving the registration quality in adult humans by utilizing a spatial prior, as well as allowing Laplacians to be up- or down-weighted in the cost function, making it more usable across species. Additionally, this release allows for the use of ``EstimatedTotalReadoutTime`` or ``EstimatedEchoSpacing``, or a manually provided fallback ``TotalReadoutTime`` value, permitting the use of SDCFlows on datasets that do not have reliable timing information without introducing incorrect metadata into the datasets. * fix(syn): Re-enable priors respecting ``sd_priors`` argument (#488) * feat: Add workflow arguments for metadata estimates and fallback TRT (#479) * feat(syn): Update totalFieldVarianceInVoxel space based on voxel resolution (#487) * feat(syn): Allow changing laplacians weights in SyN registration metric (#484) * test(syn): Add a test to exercise SyN workflow creation and check parameters (#486)
2.13.0 (May 15, 2025) Feature release in the 2.13.x series. This release addresses some longstanding issues with the SyN-SDC workflow, improving the registration quality in adult humans by utilizing a spatial prior, as well as allowing Laplacians to be up- or down-weighted in the cost function, making it more usable across species. Additionally, this release allows for the use of ``EstimatedTotalReadoutTime`` or ``EstimatedEchoSpacing``, or a manually provided fallback ``TotalReadoutTime`` value, permitting the use of SDCFlows on datasets that do not have reliable timing information without introducing incorrect metadata into the datasets. * fix(syn): Re-enable priors respecting ``sd_priors`` argument (#488) * feat: Add workflow arguments for metadata estimates and fallback TRT (#479) * feat(syn): Update totalFieldVarianceInVoxel space based on voxel resolution (#487) * feat(syn): Allow changing laplacians weights in SyN registration metric (#484) * test(syn): Add a test to exercise SyN workflow creation and check parameters (#486)
@effigies sorry for not having had a look in time -- thanks for this! |
Follow-up to #477.