energy_dispersion
- pyirf.irf.energy_dispersion(selected_events, true_energy_bins, fov_offset_bins, migration_bins)[source]
Calculate energy dispersion for the given DL2 event list. Energy dispersion is defined as the probability of finding an event at a given relative deviation
(reco_energy / true_energy)
for a given true energy.- Parameters:
- selected_events: astropy.table.QTable
Table of the DL2 events. Required columns:
reco_energy
,true_energy
,true_source_fov_offset
.- true_energy_bins: astropy.units.Quantity[energy]
Bin edges in true energy
- migration_bins: astropy.units.Quantity[energy]
Bin edges in relative deviation, recommended range: [0.2, 5]
- fov_offset_bins: astropy.units.Quantity[angle]
Bin edges in the field of view offset. For Point-Like IRFs, only giving a single bin is appropriate.
- Returns:
- energy_dispersion: numpy.ndarray
Energy dispersion matrix with shape (n_true_energy_bins, n_migration_bins, n_fov_ofset_bins)