MoMetricBundle

class rubin_sim.maf.metric_bundles.MoMetricBundle(metric, slicer, constraint=None, stacker_list=None, run_name='run name', info_label=None, file_root=None, plot_dict=None, plot_funcs=None, display_dict=None, child_metrics=None, summary_metrics=None)

Bases: MetricBundle

Methods Summary

compute_summary_stats([results_db])

Compute summary statistics on metric_values, using summaryMetrics, for self and child bundles.

reduce_metric(reduce_func[, ...])

Run 'reduceFunc' (any function that operates on self.metric_values).

set_child_bundles([child_metrics])

Identify any child metrics to be run on this (parent) bundle.

Methods Documentation

compute_summary_stats(results_db=None)

Compute summary statistics on metric_values, using summaryMetrics, for self and child bundles.

reduce_metric(reduce_func, reduce_plot_dict=None, reduce_display_dict=None)

Run ‘reduceFunc’ (any function that operates on self.metric_values). Typically reduceFunc will be the metric reduce functions, as they are tailored to expect the metric_values format. reduceDisplayDict and reducePlotDicts are displayDicts and plotDicts to be applied to the new metricBundle.

Parameters:
reduce_funcFunc

Any function that will operate on self.metric_values (typically metric.reduce* function).

reduce_plot_dictOptional[dict]

Plot dictionary for the results of the reduce function.

reduce_display_dictOptional[dict]

Display dictionary for the results of the reduce function.

Returns:
MetricBundle

New metric bundle, inheriting info_label from this metric bundle, but containing the new metric values calculated with the ‘reduceFunc’.

set_child_bundles(child_metrics=None)

Identify any child metrics to be run on this (parent) bundle. and create the new metric bundles that will hold the child values, linking to this bundle. Remove the summaryMetrics from self afterwards.