changed livetime to ontime in background.py
@@ -8,15 +8,16 @@ from ..maps import WcsNDMap
__all__ = ["make_map_background_irf"]
-def make_map_background_irf(pointing, livetime, bkg, geom, n_integration_bins=1):
+def make_map_background_irf(pointing, ontime, bkg, geom, n_integration_bins=1):
"""Compute background map from background IRFs.
Parameters
----------
pointing : `~astropy.coordinates.SkyCoord`
Pointing direction
- livetime : `~astropy.units.Quantity`
- Observation livetime
+ ontime : `~astropy.units.Quantity`
+ Observation ontime. i.e. not corrected for deadtime
+ see https://gamma-astro-data-formats.readthedocs.io/en/stable/irfs/full_enclosure/bkg/index.html#notes)
bkg : `~gammapy.irf.Background3D`
Background rate model
geom : `~gammapy.maps.WcsGeom`
@@ -55,7 +56,7 @@ def make_map_background_irf(pointing, livetime, bkg, geom, n_integration_bins=1)
)
d_omega = geom.solid_angle()
- data = (bkg_de * d_omega * livetime).to("").value
+ data = (bkg_de * d_omega * ontime).to("").value
return WcsNDMap(geom, data=data)
