DataStoreObservation¶
-
class
gammapy.data.
DataStoreObservation
(obs_id, data_store, obs_filter=None)[source]¶ Bases:
gammapy.data.Observation
IACT data store observation.
- Parameters
- obs_idint
Observation ID
- data_store
DataStore
Data store
- obs_filter
ObservationFilter
, optional Filter for the observation
Attributes Summary
Load effective area object.
Load background object.
Load energy dispersion object.
Load
gammapy.data.EventList
object and apply the filter.Fixed pointing info for this observation (
FixedPointingInfo
).Load
gammapy.data.GTI
object and apply the filter.Observation muon efficiency.
Observation information (
dict
).Dead-time fraction (float).
Live-time duration in seconds (
Quantity
).Observation time duration in seconds (
Quantity
).Observatory location (
EarthLocation
).Pointing ALT / AZ sky coordinates (
SkyCoord
).Pointing RA / DEC sky coordinates (
SkyCoord
).Pointing zenith angle sky (
Quantity
).Load point spread function object.
Target RA / DEC sky coordinates (
SkyCoord
).Observation start time (
Time
).Observation stop time (
Time
).Methods Summary
check
(self[, checks])Run checks.
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.
load
(self[, hdu_type, hdu_class])Load data file as appropriate object.
location
(self[, hdu_type, hdu_class])HDU location object.
peek
(self[, figsize])Quick-look plots in a few panels.
select_time
(self, time_interval)Select a time interval of the observation.
Attributes Documentation
-
aeff
¶ Load effective area object.
-
bkg
¶ Load background object.
-
edisp
¶ Load energy dispersion object.
-
events
¶ Load
gammapy.data.EventList
object and apply the filter.
-
fixed_pointing_info
¶ Fixed pointing info for this observation (
FixedPointingInfo
).
-
gti
¶ Load
gammapy.data.GTI
object and apply the filter.
-
muoneff
¶ Observation muon efficiency.
-
observation_dead_time_fraction
¶ Dead-time fraction (float).
Defined as dead-time over observation time.
Dead-time is defined as the time during the observation where the detector didn’t record events: https://en.wikipedia.org/wiki/Dead_time https://ui.adsabs.harvard.edu/abs/2004APh….22..285F
The dead-time fraction is used in the live-time computation, which in turn is used in the exposure and flux computation.
-
observation_live_time_duration
¶ Live-time duration in seconds (
Quantity
).The dead-time-corrected observation time.
Computed as
t_live = t_observation * (1 - f_dead)
wheref_dead
is the dead-time fraction.
-
observation_time_duration
¶ Observation time duration in seconds (
Quantity
).The wall time, including dead-time.
-
observatory_earth_location
¶ Observatory location (
EarthLocation
).
-
psf
¶ Load point spread function object.
Methods Documentation
-
classmethod
create
(pointing, obs_id=0, livetime=None, tstart=None, tstop=None, irfs=None, deadtime_fraction=0.0)¶ Create an observation.
User must either provide the livetime, or the start and stop times.
- Parameters
- pointing
SkyCoord
Pointing position
- obs_idint
Observation ID as identifier
- livetime~astropy.units.Quantity`
Livetime exposure of the simulated observation
- tstart
Quantity
Start time of observation
- tstop
Quantity
Stop time of observation
- irfsdict
IRFs used for simulating the observation:
bkg
,aeff
,psf
,edisp
- deadtime_fractionfloat, optional
Deadtime fraction, defaults to 0
- pointing
- Returns
- obs
gammapy.data.MemoryObservation
- obs
-
classmethod
from_caldb
(pointing, obs_id=None, livetime=None, tstart=None, tstop=None, caldb='prod2', irf='South0.5hr', deadtime_fraction=0.0)¶ Create an observation using IRFs from a given CTA CALDB.
- Parameters
- pointing
SkyCoord
Pointing position
- obs_idint
Observation ID as identifier
- livetime~astropy.units.Quantity`
Livetime exposure of the simulated observation
- tstart
Quantity
Start time of observation
- tstop
Quantity
Stop time of observation
- caldbstr
Calibration database
- irfstr
Type of Instrumental response function.
- deadtime_fractionfloat, optional
Deadtime fraction, defaults to 0
- pointing
- Returns
-
load
(self, hdu_type=None, hdu_class=None)[source]¶ Load data file as appropriate object.
- Parameters
- hdu_typestr
HDU type (see
VALID_HDU_TYPE
)- hdu_classstr
HDU class (see
VALID_HDU_CLASS
)
- Returns
-
location
(self, hdu_type=None, hdu_class=None)[source]¶ HDU location object.
- Parameters
- hdu_typestr
HDU type (see
VALID_HDU_TYPE
)- hdu_classstr
HDU class (see
VALID_HDU_CLASS
)
- Returns
- location
HDULocation
HDU location
- location
-
peek
(self, figsize=(12, 10))¶ Quick-look plots in a few panels.
- Parameters
- figszietuple
Figure size
-
select_time
(self, time_interval)[source]¶ Select a time interval of the observation.
- Parameters
- time_interval
astropy.time.Time
Start and stop time of the selected time interval. For now we only support a single time interval.
- time_interval
- Returns
- new_obs
DataStoreObservation
A new observation instance of the specified time interval
- new_obs