NightgapsMetric¶
- class rubin_sim.maf.metrics.NightgapsMetric(night_col='night', all_gaps=False, bins=array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]), units='nights', **kwargs)¶
Bases:
BaseMetric
Histogram the number of nights between observations.
Measure the gaps between observations. By default, only gaps between neighboring visits are computed. If all_gaps is set to true, all gaps are computed (i.e., if there are observations at 10, 20, 30 and 40 the default will histogram [10,10,10] while all_gaps histograms [10,10,10,20,20,30])
- Parameters:
- night_col
str
, optional The column name for the night of each observation. Default ‘night’.
- all_gaps
bool
, optional Histogram the gaps between all observations (True) or just successive observations (False)? Default is False. If all gaps are used, this metric can become significantly slower.
- 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 10 days, in 1 day intervals.
- night_col
- Returns:
- histogram
np.ndarray
Returns a histogram of the deltaT between nights 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: