Detectors¶
- class gdt.core.detector.Detectors(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
EnumDetector base class containing the name/number mapping and the pointing direction in spacecraft coordinates.
When inheriting this base class, each detector will be a 4-tuple defined as a class variable, with the class variable name represented as the short name of the detector. The 4-tuple values are the full detector name, the corresponding detector number, and the detector azimuth and zenith.
Example
>>> class MyDetectors(Detectors): >>> mydet0 = ('MyDetector0', 0, 10.0, 50.0) >>> mydet1 = ('MyDetector1', 1, 0.0, 30.0)
- Parameters:
full_name (str) – The full detector name
number (int) – The detector number
azimuth (float) – The azimuth of the detector normal
zenith (float) – The zenith of the detector normal
Attributes Summary
The azimuth of the detector normal
The elevation of the detector normal
The full detector name
The detector number
The zenith of the detector normal
Methods Summary
from_full_name(full_name)Create a Detector from the full detector name
from_num(num)Create a Detector from an index number
from_str(value)Create a Detector from a short string name
pointing()The detector pointing in azimuth and zenith
skycoord(frame)Return an Astropy SkyCoord of the detector pointing in the SpacecraftFrame.
Attributes Documentation
- azimuth¶
The azimuth of the detector normal
- Type:
(float)
- elevation¶
The elevation of the detector normal
- Type:
(float)
- full_name¶
The full detector name
- Type:
(str)
- number¶
The detector number
- Type:
(int)
- zenith¶
The zenith of the detector normal
- Type:
(float)
Methods Documentation
- classmethod from_full_name(full_name)[source]¶
Create a Detector from the full detector name
- Parameters:
full_name (str) – The full name of the detector
- Returns:
(
Detector)
- classmethod from_num(num)[source]¶
Create a Detector from an index number
- Parameters:
num (int) – The index number
- Returns:
(
Detector)
- classmethod from_str(value)[source]¶
Create a Detector from a short string name
- Parameters:
value (str) – The detector name
- Returns:
(
Detector)
- skycoord(frame)[source]¶
Return an Astropy SkyCoord of the detector pointing in the SpacecraftFrame.
- Parameters:
frame (
SpacecraftFrame) – The spacecraft frame- Returns:
(astropy.coordinates.SkyCoord)