Background3D¶
-
class
gammapy.irf.
Background3D
(energy_lo, energy_hi, detx_lo, detx_hi, dety_lo, dety_hi, data, meta=None, interp_kwargs=None)[source]¶ Bases:
object
Background 3D.
Data format specification: bkg_3d
Parameters: energy_lo, energy_hi :
Quantity
Energy binning
detx_lo, detx_hi :
Quantity
FOV coordinate X-axis binning
dety_lo, dety_hi :
Quantity
FOV coordinate Y-axis binning
data :
Quantity
Background rate (usually:
s^-1 MeV^-1 sr^-1
)Examples
Here’s an example you can use to learn about this class:
>>> from gammapy.irf import Background3D >>> filename = '$GAMMAPY_EXTRA/datasets/cta-1dc/caldb/data/cta//1dc/bcf/South_z20_50h/irf_file.fits' >>> bkg_3d = Background3D.read(filename, hdu='BACKGROUND') >>> print(bkg_3d) Background3D NDDataArray summary info energy : size = 21, min = 0.016 TeV, max = 158.489 TeV detx : size = 36, min = -5.833 deg, max = 5.833 deg dety : size = 36, min = -5.833 deg, max = 5.833 deg Data : size = 27216, min = 0.000 1 / (MeV s sr), max = 0.421 1 / (MeV s sr)
Attributes Summary
default_interp_kwargs
Default Interpolation kwargs for NDDataArray
.Methods Summary
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
-