AdaptiveRingBackgroundMaker¶
-
class
gammapy.cube.
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:
object
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_in
Quantity
Inner radius of the ring.
- r_out_max
Quantity
Maximal outer radius of the ring.
- width
Quantity
Width of the ring.
- stepsize
Quantity
Stepsize used for increasing the radius.
- threshold_alphafloat
Threshold on alpha above which the adaptive ring takes action.
- theta
Quantity
Integration radius used for alpha computation.
- method{‘fixed_width’, ‘fixed_r_in’}
Adaptive ring method.
- exclusion_mask
WcsNDMap
Exclusion mask
- r_in
Methods Summary
kernels
(self, image)Ring kernels according to the specified method.
make_cubes
(self, dataset)Make acceptance, off acceptance, off counts cubes
run
(self, dataset)Run adaptive ring background maker
Methods Documentation
-
kernels
(self, image)[source]¶ Ring kernels according to the specified method.
- Parameters
- image
WcsNDMap
Map specifying the WCS information.
- image
- Returns
- kernelslist
List of
Ring2DKernel
-
make_cubes
(self, dataset)[source]¶ Make acceptance, off acceptance, off counts cubes
- Parameters
- dataset
MapDataset
Input map dataset.
- dataset
- Returns
- cubesdict of
WcsNDMap
Dictionary containing
counts_off
,acceptance
andacceptance_off
cubes.
- cubesdict of
-
run
(self, dataset)[source]¶ Run adaptive ring background maker
- Parameters
- dataset
MapDataset
Input map dataset.
- dataset
- Returns
- dataset_on_off
MapDatasetOnOff
On off dataset.
- dataset_on_off