RecoPSFMap#

class gammapy.irf.RecoPSFMap[source]#

Bases: PSFMap

Class containing the Map of PSFs in reconstructed energy and allowing to interact with it.

Parameters:
psf_mapMap

the input PSF Map. Should be a Map with 2 non spatial axes. rad and energy axes should be given in this specific order.

exposure_mapMap

Associated exposure map. Needs to have a consistent map geometry.

Attributes Summary

Methods Summary

containment(rad, energy[, position])

Containment at given coordinates.

containment_radius(fraction, energy[, position])

Containment at given coordinates.

containment_radius_map(energy[, fraction])

Containment radius map.

from_gauss(energy_axis[, rad_axis, sigma, geom])

Create all -sky PSF map from Gaussian width.

plot_psf_vs_rad([ax, energy])

Plot PSF vs radius.

stack(other[, weights, nan_to_num])

Stack IRF map with another one in place.

Attributes Documentation

energy_name#
required_axes = ['rad', 'energy']#
tag = 'psf_map_reco'#

Methods Documentation

containment(rad, energy, position=None)[source]#

Containment at given coordinates.

Parameters:
radQuantity

Rad value.

energyQuantity

Energy value.

positionSkyCoord, optional

Sky position. By default, the center of the map is chosen.

Returns:
containmentQuantity

Containment values.

containment_radius(fraction, energy, position=None)[source]#

Containment at given coordinates.

Parameters:
fractionfloat

Containment fraction.

energyQuantity

Energy value.

positionSkyCoord, optional

Sky position. By default, the center of the map is chosen.

Returns:
containmentQuantity

Containment values.

containment_radius_map(energy, fraction=0.68)[source]#

Containment radius map.

Parameters:
energyQuantity

Energy at which to compute the containment radius

fractionfloat, optional

Containment fraction (range: 0 to 1). Default is 0.68.

Returns:
containment_radius_mapMap

Containment radius map.

classmethod from_gauss(energy_axis, rad_axis=None, sigma=<Quantity 0.1 deg>, geom=None)[source]#

Create all -sky PSF map from Gaussian width.

This is used for testing and examples.

The width can be the same for all energies or be an array with one value per energy node. It does not depend on position.

Parameters:
energy_axisMapAxis

Energy axis.

rad_axisMapAxis

Offset angle wrt source position axis.

sigmaAngle

Gaussian width.

geomGeom

Image geometry. By default, an all-sky geometry is created.

Returns:
psf_mapPSFMap

Point spread function map.

plot_psf_vs_rad(ax=None, energy=<Quantity [ 0.1, 1., 10. ] TeV>, **kwargs)[source]#

Plot PSF vs radius.

The method plots the profile at the center of the map.

Parameters:
axAxes, optional

Matplotlib axes. Default is None.

energyQuantity, optional

Energies where to plot the PSF. Default is [0.1, 1, 10] TeV.

**kwargsdict

Keyword arguments pass to plot.

Returns:
axAxes

Matplotlib axes.

stack(other, weights=None, nan_to_num=True)[source]#

Stack IRF map with another one in place.

__init__(psf_map, exposure_map=None)#
classmethod __new__(*args, **kwargs)#