tedana
tedana copied to clipboard
A solution to the OFC signal over-masking and inconsistent adaptive mask threshold settings between t2smap.py and tedana.py
Summary
In the current version of t2smap.py (for generating optimally combined data), threshold=1 is set in the adaptive mask generation function, which seems working well to prevent the signals in prefrontal areas such as OFC from being masked out. But the current version of tedana.py still uses threshold=3, which still causes the issue of signal loss or being masked out in the prefrontal areas, due to the algorithm that requires at least 3 good echos of the data to judge good or bad PCA/ICA components. After a careful research on the codes, we found that the two mask variables, "mask" and "masksum" (indicating how many good echos within each voxel) could be set differently and twice since ME-ICA now is applied to the optimally combined data (so it should be generated as the same way as in t2smap) and the original ME data "catd" is just used to judge the components based on masksum and other factors.
So, tedana.py could be modified this way:
mask, masksum = utils.make_adaptive_mask(catd, mask=mask, getsum=True, threshold=1)
before calling data_oc = combine.make_optcom(catd, tes, masksum, t2s=t2s_full, combmode=combmode)
This modification will make it consistent in generating the data_oc (optimally combined data) as the same way as in t2smap.py
Then, after this, the adaptive mask function is called again by setting threshold=3, but mask is replaced by mask1 (mask 1 will not be used anymore)
mask1, masksum = utils.make_adaptive_mask(catd, mask=mask, getsum=True, threshold=3)
This kind of modification seems working well to prevent the signal loss or being masked out in the prefrontal areas. See the example figures here:
Before Modification:
After Modification: