tedana icon indicating copy to clipboard operation
tedana copied to clipboard

Refactor the tedana.py workflow to better use modularized code

Open handwerkerd opened this issue 2 years ago • 0 comments

Summary

After #756 is merged, some of the newly modularized functions could be better used in the tedana.py workflow. It should be possible to refactor that workflow to make it easier to understand and edit

Additional Detail

While working on modularization, it became clear that a large proportion of the tedana.py workflow as conditional statements that existed only to make it possible to manually change component classifications (the --manacc option) while skipping over most of the rest of the code. Given some of the added functionality that came with modularization, keeping that all in tedana.py would have made it even messier. We removed all those conditional statements and created a distinct workflow: tedana_reclassify. Some of the ways we used modularization in tedana_reclassify.py could also be used in tedana.py.

Making these changes will also make more dynamic and informative logging possible. One key example of this is that the list of references to cite are currently hard-coded into tedana.py. Decision tree specifications also include lists of references. When every workflow is modularized, we'd be able to make reference gathering more dynamic and useful.

Next Steps

  • Decide where this fits within broader priorities

handwerkerd avatar Dec 22 '22 16:12 handwerkerd