tedana.selection.selection_utils.confirm_metrics_exist
- confirm_metrics_exist(component_table, necessary_metrics, function_name=None)[source]
Confirm that all metrics declared in necessary_metrics are already included in comptable.
- 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
) – A list of strings of metric names.function_name (
str
) – Text identifying the function name that called this function.
- Raises:
ValueError – If
metrics_exist
is 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_metrics
and the column labels incomponent_table
will only be matched if they’re identical.