PeriodDeviationMetric

class rubin_sim.maf.maf_contrib.PeriodDeviationMetric(col='observationStartMJD', period_min=3.0, period_max=35.0, n_periods=5, mean_mag=21.0, amplitude=1.0, metric_name='Period Deviation', period_check=None, **kwargs)

Bases: BaseMetric

Measure the percentage deviation of recovered periods for pure sine wave variability (in magnitude).

Methods Summary

reduce_p_dev(metric_val)

At a particular slice_point, return the period deviation for self.period_check.

reduce_worst_p_dev(metric_val)

At each slice_point, return the largest period deviation.

reduce_worst_period(metric_val)

At each slice_point, return the period with the worst period deviation.

run(data_slice[, slice_point])

Run the PeriodDeviationMetric :param data_slice : Data for this slice.

Methods Documentation

reduce_p_dev(metric_val)

At a particular slice_point, return the period deviation for self.period_check. If self.period_check is None, just return a random period in the range.

reduce_worst_p_dev(metric_val)

At each slice_point, return the largest period deviation.

reduce_worst_period(metric_val)

At each slice_point, return the period with the worst period deviation.

run(data_slice, slice_point=None)

Run the PeriodDeviationMetric :param data_slice : Data for this slice. :param slice_point: Metadata for the slice. (optional) :return: The error in the period estimated from a Lomb-Scargle periodogram