PhaseGapMetric

class rubin_sim.maf.metrics.PhaseGapMetric(col='observationStartMJD', n_periods=5, period_min=3.0, period_max=35.0, n_visits_min=3, metric_name='Phase Gap', **kwargs)

Bases: BaseMetric

Measure the maximum gap in phase coverage for observations of periodic variables.

Parameters:
col: str, optional

Name of the column to use for the observation times (MJD)

n_periods: int, optional

Number of periods to test

period_min: float, optional

Minimum period to test, in days.

period_max: float, optional

Maximum period to test, in days

n_visits_min: int, optional

Minimum number of visits necessary before looking for the phase gap.

Methods Summary

reduce_largest_gap(metric_val)

At each slice_point, return the largest phase gap value.

reduce_mean_gap(metric_val)

At each slice_point, return the mean gap value.

reduce_median_gap(metric_val)

At each slice_point, return the median gap value.

reduce_worst_period(metric_val)

At each slice_point, return the period with the largest phase gap.

run(data_slice[, slice_point])

Calculate metric values.

Methods Documentation

reduce_largest_gap(metric_val)

At each slice_point, return the largest phase gap value.

reduce_mean_gap(metric_val)

At each slice_point, return the mean gap value.

reduce_median_gap(metric_val)

At each slice_point, return the median gap value.

reduce_worst_period(metric_val)

At each slice_point, return the period with the largest phase gap.

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.