class rubin_sim.maf.metrics.PairFractionMetric(mjd_col='observationStartMJD', metric_name='PairFraction', min_gap=15.0, max_gap=90.0, **kwargs)

Bases: BaseMetric

What fraction of observations are part of a pair.

Note, an observation can be a member of more than one “pair”. For example, t=[0, 5, 30], all observations would be considered part of a pair because they all have an observation within the given window to pair with (the observation at t=30 pairs twice).

min_gapfloat, optional

Minimum time to consider something part of a pair (minutes). Default 15.

max_gapfloat, optional

Maximum time to consider something part of a pair (minutes). Default 90.

Methods Summary

run(data_slice[, slice_point])

Calculate metric values.

Methods Documentation

run(data_slice, slice_point=None)

Calculate metric values.

data_slicenumpy.ndarray, (N,)

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.