-
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: API overhaul - foundations #123
Conversation
0dcd2cf
to
52b1a96
Compare
Codecov Report
@@ Coverage Diff @@
## master #123 +/- ##
===========================================
+ Coverage 57.23% 71.30% +14.06%
===========================================
Files 14 14
Lines 968 784 -184
Branches 118 96 -22
===========================================
+ Hits 554 559 +5
+ Misses 394 200 -194
- Partials 20 25 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
30866e1
to
30ec263
Compare
Hello @oesteban, Thank you for updating! Cheers! There are no style issues detected in this Pull Request. 🍻 To test for issues locally, Comment last updated at 2020-11-22 20:23:20 UTC |
966c336
to
080c2d3
Compare
The heuristic table will not be pertinent at the level of SDCFlows, as the workflow will be staged for each fieldmap in the structure and will not then be applied to correct the data - that will be the responsibility of the host workflow (i.e., *fMRIPrep* for the case at hand). Since this table will be removed in the context of nipreps/sdcflows#123, I'm bringing it here temporarily.
308e3a4
to
d2b983c
Compare
ef4dd27
to
8c15f29
Compare
With @effigies off this week, @mgxd focused on Ni{Babies|Rodents} and having the dMRIPrep meeting tomorrow where I can catch up with @josephmje and @mattcieslak, I'm going to merge this into I think that will shorten the span of time this overhaul is lingering and also allow me to make progress on other fronts. |
Summary
This PR continues the work initiated in #114 and #115 to create a new interface for SDCFlows. This overhaul has the vision of converting SDCFlows into some sort of subordinate pipeline to d/fMRIPrep, with a more independent functioning like sMRIPrep.
The idea is to consider fieldmaps a first-citizen input for which derivatives are generated at the output (on the same vein of, and effectively implementing #26).
CHANGES
workflows
module, to keep consistency with all NiPreps. Now, estimation methods are found assdcflows.workflows.fit.{pepolar,fieldmap,syn}
. Other than that, these workflows have not changed substantially from ENH: New objects for better representation of fieldmap estimation #114.sdcflows.workflows.outputs
that writes out reportlets and derivatives, following suit with higher-level NiPreps (s/f/dMRIPrep). The two workflows are exercised in the CircleCI tests*, and the artifacts are generated this way. TheDerivativesDataSink
in this module will need some updates to the JSON config of PyBIDS (within NiWorkflows) to allow some new names (e.g., to generatedesc-preproc_magnitude
files). Please check the JSON sidecars that are currently generated in CircleCI and whether they seem comprehensive enough - they forwardIntendedFor
metadata, link to corresponding coefficients files (only TOPUP for now), and link the appropriate, preprocessed reference (magnitude or epi average).sdcflows.workflow.base. init_fmap_preproc_wf
. At the moment, it only picks B0 fieldmaps (i.e.,_fieldmap
,_phase1/2
,_phasediff
) and PEPOLAR if two or more_epi
consistently named and with differentdirection
entities are found under the same session. That PEPOLAR case is the only one that can be implicitly assumed in a somewhat safe manner. This pilot draft will be completed when [ENH] Allow encoding the fieldmapping intent of the protocol bids-standard/bids-specification#622 is finally merged - only then there will be a clear definition of fieldmap objects (see ImplementB0FieldIdentifier
inFieldmapEstimation
object #125, GenerateB0FieldIdentifier
fromIntendedFor
fields, when it is missing #126).sdcflows.utils.phasemanip
, to facilitate the implementation of (pretty basic) unit tests.sdcflows.workflows.apply.registration
module: aligns the reference map of the fieldmap of choice (e.g., a magnitude image) to the reference EPI (e.g., an SBRef, a b=0 DWI, or a fMRIPrep's BOLDRef) with ANTs. The workflow resamples the fieldmap reference into the reference EPI's space for reporting/visualization objectives. Some scaffold has been left there to pick it up as start to continue with ENH: A 3D tensor B-Spline approximator and extrapolator #119. For now, attempting to use this path will result in aNotImplementedError
.Next steps
FieldmapEstimation
object.* Although, pytest-cov does not seem to be registering coverage for interfaces run within workflows.