MoCompletenessMetric¶
- class rubin_sim.maf.metrics.MoCompletenessMetric(threshold=1, nbins=20, min_hrange=1.0, cumulative=None, hindex=0.33, **kwargs)¶
Bases:
BaseMoMetric
Calculate the fraction of the population that meets
threshold
value or higher. This is equivalent to calculating the completeness (relative to the entire population) given the output of a Discovery_N_Chances metric, or the fraction of the population that meets a given cutoff value for Color determination metrics.Any moving object metric that outputs a float value can thus have the ‘fraction of the population’ with greater than X value calculated here, as a summary statistic.
- Parameters:
- threshold
int
, optional Count the fraction of the population that exceeds this value. Default = 1.
- nbins
int
, optional If the H values for the metric are not a cloned distribution, then split up H into this many bins. Default 20.
- min_hrange
float
, optional If the H values for the metric are not a cloned distribution, then split up H into at least this range (otherwise just use the min/max of the H values). Default 1.0
- cumulative
bool
, optional If False, simply report the differential fractional value (or differential completeness). If True, integrate over the H distribution (using IntegrateOverH) to report a cumulative fraction. Default None which becomes True; if metric_name is set and starts with ‘Differential’ this will then set to False.
- hindex
float
, optional Use hindex as the power law to integrate over H, if cumulative is True. Default 0.3.
- threshold
Methods Summary
run
(metric_values, h_vals)Calculate the metric value.
Methods Documentation
- run(metric_values, h_vals)¶
Calculate the metric value.
- Parameters:
- sso_obs: np.ndarray
The input data to the metric (same as the parent metric).
- orb: np.ndarray
The information about the orbit for which the metric is being calculated.
- hvalfloat
The H value for which the metric is being calculated.
- Returns:
- float or np.ndarray or dict