SafeMaskMaker¶
-
class
gammapy.cube.
SafeMaskMaker
(methods=('aeff-default', ), aeff_percent=10, bias_percent=10, position=None, offset_max='3 deg')[source]¶ Bases:
object
Make safe data range mask for a given observation.
- Parameters
- methods{“aeff-default”, “aeff-max”, “edisp-bias”, “offset-max”, “bkg-peak”}
Method to use for the safe energy range. Can be a list with a combination of those. Resulting masks are combined with logical
and
. “aeff-default” uses the energy ranged specified in the DL3 data files, if available.- aeff_percentfloat
Percentage of the maximal effective area to be used as lower energy threshold for method “aeff-max”.
- bias_percentfloat
Percentage of the energy bias to be used as lower energy threshold for method “edisp-bias”
- position
SkyCoord
Position at which the
aeff_percent
orbias_percent
are computed. By default, it uses the position of the center of the map.- offset_maxstr or
Quantity
Maximum offset cut.
Attributes Summary
Methods Summary
make_mask_energy_aeff_default
(dataset, …)Make safe energy mask from aeff default.
make_mask_energy_aeff_max
(self, dataset)Make safe energy mask from aeff max.
make_mask_energy_bkg_peak
(dataset)Make safe energy mask based on the binned background.
make_mask_energy_edisp_bias
(self, dataset)Make safe energy mask from aeff max.
make_mask_offset_max
(self, dataset, observation)Make maximum offset mask.
run
(self, dataset[, observation])Make safe data range mask.
Attributes Documentation
-
available_methods
= {'aeff-default', 'aeff-max', 'bkg-peak', 'edisp-bias', 'offset-max'}¶
Methods Documentation
-
static
make_mask_energy_aeff_default
(dataset, observation)[source]¶ Make safe energy mask from aeff default.
-
make_mask_energy_aeff_max
(self, dataset)[source]¶ Make safe energy mask from aeff max.
- Parameters
- dataset
SpectrumDataset
orSpectrumDatasetOnOff
Dataset to compute mask for.
- dataset
- Returns
- mask_safe
ndarray
Safe data range mask.
- mask_safe
-
static
make_mask_energy_bkg_peak
(dataset)[source]¶ Make safe energy mask based on the binned background.
The energy threshold is defined as the upper edge of the energy bin with the highest predicted background rate. This method is motivated by its use in the HESS DL3 validation paper: https://arxiv.org/pdf/1910.08088.pdf