SpectrumEnergyGroup

class gammapy.spectrum.SpectrumEnergyGroup(energy_group_idx, bin_idx_min, bin_idx_max, bin_type, energy_min, energy_max)[source]

Bases: object

Spectrum energy group.

Represents a consecutive range of bin indices (both ends inclusive).

Attributes Summary

bin_idx_array Numpy array of bin indices in the group.
bin_table Create Table with bins in the group.
fields List of data members of this class.
valid_bin_types Valid values for bin_types attribute.

Methods Summary

contains_energy(energy) Does this group contain a given energy?
from_dict(data)
to_dict()

Attributes Documentation

bin_idx_array

Numpy array of bin indices in the group.

bin_table

Create Table with bins in the group.

Columns are: energy_group_idx, bin_idx, bin_type

fields = ['energy_group_idx', 'bin_idx_min', 'bin_idx_max', 'bin_type', 'energy_min', 'energy_max']

List of data members of this class.

valid_bin_types = ['normal', 'underflow', 'overflow']

Valid values for bin_types attribute.

Methods Documentation

contains_energy(energy)[source]

Does this group contain a given energy?

classmethod from_dict(data)[source]
to_dict()[source]