TdcMetric

class rubin_sim.maf.metrics.TdcMetric(mjd_col='observationStartMJD', night_col='night', filter_col='filter', m5_col='fiveSigmaDepth', mag_cuts=None, metric_name='TDC', cad_norm=3.0, sea_norm=4.0, camp_norm=5.0, badval=-999, **kwargs)

Bases: BaseMetric

Calculate the Time Delay Challenge metric, as described in Liao et al 2015 (https://arxiv.org/pdf/1409.1254.pdf).

This combines the MeanCampaignFrequency/MeanNightSeparation, the SeasonLength, and the CampaignLength metrics above, but rewritten to calculate season information only once.

cad_norm = in units of days sea_norm = in units of months camp_norm = in units of years

This metric also adds a requirement to achieve limiting magnitudes after galactic dust extinction, in various bandpasses, in order to exclude visits which are not useful for detecting quasars (due to being short or having high sky brightness, etc.) and to reject regions with high galactic dust extinction.

Parameters:
mjd_col: str, optional

Column name for mjd. Default observationStartMJD.

night_col: str, optional

Column name for night. Default night.

filter_col: str, optional

Column name for filter. Default filter.

m5_col: str, optional

Column name for five-sigma depth. Default fiveSigmaDepth.

mag_cuts: dict, optional

Dictionary with filtername:mag limit (after dust extinction). Default None in kwarg. Defaults set within metric: {‘u’: 22.7, ‘g’: 24.1, ‘r’: 23.7, ‘i’: 23.1, ‘z’: 22.2, ‘y’: 21.4}

metricName: str, optional

Metric Name. Default TDC.

cad_norm: float, optional

Cadence normalization constant, in units of days. Default 3.

sea_norm: float, optional

Season normalization constant, in units of months. Default 4.

camp_norm: float, optional

Campaign length normalization constant, in units of years. Default 5.

badval: float, optional

Return this value instead of the dictionary for bad points.

Returns:
dictionary

Dictionary of values for {‘rate’, ‘precision’, ‘accuracy’} at this point in the sky.

Methods Summary

reduce_accuracy(metric_value)

reduce_cadence(metric_value)

reduce_campaign(metric_value)

reduce_precision(metric_value)

reduce_rate(metric_value)

reduce_season(metric_value)

run(data_slice, slice_point)

Calculate metric values.

Methods Documentation

reduce_accuracy(metric_value)
reduce_cadence(metric_value)
reduce_campaign(metric_value)
reduce_precision(metric_value)
reduce_rate(metric_value)
reduce_season(metric_value)
run(data_slice, slice_point)

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.