DataStoreObservation

class gammapy.data.DataStoreObservation(obs_id, data_store)[source]

Bases: object

IACT data store observation.

See Data Store

Parameters:

obs_id : int

Observation ID

data_store : DataStore

Data store

Attributes Summary

aeff Load effective area object (lazy property).
bkg Load background object (lazy property).
edisp Load energy dispersion object (lazy property).
events Load gammapy.data.EventList object (lazy property).
gti Load gammapy.data.GTI object (lazy property).
muoneff Observation muon efficiency.
obs_info Observation information (OrderedDict).
observation_dead_time_fraction Dead-time fraction (float).
observation_live_time_duration Live-time duration in seconds (Quantity).
observation_time_duration Observation time duration in seconds (Quantity).
observatory_earth_location Observatory location (EarthLocation).
pointing_altaz Pointing ALT / AZ sky coordinates (SkyCoord).
pointing_radec Pointing RA / DEC sky coordinates (SkyCoord).
pointing_zen Pointing zenith angle sky (Quantity).
psf Load point spread function object (lazy property).
target_radec Target RA / DEC sky coordinates (SkyCoord).
tstart Observation start time (Time).
tstop Observation stop time (Time).

Methods Summary

check_observation() Perform some basic sanity checks on this observation.
load([hdu_type, hdu_class]) Load data file as appropriate object.
location([hdu_type, hdu_class]) HDU location object.
make_psf(position[, energy, rad]) Make energy-dependent PSF for a given source position.
peek() Quick-look plots in a few panels.

Attributes Documentation

aeff

Load effective area object (lazy property).

bkg

Load background object (lazy property).

edisp

Load energy dispersion object (lazy property).

events

Load gammapy.data.EventList object (lazy property).

gti

Load gammapy.data.GTI object (lazy property).

muoneff

Observation muon efficiency.

obs_info

Observation information (OrderedDict).

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://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) where f_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).

pointing_altaz

Pointing ALT / AZ sky coordinates (SkyCoord).

pointing_radec

Pointing RA / DEC sky coordinates (SkyCoord).

pointing_zen

Pointing zenith angle sky (Quantity).

psf

Load point spread function object (lazy property).

target_radec

Target RA / DEC sky coordinates (SkyCoord).

tstart

Observation start time (Time).

tstop

Observation stop time (Time).

Methods Documentation

check_observation()[source]

Perform some basic sanity checks on this observation.

Returns:

results : list

List with failure messages for the checks that failed

load(hdu_type=None, hdu_class=None)[source]

Load data file as appropriate object.

Parameters:

hdu_type : str

HDU type (see VALID_HDU_TYPE)

hdu_class : str

HDU class (see VALID_HDU_CLASS)

Returns:

object : object

Object depends on type, e.g. for events it’s a EventList.

location(hdu_type=None, hdu_class=None)[source]

HDU location object.

Parameters:

hdu_type : str

HDU type (see VALID_HDU_TYPE)

hdu_class : str

HDU class (see VALID_HDU_CLASS)

Returns:

location : HDULocation

HDU location

make_psf(position, energy=None, rad=None)[source]

Make energy-dependent PSF for a given source position.

Parameters:

position : SkyCoord

Position at which to compute the PSF

energy : Quantity

1-dim energy array for the output PSF. If none is given, the energy array of the PSF from the observation is used.

rad : Angle

1-dim offset wrt source position array for the output PSF. If none is given, the offset array of the PSF from the observation is used.

Returns:

psf : EnergyDependentTablePSF

Energy dependent psf table

peek()[source]

Quick-look plots in a few panels.