AdaptiveRingBackgroundMaker#

class gammapy.makers.AdaptiveRingBackgroundMaker(r_in, r_out_max, width, stepsize='0.02 deg', threshold_alpha=0.1, theta='0.22 deg', method='fixed_width', exclusion_mask=None)[source]#

Bases: gammapy.makers.core.Maker

Adaptive ring background algorithm.

This algorithm extends the RingBackgroundMaker method by adapting the size of the ring to achieve a minimum on / off exposure ratio (alpha) in regions where the area to estimate the background from is limited.

Parameters
r_inQuantity

Inner radius of the ring.

r_out_maxQuantity

Maximum outer radius of the ring.

widthQuantity

Width of the ring.

stepsizeQuantity

Stepsize used for increasing the radius.

threshold_alphafloat

Threshold on alpha above which the adaptive ring takes action.

thetaQuantity

Integration radius used for alpha computation.

method{‘fixed_width’, ‘fixed_r_in’}

Adaptive ring method. Default is ‘fixed_width’.

exclusion_maskWcsNDMap

Exclusion mask.

See also

RingBackgroundMaker.

Attributes Summary

tag

Methods Summary

kernels(image)

Ring kernels according to the specified method.

make_cubes(dataset)

Make acceptance, off acceptance, off counts cubes.

run(dataset[, observation])

Run adaptive ring background maker.

Attributes Documentation

tag = 'AdaptiveRingBackgroundMaker'#

Methods Documentation

kernels(image)[source]#

Ring kernels according to the specified method.

Parameters
imageWcsNDMap

Map specifying the WCS information.

Returns
kernelslist

List of Ring2DKernel.

make_cubes(dataset)[source]#

Make acceptance, off acceptance, off counts cubes.

Parameters
datasetMapDataset

Input map dataset.

Returns
cubesdict of WcsNDMap

Dictionary containing counts_off, acceptance and acceptance_off cubes.

run(dataset, observation=None)[source]#

Run adaptive ring background maker.

Parameters
datasetMapDataset

Input map dataset.

Returns
dataset_on_offMapDatasetOnOff

On off dataset.