ASmooth

class gammapy.image.ASmooth(kernel=<class 'astropy.convolution.kernels.Gaussian2DKernel'>, method='simple', threshold=5, scales=None)[source]

Bases: object

Adaptively smooth counts image.

Achieves a roughly constant significance of features across the whole image.

Algorithm based on http://adsabs.harvard.edu/abs/2006MNRAS.368…65E

The algorithm was slightly adapted to also allow Li & Ma and TS to estimate the significance of a feature in the image.

Parameters:

kernel : astropy.convolution.Kernel

Smoothing kernel.

method : {‘simple’, ‘asmooth’, ‘lima’}

Significance estimation method.

threshold : float

Significance threshold.

scales : Quantity

Smoothing scales.

Methods Summary

kernels(pixel_scale) Ring kernels according to the specified method.
make_scales(n_scales[, factor, kernel]) Create list of Gaussian widths.
run(counts[, background, exposure]) Run image smoothing.

Methods Documentation

kernels(pixel_scale)[source]

Ring kernels according to the specified method.

Parameters:

pixel_scale : Angle

Sky image pixel scale

Returns:

kernels : list

List of Kernel

static make_scales(n_scales, factor=1.4142135623730951, kernel=<class 'astropy.convolution.kernels.Gaussian2DKernel'>)[source]

Create list of Gaussian widths.

run(counts, background=None, exposure=None)[source]

Run image smoothing.

Parameters:

counts : WcsNDMap

Counts map

background : WcsNDMap

Background map

exposure : WcsNDMap

Exposure map

Returns:

images : dict of WcsNDMap

Smoothed images; keys are:
  • ‘counts’
  • ‘background’
  • ‘flux’ (optional)
  • ‘scales’
  • ‘significance’.