YearCoverageMetric¶
- class rubin_sim.maf.metrics.YearCoverageMetric(night_col='night', bins=None, units=None, **kwargs)¶
Bases:
BaseMetric
Count the number of bins covered by night_col – default bins are ‘years’. Handy for checking that a point on the sky gets observed every year, as the default settings result in the metric returning the number years in the data_slice (when used with a HealpixSlicer).
- Parameters:
- night_col: str, optional
Data column to histogram. Default ‘night’.
- bins: numpy.ndarray, optional
Bins to use in the histogram. Default corresponds to years 0-10 (with 365.25 nights per year).
- units: str, optional
Units to use for the metric result. Default ‘N years’.
- Returns:
- integer
Number of histogram bins where the histogram value is greater than 0. Typically this will be the number of years in the ‘night_col’.
Methods Summary
run
(data_slice, slice_point)Calculate metric values.
Methods Documentation
- run(data_slice, slice_point)¶
Calculate metric values.
- Parameters:
- data_slice
numpy.recarray
Values passed to metric by the slicer, which the metric will use to calculate metric values at each slice_point.
- slice_point
dict
or None Dictionary of slice_point metadata passed to each metric. E.g. the ra/dec of the healpix pixel or opsim fieldId.
- data_slice
- Returns: