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 (
set
) – A set of strings of metric namesfunction_name (
str
) – Text identifying the function name that called this function
- Returns:
metrics_exist (
bool
) – True if all metrics in necessary_metrics are in component_table- Raises:
ValueError – If metrics_exist is False then raise an error and end the program
Note
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 in component_table will only be matched if they’re identical.