DetectorData¶
- class gdt.core.spectra.parameters.DetectorData[source]¶
Bases:
objectA container for detector info used in a spectral fit.
Attributes Summary
True if the detector is used in the fit
A Boolean array marking the channels that were used
The energy channel range of the data
The name of the datatype
The name of the detector
The edges of the energy channels
The energy range of the data used
The filename of the data file
The name of the instrument
Number of energy channels used
The deconvolved photon counts for the detector
The deconvolved photon count errors for the detector
The photon model for the detector
The filename of the detector response
The time range of the data used
Methods Summary
from_data(instrument, detector, datatype, ...)Create a DetectorData object from data.
Attributes Documentation
- active¶
True if the detector is used in the fit
- Type:
(bool, optional)
- channel_mask¶
A Boolean array marking the channels that were used
- Type:
(np.array)
- channel_range¶
The energy channel range of the data
- Type:
(int, int)
- datatype¶
The name of the datatype
- Type:
(str)
- detector¶
The name of the detector
- Type:
(str)
- energy_edges¶
The edges of the energy channels
- Type:
(np.array)
- energy_range¶
The energy range of the data used
- Type:
(float, float)
- filename¶
The filename of the data file
- Type:
(str)
- instrument¶
The name of the instrument
- Type:
(str)
- num_chans¶
Number of energy channels used
- Type:
(int)
- photon_counts¶
The deconvolved photon counts for the detector
- Type:
(np.array)
- photon_errors¶
The deconvolved photon count errors for the detector
- Type:
(np.array)
- photon_model¶
The photon model for the detector
- Type:
(np.array)
- response¶
The filename of the detector response
- Type:
(str)
- time_range¶
The time range of the data used
- Type:
(float, float)
Methods Documentation
- classmethod from_data(instrument, detector, datatype, numchans, **kwargs)[source]¶
Create a DetectorData object from data.
- Parameters:
instrument (str) – The name of the instrument
detector (str) – The name of the detector
datatype (str) – The name of the datatype
filename (str) – The filename of the data file
numchans (int) – Number of energy channels used
active (bool, optional) – True if the detector is used in the fit
channel_mask (np.array, optional) – A Boolean array marking the channels that were used
channel_range (tuple, optional) – The energy channel range of the data
energy_edges (np.array, optional) – The edges of the energy channels
energy_range (tuple, optional) – The energy range of the data used
photon_counts (np.array, optional) – The deconvolved photon counts for the detector
photon_errors (np.array, optional) – The deconvolved photon count errors for the detector
photon_model (np.array, optional) – The photon model for the detector
response (str, optional) – The filename of the detector response
time_range (tuple, optional) – The time range of the data used
- Returns: