check_run_pair_validity#

gammapy.makers.utils.check_run_pair_validity(on_observations, off_observations, energy_range, zenith_tol=<Quantity 10. deg>, aeff_tol=0.1)[source]#

Validity check over a list of ON/OFF pairs.

Currently, supports only one OFF observation for each ON observation.

Checks for difference in zenith angle and effective area. Returns a summary table along with a flag if the match is sufficient within tolerance.

Parameters:
on_observationslist of Observation or Observations

The ON observations list.

off_observationslist of Observation or Observations

The OFF observation list.

energy_rangeMapAxis

The energy axis on which to check the effective area.

zenith_tolQuantity, optional

Zenith tolerance. Default is 10 deg.

aeff_tolfloat, optional

Effective-area fractional-deviation tolerance. Default is 0.1.

Returns:
tableQTable

Summary table. One row per pair, with columns obs_id, off_obs_id, zenith_on, zenith_off, delta_zenith, zenith_ok, aeff_max_frac_deviation and aeff_ok.