TgapsMetric

class rubin_sim.maf.metrics.TgapsMetric(times_col='observationStartMJD', all_gaps=False, bins=array([0., 0.00347222, 0.00694444, 0.01041667, 0.01388889, 0.01736111, 0.02083333, 0.02430556, 0.02777778, 0.03125, 0.03472222, 0.03819444, 0.04166667, 0.04513889, 0.04861111, 0.05208333, 0.05555556, 0.05902778, 0.0625, 0.06597222, 0.06944444, 0.07291667, 0.07638889, 0.07986111]), units='days', **kwargs)

Bases: BaseMetric

Histogram the times of the gaps 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 return a histogram of [10,10,10] while all_gaps returns a histogram of [10,10,10,20,20,30])

Parameters:
times_colstr, optional

The column name for the exposure times. Values assumed to be in days. Default observationStartMJD.

all_gapsbool, 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.

binsnp.ndarray, optional

The bins to use for the histogram of time gaps (in days, or same units as times_col). Default values are bins from 0 to 2 hours, in 5 minute intervals.

Returns:
histogramnp.ndarray

Returns a histogram of the tgaps 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.