tedana.metrics.collect.generate_metrics

generate_metrics(*, data_cat: ndarray[Any, dtype[_ScalarType_co]], data_optcom: ndarray[Any, dtype[_ScalarType_co]], mixing: ndarray[Any, dtype[_ScalarType_co]], adaptive_mask: ndarray[Any, dtype[_ScalarType_co]], tes: List[int] | List[float] | ndarray[Any, dtype[_ScalarType_co]], io_generator: OutputGenerator, label: str, external_regressors: DataFrame | None = None, external_regressor_config: List[Dict] | None = None, metrics: List[str] | None = None) Tuple[DataFrame, Dict][source]

Fit TE-dependence and -independence models to components.

Parameters:
  • data_cat ((S x E x T) array_like) – Input data, where S is samples, E is echos, and T is time

  • data_optcom ((S x T) array_like) – Optimally combined data

  • mixing ((T x C) array_like) – Mixing matrix for converting input data to component space, where C is components and T is the same as in data_cat

  • 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.

  • tes (list) – List of echo times associated with data_cat, in milliseconds

  • io_generator (tedana.io.OutputGenerator) – The output generator object for this workflow

  • label (str in [‘ICA’, ‘PCA’]) – The label for this metric generation type

  • external_regressors (None or pandas.DataFrame, optional) – External regressors (e.g., motion parameters, physiological noise) to correlate with ICA components. If None, no external regressor metrics will be calculated.

  • external_regressor_config (list[dic]t) – A list of dictionaries defining how to fit external regressors to component time series

  • metrics (list) – List of metrics to return

Returns:

  • comptable ((C x X) pandas.DataFrame) – Component metric table. One row for each component, with a column for each metric. The index is the component number.

  • external_regressor_config (dict) – Info describing the external regressors and method used for fitting and statistical tests (or None if none were inputed)