class rubin_sim.maf.metrics.NRevisitsMetric(mjd_col='observationStartMJD', d_t=30.0, normed=False, metric_name=None, **kwargs)

Bases: BaseMetric

Calculate the number of consecutive visits with time differences less than d_t.

d_tfloat, optional

The time interval to consider (in minutes). Default 30.

normedbool, optional

Flag to indicate whether to return the total number of consecutive visits with time differences less than d_t (False), or the fraction of overall visits (True). Note that we would expect (if all visits occur in pairs within d_t) this fraction would be 0.5!

Methods Summary

run(data_slice[, slice_point])

Calculate metric values.

Methods Documentation

run(data_slice, slice_point=None)

Calculate metric values.


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.

metricValue: int float or object

The metric value at each slice_point.