create_energy_dispersion_hdu
- pyirf.io.create_energy_dispersion_hdu(energy_dispersion, true_energy_bins, migration_bins, fov_offset_bins, point_like=True, extname='EDISP', **header_cards)[source]
Create a fits binary table HDU in GADF format for the energy dispersion. See the specification at https://gamma-astro-data-formats.readthedocs.io/en/latest/irfs/full_enclosure/edisp/index.html
- Parameters:
- energy_dispersion: numpy.ndarray
Energy dispersion array, must have shape (n_energy_bins, n_migra_bins, n_source_offset_bins)
- true_energy_bins: astropy.units.Quantity[energy]
Bin edges in true energy
- migration_bins: numpy.ndarray
Bin edges for the relative energy migration (
reco_energy / true_energy
)- 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.
- point_like: bool
If the provided effective area was calculated after applying a direction cut, pass
True
, elseFalse
for a full-enclosure effective area.- extname: str
Name for BinTableHDU
- **header_cards
Additional metadata to add to the header, use this to set e.g. TELESCOP or INSTRUME.