tedana.decay
.fit_decay
- fit_decay(data, tes, mask, adaptive_mask, fittype, report=True)[source]
Fit voxel-wise monoexponential decay models to
data
.- Parameters:
data ((S x E [x T]) array_like) – Multi-echo data array, where S is samples, E is echos, and T is time
tes ((E,)
list
) – Echo timesmask ((S,) array_like) – Boolean array indicating samples that are consistently (i.e., across time AND echoes) non-zero
adaptive_mask ((S,) array_like) – Array where each value indicates the number of echoes with good signal for that voxel. This mask may be thresholded; for example, with values less than 3 set to 0. For more information on thresholding, see make_adaptive_mask.
fittype ({loglin, curvefit}) – The type of model fit to use
report (bool, optional) – Whether to log a description of this step or not. Default is True.
- Returns:
t2s_limited ((S,)
numpy.ndarray
) – Limited T2* map. The limited map only keeps the T2* values for data where there are at least two echos with good signal.s0_limited ((S,)
numpy.ndarray
) – Limited S0 map. The limited map only keeps the S0 values for data where there are at least two echos with good signal.t2s_full ((S,)
numpy.ndarray
) – Full T2* map. For voxels affected by dropout, with good signal from only one echo, the full map uses the T2* estimate from the first two echoes.s0_full ((S,)
numpy.ndarray
) – Full S0 map. For voxels affected by dropout, with good signal from only one echo, the full map uses the S0 estimate from the first two echoes.
See also
- : func:tedana.utils.make_adaptive_maskThe function used to create the
adaptive_mask
parameter.
Notes
This function replaces infinite values in the map with 500 and values less than or equal to zero with 1. Additionally, very small values above zero are replaced with a floor value to prevent zero-division errors later on in the workflow. It also replaces NaN values in the map with 0.