tedana.selection.selection_nodes.calc_median

calc_median(selector, decide_comps, metric_name, median_label, log_extra_info='', custom_node_label='', only_used_metrics=False)[source]

Calculate the median across components for the metric defined by metric_name.

Parameters:
  • selector (ComponentSelector) – If only_used_metrics is False, the updated selector is returned.

  • decide_comps (str or list[str]) – What classification(s) to operate on. using default or intermediate_classification labels. For example: decide_comps=’unclassified’ means to operate only on unclassified components. Use ‘all’ to include all components.

  • metric_name (str) – The name of a column in selector.component_table. The median of the values in this column will be calculated

  • median_label (str) – The median will be saved in “median_(median_label)”

  • log_extra_info (str) – Additional text to the information log. Default=””.

  • custom_node_label (str) – A short label to describe what happens in this step. If “” then a label is automatically generated. Default=””.

  • only_used_metrics (bool) – If True, only return the component_table metrics that would be used. Default=False.

Returns:

  • selector (ComponentSelector) – If only_used_metrics is False, the updated selector is returned.

  • used_metrics (set(str)) – If only_used_metrics is True, the names of the metrics used in the function are returned.