ME-ICA / tedana

TE-dependent analysis of multi-echo fMRI
https://tedana.readthedocs.io
GNU Lesser General Public License v2.1
161 stars 95 forks source link

Operate on data in TxSxE shape instead of SxExT #420

Open tsalo opened 4 years ago

tsalo commented 4 years ago

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

  1. For every operation using data, keep time (when available) as the first dimension, voxels as the second, and echo (when available) as the third.
emdupre commented 4 years ago

How does this interact with #425 ?

tsalo commented 4 years ago

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.

emdupre commented 4 years ago

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.

tsalo commented 4 years ago

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.

jbteves commented 4 years ago

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?

tsalo commented 4 years ago

I suppose we could use the relative sizes (S > T > E). That way we don't have to hard-code any thresholds in.

jbteves commented 4 years ago

Oh, yes, that's a good idea. Sorry I never replied.