ParametricPSF#
- class gammapy.irf.ParametricPSF[source]#
Bases:
PSF
Parametric PSF base class.
- Parameters:
- axeslist of
MapAxis
orMapAxes
Axes.
- datadict of
ndarray
orrecarray
Data.
- unitdict of str or
Unit
Unit.
- is_pointlikebool, optional
Whether the IRF is point-like. True for point-like IRFs, False for full-containment. Default is False.
- fov_alignment
FoVAlignment
, optional The orientation of the field of view coordinate system. Default is FoVAlignment.RADEC.
- metadict
Metadata dictionary.
- axeslist of
Attributes Summary
Quantity.
Map unit as a
Unit
.Methods Summary
containment
(rad, **kwargs)Containment of the PSF at given axes coordinates.
evaluate
(rad, **kwargs)Evaluate the PSF model.
evaluate_containment
(rad, **kwargs)evaluate_direct
(rad, **kwargs)evaluate_parameters
(energy_true, offset)Evaluate analytic PSF parameters at a given energy and offset.
from_table
(table[, format])Create parametric PSF from
Table
.is_allclose
(other[, rtol_axes, atol_axes])Compare two data IRFs for equivalency.
Normalize parametric PSF.
to_psf3d
([rad])Create a PSF3D from a parametric PSF.
to_table
([format])Convert PSF table data to table.
to_unit
(unit)Convert IRF to unit.
Attributes Documentation
- quantity#
Quantity.
- required_parameters#
Methods Documentation
- evaluate_parameters(energy_true, offset)[source]#
Evaluate analytic PSF parameters at a given energy and offset.
Uses nearest-neighbor interpolation.
- classmethod from_table(table, format='gadf-dl3')[source]#
Create parametric PSF from
Table
.- Parameters:
- table
Table
Table information.
- format{“gadf-dl3”}, optional
Format specification. Default is “gadf-dl3”.
- table
- Returns:
- psf
ParametricPSF
PSF class.
- psf
- is_allclose(other, rtol_axes=0.001, atol_axes=1e-06, **kwargs)[source]#
Compare two data IRFs for equivalency.
- Parameters:
- other
gammapy.irfs.ParametricPSF
The PSF to compare against.
- rtol_axesfloat, optional
Relative tolerance for the axis comparison. Default is 1e-3.
- atol_axesfloat, optional
Relative tolerance for the axis comparison. Default is 1e-6.
- **kwargsdict
Keywords passed to
numpy.allclose
.
- other
- Returns:
- is_allclosebool
Whether the IRF is all close.
- to_psf3d(rad=None)[source]#
Create a PSF3D from a parametric PSF.
It will be defined on the same energy and offset values than the input PSF.
- to_table(format='gadf-dl3')[source]#
Convert PSF table data to table.
- Parameters:
- format{“gadf-dl3”}
Format specification. Default is “gadf-dl3”.
- Returns:
- hdu_list
HDUList
PSF in HDU list format.
- hdu_list
- __init__(axes, data=0, unit='', is_pointlike=False, fov_alignment=FoVAlignment.RADEC, meta=None, interp_kwargs=None)#
- classmethod __new__(*args, **kwargs)#