ASmoothMapEstimator¶
-
class
gammapy.estimators.
ASmoothMapEstimator
(scales=None, kernel=<class 'astropy.convolution.kernels.Gaussian2DKernel'>, spectrum=None, method='lima', threshold=5, energy_edges=None)[source]¶ Bases:
gammapy.estimators.Estimator
Adaptively smooth counts image.
Achieves a roughly constant sqrt_ts of features across the whole image.
Algorithm based on https://ui.adsabs.harvard.edu/abs/2006MNRAS.368…65E
The algorithm was slightly adapted to also allow Li & Ma to estimate the sqrt_ts of a feature in the image.
- Parameters
- scales
Quantity
Smoothing scales.
- kernel
astropy.convolution.Kernel
Smoothing kernel.
- spectrum
SpectralModel
Spectral model assumption
- method{‘asmooth’, ‘lima’}
Significance estimation method.
- thresholdfloat
Significance threshold.
- scales
Attributes Summary
Config parameters
Methods Summary
copy
()Copy estimator
estimate_maps
(dataset)Run adaptive smoothing on input Maps.
get_kernels
(pixel_scale)Get kernels according to the specified method.
get_scales
(n_scales[, factor, kernel])Create list of Gaussian widths.
run
(dataset)Run adaptive smoothing on input MapDataset.
Which quantities are computed
Attributes Documentation
-
config_parameters
¶ Config parameters
-
selection_optional
¶
-
tag
= 'ASmoothMapEstimator'¶
Methods Documentation
-
copy
()¶ Copy estimator
-
estimate_maps
(dataset)[source]¶ Run adaptive smoothing on input Maps.
- Parameters
- dataset
MapDataset
Dataset
- dataset
- Returns
- imagesdict of
WcsNDMap
- Smoothed images; keys are:
‘counts’
‘background’
‘flux’ (optional)
‘scales’
‘sqrt_ts’.
- imagesdict of
-
static
get_scales
(n_scales, factor=1.4142135623730951, kernel=<class 'astropy.convolution.kernels.Gaussian2DKernel'>)[source]¶ Create list of Gaussian widths.
- Parameters
- n_scalesint
Number of scales
- factorfloat
Incremental factor
- Returns
- scales
ndarray
Scale array
- scales
-
run
(dataset)[source]¶ Run adaptive smoothing on input MapDataset.
- Parameters
- dataset
MapDataset
orMapDatasetOnOff
the input dataset (with one bin in energy at most)
- dataset
- Returns
- imagesdict of
WcsNDMap
- Smoothed images; keys are:
‘counts’
‘background’
‘flux’ (optional)
‘scales’
‘sqrt_ts’.
- imagesdict of