estimate_background

pyirf.sensitivity.estimate_background(events, reco_energy_bins, theta_cuts, alpha, fov_offset_min, fov_offset_max)[source]

Estimate the number of background events for a point-like sensitivity.

Due to limited statistics, it is often not possible to just apply the same theta cut to the background events as to the signal events around an assumed source position.

Here we calculate the expected number of background events for the off regions by taking all background events between fov_offset_min and fov_offset_max from the camera center and then scale these to the size of the off region, which is scaled by 1 / alpha from the size of the on region given by the theta cuts.

Parameters:
events: astropy.table.QTable

DL2 event list of background surviving event selection and inside fov_offset_max from the center of the FOV Required columns for this function: - reco_energy, - reco_source_fov_offset.

reco_energy_bins: astropy.units.Quantity[energy]

Desired bin edges in reconstructed energy for the background rate

theta_cuts: astropy.table.QTable

The cuts table for the theta cut, e.g. as returned by ~pyirf.cuts.calculate_percentile_cut. Columns center and cut are required for this function.

alpha: float

size of the on region divided by the size of the off region.

fov_offset_min: astropy.units.Quantity[angle]

Minimum distance from the fov center for background events to be taken into account

fov_offset_max: astropy.units.Quantity[angle]

Maximum distance from the fov center for background events to be taken into account