osl icon indicating copy to clipboard operation
osl copied to clipboard

sign flipping template subject variability

Open matsvanes opened this issue 2 years ago • 2 comments

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?

  1. check if the source directory contains sign_flip_template.txt
  2. If so, and if this subject folder is available load use this template subject (and add it to subjects for input to run_source_batch)
  3. if not, run find_template_subject as usual
  4. Of course we could add in an extra argument overwrite to not use the txt file

matsvanes avatar Jan 10 '24 13:01 matsvanes

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

cgohil8 avatar Jan 11 '24 09:01 cgohil8

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.

cgohil8 avatar Jul 28 '24 13:07 cgohil8