ExcessMapEstimator¶
-
class
gammapy.estimators.
ExcessMapEstimator
(correlation_radius='0.1 deg', n_sigma=1, n_sigma_ul=3, selection_optional='all', energy_edges=None, apply_mask_fit=False)[source]¶ Bases:
gammapy.estimators.Estimator
Computes correlated excess, sqrt TS (i.e. Li-Ma significance) and errors for MapDatasets.
- Parameters
- correlation_radius~astropy.coordinate.Angle
correlation radius to use
- n_sigmafloat
Confidence level for the asymmetric errors expressed in number of sigma. Default is 1.
- n_sigma_ulfloat
Confidence level for the upper limits expressed in number of sigma. Default is 3.
- selection_optionallist of str
Which additional maps to estimate besides delta TS, significance and symmetric error. Available options are:
“errn-errp”: estimate asymmetric errors.
“ul”: estimate upper limits.
By default all additional quantities are estimated.
- energy_edges
Quantity
Energy edges of the target excess maps bins.
- apply_mask_fitBool
Apply a mask for the computation. A
mask_fit
must be present on the input dataset
Attributes Summary
Config parameters
Methods Summary
copy
()Copy estimator
estimate_excess_map
(dataset)Estimate excess and ts maps for single dataset.
get_sqrt_ts
(ts, norm)Compute sqrt(TS) value.
run
(dataset)Compute correlated excess, Li & Ma significance and flux maps
Attributes Documentation
-
config_parameters
¶ Config parameters
-
correlation_radius
¶
-
selection_optional
¶
-
tag
= 'ExcessMapEstimator'¶
Methods Documentation
-
copy
()¶ Copy estimator
-
estimate_excess_map
(dataset)[source]¶ Estimate excess and ts maps for single dataset.
If exposure is defined, a flux map is also computed.
- Parameters
- dataset
MapDataset
Map dataset
- dataset
-
static
get_sqrt_ts
(ts, norm)¶ Compute sqrt(TS) value.
Compute sqrt(TS) as defined by:
\[\begin{split}\sqrt{TS} = \left \{ \begin{array}{ll} -\sqrt{TS} & : \text{if} \ norm < 0 \\ \sqrt{TS} & : \text{else} \end{array} \right.\end{split}\]
-
run
(dataset)[source]¶ Compute correlated excess, Li & Ma significance and flux maps
- Parameters
- dataset
MapDataset
orMapDatasetOnOff
input dataset
- dataset
- Returns
- imagesdict
Dictionary containing result correlated maps. Keys are:
counts : correlated counts map
background : correlated background map
excess : correlated excess map
ts : TS map
sqrt_ts : sqrt(delta TS), or Li-Ma significance map
err : symmetric error map (from covariance)
flux : flux map. An exposure map must be present in the dataset to compute flux map
errn : negative error map
errp : positive error map
ul : upper limit map