sum_over_h¶
- rubin_sim.maf.metrics.sum_over_h(metric_values, hvalues, dndh_func=<function power_law_dndh>, **kwargs)¶
Calculate the sum of the metric value multiplied by the number of objects at each H value. This is equivalent to calculating the number of objects meeting X requirement in the differential completeness or fraction of objects with lightcurves, etc.
- Parameters:
- metric_values
numpy.ndarray
The metric values at each H value.
- hvalues
numpy.ndarray
The H values corresponding to each metricValue (must be the same length).
- dndh_funcfunction, optional
One of the dN/dH functions defined below. Default is a simple power law.
- **kwargs
dict
, optional Keyword arguments to pass to dndh_func
- metric_values
- Returns:
- sum_vals
numpy.ndarray
The cumulative metric values.
- sum_vals