Observation

class gammapy.data.Observation(obs_id=None, gti=None, pointing=None, aeff=None, edisp=None, psf=None, bkg=None, deadtime_fraction=0.0)[source]

Bases: object

In-memory observation.

Parameters
obs_idint

Observation ID as identifier

pointingSkyCoord

Pointing position in icrs coordinates

aeffEffectiveAreaTable2D

Effective area used for simulating the observation

edispEnergyDispersion2D

Energy dispersion IRF for simulating the observation

psfPSF3D

PSF IRF used for simulating the observation

bkgBackground3D

Background rate model

gtiGTI

Table with GTI start and stop time

deadtimefloat, optional

Deadtime fraction, defaults to 0

Attributes Summary

observation_live_time_duration

observation_time_duration

tstart

tstop

Methods Summary

create(pointing[, obs_id, livetime, tstart, …])

Create an observation.

from_caldb(pointing[, obs_id, livetime, …])

Create an observation using IRFs from a given CTA CALDB.

Attributes Documentation

observation_live_time_duration
observation_time_duration
tstart
tstop

Methods Documentation

classmethod create(pointing, obs_id=None, livetime=None, tstart=None, tstop=None, irfs=None, deadtime_fraction=0.0)[source]

Create an observation.

User must either provide the livetime, or the start and stop times.

Parameters
pointingSkyCoord

Pointing position

obs_idint

Observation ID as identifier

livetime~astropy.units.Quantity`

Livetime exposure of the simulated observation

tstartQuantity

Start time of observation

tstopQuantity

Stop time of observation

irfsdict

IRFs used for simulating the observation: bkg, aeff, psf, edisp

deadtime_fractionfloat, optional

Deadtime fraction, defaults to 0

Returns
obsgammapy.data.Observation
classmethod from_caldb(pointing, obs_id=None, livetime=None, tstart=None, tstop=None, caldb='prod2', irf='South0.5hr', deadtime_fraction=0.0)[source]

Create an observation using IRFs from a given CTA CALDB.

Parameters
pointingSkyCoord

Pointing position

obs_idint

Observation ID as identifier

livetime~astropy.units.Quantity`

Livetime exposure of the simulated observation

tstartQuantity

Start time of observation

tstopQuantity

Stop time of observation

caldbstr

Calibration database

irfstr

Type of Instrumental response function.

deadtime_fractionfloat, optional

Deadtime fraction, defaults to 0

Returns
obsgammapy.data.Observation