tedana.decay.fit_decay_ts

fit_decay_ts(data, tes, adaptive_mask, fittype, n_threads=1)[source]

Fit voxel- and timepoint-wise monoexponential decay models to data.

Parameters:
  • data ((Md x E x T) array_like) – Multi-echo data array, where Md is samples in denoising mask, E is echos, and T is time.

  • tes ((E,) list) – Echo times

  • adaptive_mask ((Md,) 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 (:obj: str) – The type of model fit to use

  • 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 ((Md x T) 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 ((Md x T) 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.

  • failures ((Md x T) numpy.ndarray or None) – Boolean array indicating samples that failed to fit the model. None if fittype is not “curvefit”.

  • t2s_var ((Md x T) numpy.ndarray or None) – Variance of the T2* estimates. None if fittype is not “curvefit”.

  • s0_var ((Md x T) numpy.ndarray or None) – Variance of the S0 estimates. None if fittype is not “curvefit”.

  • t2s_s0_covar ((Md x T) numpy.ndarray or None) – Covariance of the T2* and S0 estimates. None if fittype is not “curvefit”.

See also

tedana.utils.make_adaptive_mask()

The function used to create the adaptive_mask parameter.