ME-ICA / tedana

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

Improve dropout adaptive mask method in cases where multiple bad echoes occur early on #1083

Open tsalo opened 2 months ago

tsalo commented 2 months ago

As noted in today's dev call and in https://github.com/ME-ICA/tedana/pull/1061#discussion_r1571035757, the current (as of #1061) implementation of the "dropout" adaptive mask method will behave suboptimally in cases where there are several bad early echoes followed by one or more good echoes.

For example, if we have [bad, bad, bad, bad, good], the current method will label that as having 5 good echoes.

On the other hand, if we have something like [good, good, bad, good, good], we want to use all five echoes, even though one echo in the middle is bad.

We should improve the dropout method so it can handle these different cases more elegantly.

tsalo commented 2 months ago

I might be misremembering/misunderstanding @handwerkerd's proposed ratio method, but I believe it was something like, if X% of echoes before the last good echo are bad, then set the adaptive mask value to the second-to-last good echo (and probably keep doing that until the preceding echoes are >% good).

tsalo commented 2 months ago

What about using 50% as a threshold? If >50% of echoes up to the last good echo are bad, then we go to the last good echo before that and reevaluate.

For example, given a vector of values like False, True, False, True, False, False, True, False, we'd initially have an adaptive mask value of 7 (the last True). However, there are 4 bad echoes and 3 good echoes (including that last good one), which is >50%, so we look to the last good echo before that (echo 4). With echo 4, there are 2 bad echoes and 2 good echoes, which is =50%, so we would go with a final adaptive mask value of 4 for that voxel.