tedana icon indicating copy to clipboard operation
tedana copied to clipboard

Operate on data in TxSxE shape instead of SxExT

Open tsalo opened this issue 4 years ago • 7 comments

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.

tsalo avatar Nov 07 '19 16:11 tsalo

How does this interact with #425 ?

emdupre avatar Nov 08 '19 15:11 emdupre

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.

tsalo avatar Nov 08 '19 15:11 tsalo

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.

emdupre avatar Nov 08 '19 16:11 emdupre

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.

tsalo avatar Feb 06 '20 16:02 tsalo

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?

jbteves avatar Feb 06 '20 17:02 jbteves

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

tsalo avatar Feb 17 '20 23:02 tsalo

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

jbteves avatar May 18 '20 18:05 jbteves