RadMax2D#

class gammapy.irf.RadMax2D[source]#

Bases: IRF

2D Rad Max table.

This is not directly a IRF component but is needed as additional information for point-like IRF components when an energy or field of view dependent directional cut has been applied.

Data format specification: RAD_MAX_2D.

Parameters:
axeslist of MapAxis or MapAxes
Required axes (in the given order) are:
  • energy (reconstructed energy axis)

  • offset (field of view offset axis)

dataQuantity

Applied directional cut.

metadict

Metadata dictionary.

Attributes Summary

default_unit

is_fixed_rad_max

Return True if rad_max axes are flat.

required_axes

tag

Methods Summary

from_irf(irf)

Create a RadMax2D instance from another IRF component.

plot_rad_max_vs_energy([ax])

Plot rad max value against energy.

Attributes Documentation

default_unit = Unit("deg")#
is_fixed_rad_max#

Return True if rad_max axes are flat.

required_axes = ['energy', 'offset']#
tag = 'rad_max_2d'#

Methods Documentation

classmethod from_irf(irf)[source]#

Create a RadMax2D instance from another IRF component.

This reads the RAD_MAX metadata keyword from the IRF and creates a RadMax2D with a single bin in energy and offset using the ranges from the input IRF.

Parameters:
irfEffectiveAreaTable2D or EnergyDispersion2D

IRF instance from which to read the RAD_MAX and limit information.

Returns:
rad_maxRadMax2D

RadMax2D object with a single bin corresponding to the fixed RAD_MAX cut.

Notes

This assumes the true energy axis limits are also valid for the reconstructed energy limits.

plot_rad_max_vs_energy(ax=None, **kwargs)[source]#

Plot rad max value against energy.

Parameters:
axAxes, optional

Matplotlib axes. Default is None.

**kwargsdict

Keyword arguments passed to pcolormesh.

Returns:
axAxes

Matplotlib axes.

__init__(axes, data=0, unit='', is_pointlike=False, fov_alignment=FoVAlignment.RADEC, meta=None, interp_kwargs=None)#
classmethod __new__(*args, **kwargs)#