uvex_transients.surveys.base.SurveySchedule.compute_pair_counts#

SurveySchedule.compute_pair_counts(timescale: Quantity, minimum_factor: float | None = None, maximum_factor: float | None = None, start_time: Time | None = None, end_time: Time | None = None, nside: int | None = None, order: str | None = None, pairs: str = 'all') → tuple[ndarray, Quantity][source]#

Compute per-pixel counts of visit pairs bracketing a transient timescale.

For each HEALPix pixel, counts the number of observation pairs separated by

minimum_factor * timescale <= dt <= maximum_factor * timescale,

i.e. pairs of visits able to catch a timescale-timescale transient rising and/or fading – either over every unique pair of visits to that pixel (pairs='all') or only over pairs of temporally-adjacent visits (pairs='consecutive'). This is the same idea as LSST/Rubin’s pair-count cadence metrics (e.g. rubin_sim.maf.metrics.PairMetric, used to assess sensitivity to kilonova- and fast-transient-like timescales): a cheap proxy for “can this survey’s cadence constrain a timescale-T transient here?” that avoids the interval-union bookkeeping (and per-pixel, per-timescale cost) of an exact control-time calculation.

Built on compute_visit_times() and _pixel_pair_count() / _pixel_pair_count_consecutive() rather than compute_cadence_time_differences(), so cost scales as O(n log n) in the number of visits to each pixel rather than O(n^2) – important for a survey that covers the whole sky many times over, where a given pixel’s total visit count (and hence its number of all pairs) grows with the number of repeated full-sky passes.

Parameters:
  • timescale (Quantity) – Characteristic transient timescale.

  • minimum_factor (float, optional) – Bounds of the qualifying pair-separation window, relative to timescale. Either may be None (the default) to use config["surveys.cadence.minimum_factor"]/ config["surveys.cadence.maximum_factor"].

  • maximum_factor (float, optional) – Bounds of the qualifying pair-separation window, relative to timescale. Either may be None (the default) to use config["surveys.cadence.minimum_factor"]/ config["surveys.cadence.maximum_factor"].

  • start_time (Time, optional) – Optional survey interval to restrict the calculation to.

  • end_time (Time, optional) – Optional survey interval to restrict the calculation to.

  • nside (int, optional) – HEALPix resolution parameter, or None to use config["healpix.default_nside"].

  • order (str, optional) – HEALPix ordering scheme, either "nested" or "ring", or None to use config["healpix.default_order"].

  • pairs (str) – Which pairs of observations to include: "all" for every unique pair, or "consecutive" for only pairs of temporally-adjacent visits.

Returns:

  • pair_counts (numpy.ndarray) – Full-sky HEALPix map of qualifying pair counts, shape (12 * nside**2,).

  • sensitive_area (Quantity) – Total solid angle of pixels with at least one qualifying pair – the area of sky with any cadence sensitivity to this timescale.