tedana.selection.selection_utils.confirm_metrics_exist
- confirm_metrics_exist(component_table: DataFrame, necessary_metrics: List[str], function_name: str | None = None) None | bool[source]
Confirm that all metrics in necessary_metrics are in component_table.
- Parameters:
component_table ((C x M)
pandas.DataFrame) – Component metric table. One row for each component, with a column for each metric. The index should be the component number.necessary_metrics (
list[str]) – A list of strings of metric names.function_name (
str) – Text identifying the function name that called this function.
- Returns:
metrics_are_missing (
bool) – If there are no metrics missing, this returns True.- Raises:
ValueError – If
metrics_existis False then raise an error and end the program.
Notes
This doesn’t check if there are data in each metric’s column, just that the columns exist. Also, the string in
necessary_metricsand the column labels incomponent_tablewill only be matched if they’re identical.