SpectrumEnergyGroupMaker¶
-
class
gammapy.spectrum.
SpectrumEnergyGroupMaker
(obs)[source]¶ Bases:
object
Energy bin groups for spectral analysis.
This class contains both methods that run algorithms that compute groupings as well as the results as data members and methods to debug and assess the results.
The input
obs
should be used read-only. All computations modifytable
or other properties.TODO: should this class have a
SpectrumEnergyGroups
data member instead of or in addition totable
?See Spectrum energy grouping for examples.
Parameters: obs :
SpectrumObservation
Spectrum observation
Attributes
obs ( SpectrumObservation
) Spectrum observation datatable ( QTable
) Table with some per-energy bin stats info.groups ( SpectrumEnergyGroups
) List of energy groups.Attributes Summary
n_groups
Number of groups. table_energy_range
Total spectrum energy range (no grouping or range applied) Methods Summary
compute_groups_fixed
(ebounds)Compute grouping for a given fixed energy binning. compute_range_safe
()Apply safe energy range of observation to groups
.set_energy_range
([emin, emax])Apply energy range to groups
.Attributes Documentation
-
n_groups
¶ Number of groups.
-
table_energy_range
¶ Total spectrum energy range (no grouping or range applied)
Methods Documentation
-