ExcessMapEstimator¶
-
class
gammapy.estimators.ExcessMapEstimator(correlation_radius='0.1 deg', n_sigma=1, n_sigma_ul=2, selection_optional=None, energy_edges=None, correlate_off=True, spectral_model=None)[source]¶ Bases:
gammapy.estimators.EstimatorComputes correlated excess, significance and error maps from a map dataset.
If a model is set on the dataset the excess map estimator will compute the excess taking into account the predicted counts of the model.
..note:
By default the excess estimator correlates the off counts as well to avoid artifacts at the edges of the :term:`FoV` for stacked on-off datasets. However when the on-off dataset has been derived from a ring background estimate, this leads to the off counts being correlated twice. To avoid artifacts and the double correlation, the `ExcessMapEstimator` has to be applied per dataset and the resulting maps need to be stacked, taking the :term:`FoV` cut into account.
- Parameters
- correlation_radius~astropy.coordinate.Angle
correlation radius to use
- n_sigmafloat
Confidence level for the asymmetric errors expressed in number of sigma.
- n_sigma_ulfloat
Confidence level for the upper limits expressed in number of sigma.
- selection_optionallist of str
Which additional maps to estimate besides delta TS, significance and symmetric error. Available options are:
“all”: all the optional steps are executed
“errn-errp”: estimate asymmetric errors.
“ul”: estimate upper limits.
Default is None so the optional steps are not executed.
- energy_edges
Quantity Energy edges of the target excess maps bins.
- correlate_offbool
Correlate OFF events in the case of a
MapDatasetOnOff. Default is True.- spectral_model
SpectralModel Spectral model used for the computation of the flux map. If None, a Power Law of index 2 is assumed (default).
Attributes Summary
Config parameters
Methods Summary
copy()Copy estimator
estimate_excess_map(dataset)Estimate excess and ts maps for single dataset.
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
-
run(dataset)[source]¶ Compute correlated excess, Li & Ma significance and flux maps
If a model is set on the dataset the excess map estimator will compute the excess taking into account the predicted counts of the model.
- Parameters
- dataset
MapDatasetorMapDatasetOnOff Map dataset
- dataset
- Returns
- maps
FluxMaps Flux maps
- maps