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_colstr, optional

The column name for the night of each observation. Default ‘night’.

binsnp.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.

Returns:
histogramnp.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’.

Methods Summary

run(data_slice[, slice_point])

Calculate metric values.

Methods Documentation

run(data_slice, slice_point=None)

Calculate metric values.

Parameters:
data_slicenumpy.recarray

Values passed to metric by the slicer, which the metric will use to calculate metric values at each slice_point.

slice_pointdict or None

Dictionary of slice_point metadata passed to each metric. E.g. the ra/dec of the healpix pixel or opsim fieldId.

Returns:
metricValue: int float or object

The metric value at each slice_point.