tedana.decay.fit_monoexponential

fit_monoexponential(data_cat, echo_times, adaptive_mask, report=True, n_threads=1)[source]

Fit monoexponential decay model with nonlinear curve-fitting.

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.

  • n_threads (int, optional) – Number of threads to use. Default is 1. If None or <= 0, uses the number of available CPU cores.

Returns:

  • t2s, s0 ((Md,) numpy.ndarray) – T2* and S0 estimate maps. These maps include T2*/S0 estimates for all voxels with adaptive mask >= 1. For voxels with adaptive mask == 1, the T2*/S0 estimates are from the first two echoes. These voxels should be replaced with zeros in the full T2*/S0 maps.

  • failures ((Md,) numpy.ndarray) – Boolean array indicating samples that failed to fit the model.

  • t2s_var ((Md,) numpy.ndarray) – Variance of the T2* estimates.

  • s0_var ((Md,) numpy.ndarray) – Variance of the S0 estimates.

  • t2s_s0_covar ((Md,) numpy.ndarray) – Covariance of the T2* and S0 estimates.

See also

tedana.utils.make_adaptive_mask()

The function used to create the adaptive_mask parameter.

Notes

This method is slower, but more accurate, than the log-linear approach.