tedana.decay.fit_monoexponential
- fit_monoexponential(data_cat, echo_times, adaptive_mask, report=True, n_threads=1, t2s_initial=None, s0_initial=None, voxels_to_refit=None)[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 seconds.
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.
t2s_initial ((Md,)
numpy.ndarrayor None, optional) – Initial T2* estimates to use instead of log-linear fit. Default is None.s0_initial ((Md,)
numpy.ndarrayor None, optional) – Initial S0 estimates to use instead of log-linear fit. Default is None.voxels_to_refit ((Md,)
numpy.ndarrayor None, optional) – Boolean array indicating which voxels to refit. If None, all voxels are fitted. Voxels not in this mask retain their initial values and are not marked as failures.
- 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_maskparameter.
Notes
This method is slower, but more accurate, than the log-linear approach.