NVisitsPerNightMetric¶
- class rubin_sim.maf.metrics.NVisitsPerNightMetric(night_col='night', bins=array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]), units='#', **kwargs)¶
Bases:
BaseMetric
Histogram the number of visits in each night.
Splits the visits by night, then histograms how many visits occur in each night.
- Parameters:
- night_col
str
, optional The column name for the night of each observation. Default ‘night’.
- bins
np.ndarray
, optional The bins to use for the histogram of time gaps (in days, or same units as timesCol). Default values are bins from 0 to 5 visits, in steps of 1.
- night_col
- Returns:
- histogram
np.ndarray
Returns a histogram of the number of visits per night at each slice point; these histograms can be combined and plotted using the ‘SummaryHistogram plotter’.
- histogram
Methods Summary
run
(data_slice[, slice_point])Calculate metric values.
Methods Documentation
- run(data_slice, slice_point=None)¶
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: