tedana
tedana copied to clipboard
Operate on data in TxSxE shape instead of SxExT
Summary
This change will involve large-scale refactoring, but will make the data easier to interact with for all regular users of nilearn (i.e., the majority of neuroimagers who use Python).
Next Steps
- For every operation using data, keep time (when available) as the first dimension, voxels as the second, and echo (when available) as the third.
How does this interact with #425 ?
This will make #425 easier, or vice versa, but hypothetically they're distinct. We already load our data and then reshape it/swap axes, so we could retain our current standard for array shapes and still improve the masking.
I'm a strong +1 on this ! Less strong feelings on #425, but it makes sense to me to pursue both at once since they'll hit the same lines.
The issue I came across implementing this was that we sometimes have 2D arrays, and I couldn't figure out how to deduce if it's a TxS or an SxE array.
I would assume that anything that's time-based couldn't exceed about 10k timepoints, whereas you would trivially have >10k space points. Could you use that as a criterion?
I suppose we could use the relative sizes (S > T > E). That way we don't have to hard-code any thresholds in.
Oh, yes, that's a good idea. Sorry I never replied.