PSFKing¶
-
class
gammapy.irf.
PSFKing
(energy_lo, energy_hi, offset, gamma, sigma, energy_thresh_lo=<Quantity 0.1 TeV>, energy_thresh_hi=<Quantity 100. TeV>)[source]¶ Bases:
object
King profile analytical PSF depending on energy and offset.
This PSF parametrisation and FITS data format is described here: psf_king.
Parameters: energy_lo :
Quantity
Lower energy boundary of the energy bin.
energy_hi :
Quantity
Upper energy boundary of the energy bin.
offset :
Angle
Offset nodes (1D)
gamma :
ndarray
PSF parameter (2D)
sigma :
Angle
PSF parameter (2D)
Methods Summary
evaluate
([energy, offset])Evaluate analytic PSF parameters at a given energy and offset. evaluate_direct
(r, gamma, sigma)Evaluate the PSF model. from_table
(table)Create PSFKing
fromTable
.info
()Print some basic info. read
(filename[, hdu])Create PSFKing
from FITS file.to_energy_dependent_table_psf
([theta, rad, …])Convert to energy-dependent table PSF. to_fits
()Convert PSF table data to FITS HDU list. write
(filename, *args, **kwargs)Write PSF to FITS file. Methods Documentation
-
evaluate
(energy=None, offset=None)[source]¶ Evaluate analytic PSF parameters at a given energy and offset.
Uses nearest-neighbor interpolation.
Parameters: energy :
Quantity
energy value
offset :
Angle
Offset in the field of view
Returns: values :
Quantity
Interpolated value
-
static
evaluate_direct
(r, gamma, sigma)[source]¶ Evaluate the PSF model.
Formula is given here: psf_king.
Parameters: r :
Angle
Offset from PSF center used for evaluating the PSF on a grid
gamma :
Quantity
model parameter, no unit
sigma :
Angle
model parameter
Returns: psf_value :
Quantity
PSF value
-
classmethod
read
(filename, hdu=1)[source]¶ Create
PSFKing
from FITS file.Parameters: filename : str
File name
-
to_energy_dependent_table_psf
(theta=None, rad=None, exposure=None)[source]¶ Convert to energy-dependent table PSF.
Parameters: theta :
Angle
Offset in the field of view. Default theta = 0 deg
rad :
Angle
Offset from PSF center used for evaluating the PSF on a grid. Default offset = [0, 0.005, …, 1.495, 1.5] deg.
exposure :
Quantity
Energy dependent exposure. Should be in units equivalent to ‘cm^2 s’. Default exposure = 1.
Returns: table_psf :
EnergyDependentTablePSF
Energy-dependent PSF
-