tedana.decay.fit_loglinear

fit_loglinear(data_cat, echo_times, adaptive_mask, report=True)[source]

Fit monoexponential decay model with log-linear regression.

The monoexponential decay function is fitted to all values for a given voxel across TRs, per TE, to estimate voxel-wise S_0 and T_2^*. At a given voxel, only those echoes with “good signal”, as indicated by the value of the voxel in the adaptive mask, are used. Therefore, for a voxel with an adaptive mask value of five, the first five echoes would be used to estimate T2* and S0.

Parameters:
  • data_cat ((Md x E x T) numpy.ndarray) – Multi-echo data. Md is samples in denoising mask, E is echoes, and T is timepoints.

  • echo_times ((E,) array_like) – Echo times in milliseconds.

  • adaptive_mask ((Md,) numpy.ndarray) – 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.

  • report (bool, optional) – Whether to log a description of this step or not. Default is True.

Returns:

t2s, s0 ((Md,) numpy.ndarray) – “Full” T2* and S0 maps without floors or ceilings applied. This includes T2* and S0 estimates for all voxels with adaptive mask >= 1. Voxels with adaptive mask == 1 have T2* and S0 estimates from the first two echoes.

Notes

The approach used in this function involves transforming the raw signal values (log(|data| + 1)) and then fitting a line to the transformed data using ordinary least squares. This results in two parameter estimates: one for the slope and one for the intercept. The slope estimate is inverted (i.e., 1 / slope) to get T_2^*, while the intercept estimate is exponentiated (i.e., e^intercept) to get S_0.

This method is faster, but less accurate, than the nonlinear approach.