sign flipping template subject variability
We're often processing data in batches - for whatever reason. However, if we iteratively use find_template_subject with different inputs, we have the risk of using different templates for sign-flipping different data.
Would it be an idea to add the following to find_template_subject - especially for when we interact with source_recon through the run_source_batch?
- check if the source directory contains
sign_flip_template.txt - If so, and if this subject folder is available load use this template subject (and add it to
subjectsfor input torun_source_batch) - if not, run
find_template_subjectas usual - Of course we could add in an extra argument
overwriteto not use the txt file
Note, for anyone currently experiencing issues trying to align a dataset to a different already sign flipped dataset, there is an example using the low-level functions that can be used more flexibly:
https://github.com/OHBA-analysis/osl/blob/main/examples/sign_flipping.py
Maybe this is solved now by the option to do the sign flipping in osl-dynamics?
https://github.com/OHBA-analysis/osl-dynamics/pull/276
The user can specify the template (which can be from another dataset) in osl-dynamics, rather than OSL. Note, it doesn't matter if the sign flipping was already done to another template beforehand.