Background2D¶
-
class
gammapy.irf.Background2D(energy_lo, energy_hi, offset_lo, offset_hi, data, meta=None, interp_kwargs=None)[source]¶ Bases:
objectBackground 2D.
Data format specification: bkg_2d
Parameters: energy_lo, energy_hi :
QuantityEnergy binning
offset_lo, offset_hi :
QuantityFOV coordinate offset-axis binning
data :
QuantityBackground rate (usually:
s^-1 MeV^-1 sr^-1)Attributes Summary
default_interp_kwargsDefault Interpolation kwargs for NDDataArray.Methods Summary
evaluate(fov_offset[, fov_phi, energy_reco])Evaluate the Background2Dat a given offset and energy.from_hdulist(hdulist[, hdu])Create from HDUList.from_table(table)Read from Table.read(filename[, hdu])Read from file. to_fits([name])Convert to BinTable.to_table()Convert to Table.Attributes Documentation
-
default_interp_kwargs= {'bounds_error': False, 'fill_value': None}¶ Default Interpolation kwargs for
NDDataArray. Extrapolate.
Methods Documentation
-
evaluate(fov_offset, fov_phi=None, energy_reco=None, **kwargs)[source]¶ Evaluate the
Background2Dat a given offset and energy.Parameters: fov_offset :
AngleOffset in the FOV
fov_phi: `~astropy.coordinates.Angle`
Azimuth angle in the FOV. Not used for this class since the background model is radially symmetric
energy_reco :
QuantityReconstructed energy
kwargs : dict
option for interpolation for
RegularGridInterpolatorReturns: array :
QuantityInterpolated values, axis order is the same as for the NDData array
-