Open tsalo opened 4 years ago
Alternatively, what if we removed the t2smap workflow altogether and just added a --no-denoise
argument to the tedana workflow that, if set, would stop after writing out the optimally combined data and T2*/S0 maps? We'd need to allow FIT in the tedana workflow, but we could make it dependent on --no-denoise
.
I think I'd actually prefer the first way -- where tedana_workflow
calls t2smap_workflow
. Mostly because the tedana workflow is already quite long, and I do think they're conceptually slightly different pieces (i.e., fMRIPrep is unlikely to call the full tedana workflow any time soon).
Is there a strong reason to go with the second approach ?
Once I started working on the first approach I realized that there would still be a lot of unnecessary duplication and opportunities for one method to end up outdated compared to the other.
I don't think they're conceptually different. One is just the first part of the other. Some options that are fine for just T2* estimation and optimal combination are incompatible with TE-dependent denoising, but that's not really unique to this particular division of functionality.
Once I started working on the first approach I realized that there would still be a lot of unnecessary duplication and opportunities for one method to end up outdated compared to the other.
Could you expand a little bit on this ? That's clearly the situation we're in now (so addressing it is definitely something we should be doing !), but I'm not sure how we'd end up with outdated methods if we're calling t2smap inside the tedana workflow.
If we move the core of t2smap into a separate function that is called by both the t2smap CLI and tedana workflow, then that function will likely include the following steps:
The function will require a large number of parameters, and it will need to return catd
, ref_img
, tes
, mask
, masksum
, t2s_limited
, t2s_full
, tsoc
, maybe s0_limited
(not sure), and maybe s0_full
(also not sure). One problem I have with that is that we may need to frequently update both the inputs and outputs to this function based on what we need later on in the denoising steps. That and the number of parameters and outputs would make it difficult to read.
The new t2smap CLI code would need to set up and clean up the loggers and reports, and, depending on how much duplication we want with input checking between the t2smap and tedana workflow functions, do a lot of that as well. That's where t2smap could become outdated again.
During the conference call today we'd discussed breaking this discussion about workflows into a separate, more general issue. Is that okay with you @tsalo @emdupre ?
Summary
tedana_workflow
is the focus of most of our efforts, even thought2smap_workflow
is also probably frequently used (via fMRIPrep). As a result,t2smap_workflow
keeps becoming more and more out-of-date with respect to our current goals. For example, it still uses thelabel
argument instead of anout_dir
one. While we need to maintain compatibility with fMRIPrep, we should still work to keept2smap_workflow
current.Given that the contents of
t2smap_workflow
overlap completely with a portion oftedana_workflow
, we should convertt2smap_workflow
into a function that can be called both by thet2smap
CLI and bytedana_workflow
.Next Steps
tedana.workflows.t2smap_workflow
with respect to changes that have been made totedana.workflows.tedana_workflow
.tedana.workflows.t2smap_workflow
into a separate file. Have that CLI argparser call the updated function intedana.workflows.t2smap_workflow
.tedana.workflows.t2smap_workflow
with a call totedana.workflows.t2smap_workflow
.