ObservationStats¶
-
class
gammapy.data.ObservationStats(n_on=None, n_off=None, a_on=None, a_off=None, obs_id=None, livetime=None)[source]¶ Bases:
gammapy.stats.StatsObservation statistics.
Class allowing to summarize observation (
DataStoreObservation) statisticsParameters: - n_on : int
Number of on events
- n_off : int
Number of off events
- a_on : float
Relative background exposure of the on region
- a_off : float
Relative background exposure of the off region
- obs_id : int
ID of the observation
- livetime :
Quantity Livetime of the observation
Attributes Summary
alphaAlpha (on / off exposure ratio). backgroundBackground estimate (float). excessExcess (float). sigmaLi-Ma significance for observation statistics (float). Methods Summary
from_observation(observation, bg_estimate)Create from DataStoreObservation.stack(stats_list)Stack (concatenate) list of ObservationStats.to_dict(self)Data as a dict. Attributes Documentation
-
alpha¶ Alpha (on / off exposure ratio).
Override member function from
Statsto take into account weighted alpha by number of Off events
-
background¶ Background estimate (float).
\[\mu_\mathrm{bg} = \alpha\ n_\mathrm{off}\]
-
excess¶ Excess (float).
\[n_\mathrm{ex} = n_\mathrm{on} - \mu_\mathrm{bg}\]
-
sigma¶ Li-Ma significance for observation statistics (float).
Methods Documentation
-
classmethod
from_observation(observation, bg_estimate)[source]¶ Create from
DataStoreObservation.Parameters: - observation :
DataStoreObservation IACT data store observation
- bg_estimate :
BackgroundEstimate Background estimate
- observation :
-
classmethod
stack(stats_list)[source]¶ Stack (concatenate) list of
ObservationStats.Parameters: - stats_list : list
List of
ObservationStats
Returns: - total_stats :
ObservationStats Statistics for stacked observation