EnergyDependentTablePSF¶
-
class
gammapy.irf.
EnergyDependentTablePSF
(energy_axis_true, rad_axis, exposure=None, psf_value=None, interp_kwargs=None)[source]¶ Bases:
object
Energy-dependent radially-symmetric table PSF (
gtpsf
format).TODO: add references and explanations.
- Parameters
Attributes Summary
Methods Summary
containment
(energy, rad_max)Compute containment of the PSF.
containment_radius
(energy[, fraction])Containment radius.
evaluate
([energy, rad, method])Evaluate the PSF at a given energy and offset
from_hdulist
(hdu_list)Create
EnergyDependentTablePSF
fromgtpsf
format HDU list.info
()Print basic info
plot_containment_vs_energy
([ax, fractions])Plot containment versus energy.
Plot exposure versus energy.
plot_psf_vs_rad
([energies, ax])Plot PSF vs radius.
read
(filename)Create
EnergyDependentTablePSF
fromgtpsf
-format FITS file.stack
(psf)Stack two EnergyDependentTablePSF objects.s
table_psf_at_energy
(energy[, method])Create
TablePSF
at one given energy.table_psf_in_energy_range
(energy_range[, …])Average PSF in a given energy band.
Convert to FITS HDU list format.
write
(filename, *args, **kwargs)Write to FITS file.
Attributes Documentation
-
energy_axis_true
¶
-
rad_axis
¶
Methods Documentation
-
evaluate
(energy=None, rad=None, method='linear')[source]¶ Evaluate the PSF at a given energy and offset
-
classmethod
from_hdulist
(hdu_list)[source]¶ Create
EnergyDependentTablePSF
fromgtpsf
format HDU list.- Parameters
- hdu_list
HDUList
HDU list with
THETA
andPSF
extensions.
- hdu_list
-
plot_containment_vs_energy
(ax=None, fractions=[0.68, 0.8, 0.95], **kwargs)[source]¶ Plot containment versus energy.
-
classmethod
read
(filename)[source]¶ Create
EnergyDependentTablePSF
fromgtpsf
-format FITS file.- Parameters
- filenamestr
File name
-
stack
(psf)[source]¶ Stack two EnergyDependentTablePSF objects.s
- Parameters
- psf
EnergyDependentTablePSF
PSF to stack.
- psf
- Returns
- stacked_psf
EnergyDependentTablePSF
Stacked PSF.
- stacked_psf
-
table_psf_at_energy
(energy, method='linear', **kwargs)[source]¶ Create
TablePSF
at one given energy.
-
table_psf_in_energy_range
(energy_range, spectrum=None, n_bins=11, **kwargs)[source]¶ Average PSF in a given energy band.
Expected counts in sub energy bands given the given exposure and spectrum are used as weights.
- Parameters
- energy_range
Quantity
Energy band
- spectrum
SpectralModel
Spectral model used for weighting the PSF. Default is a power law with index=2.
- n_binsint
Number of energy points in the energy band, used to compute the weigthed PSF.
- energy_range
- Returns
- psf
TablePSF
Table PSF
- psf