Source code for gdt.missions.gifts.detectors
#
# Copyright 2026 by University College Dublin. All rights reserved.
#
# Developed by: Derek O'Callaghan
# University College Dublin
# https://www.ucd.ie/
#
# Builds on:
# Gamma-ray Data Tools - Core Components (https://github.com/USRA-STI/gdt-core)
# Gamma-ray Data Tools - Fermi mission components (https://github.com/USRA-STI/gdt-fermi/)
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing permissions and limitations under the
# License.
#
import astropy.units as u
from gdt.core.detector import Detectors
from gdt.missions.fermi.gbm.detectors import GbmDetectors
__all__ = ["GiftsDetectors", "GiftsGbmDetectors"]
# unfortunately Sphinx has a major bug that prevents the autodoc of Enums,
# so we have to define all of this in the docstring...
[docs]
class GiftsDetectors(Detectors):
"""The GIFTS Detector name and orientation definitions.
.. rubric:: Attributes Summary
.. autosummary::
azimuth
elevation
full_name
number
zenith
.. rubric:: Methods Summary
.. autosummary::
from_full_name
from_num
from_str
pointing
skycoord
.. rubric:: Attributes Documentation
.. autoattribute:: azimuth
.. autoattribute:: elevation
.. autoattribute:: full_name
.. autoattribute:: number
.. autoattribute:: zenith
.. rubric:: Methods Documentation
.. automethod:: from_full_name
.. automethod:: from_num
.. automethod:: from_str
.. automethod:: pointing
.. automethod:: skycoord
"""
G0 = ("G0", 0, 247.824 * u.deg, 43.958 * u.deg)
G1 = ("G1", 1, 180 * u.deg, 20 * u.deg)
G2 = ("G2", 2, 112.176 * u.deg, 43.958 * u.deg)
G3 = ("G3", 3, 67.824 * u.deg, 43.958 * u.deg)
G4 = ("G4", 4, 0 * u.deg, 20 * u.deg)
G5 = ("G5", 5, 292.176 * u.deg, 43.958 * u.deg)
[docs]
class GiftsGbmDetectors(Detectors):
"""The GIFTS and GBM Detector name and orientation definitions.
This is used for analysis that combines both detectors
e.g. localization plots.
.. rubric:: Attributes Summary
.. autosummary::
azimuth
elevation
full_name
number
zenith
.. rubric:: Methods Summary
.. autosummary::
from_full_name
from_num
from_str
pointing
skycoord
.. rubric:: Attributes Documentation
.. autoattribute:: azimuth
.. autoattribute:: elevation
.. autoattribute:: full_name
.. autoattribute:: number
.. autoattribute:: zenith
.. rubric:: Methods Documentation
.. automethod:: from_full_name
.. automethod:: from_num
.. automethod:: from_str
.. automethod:: pointing
.. automethod:: skycoord
"""
G0 = GiftsDetectors.G0.value
G1 = GiftsDetectors.G1.value
G2 = GiftsDetectors.G2.value
G3 = GiftsDetectors.G3.value
G4 = GiftsDetectors.G4.value
G5 = GiftsDetectors.G5.value
n0 = GbmDetectors.n0.value
n1 = GbmDetectors.n1.value
n2 = GbmDetectors.n2.value
n3 = GbmDetectors.n3.value
n4 = GbmDetectors.n4.value
n5 = GbmDetectors.n5.value
n6 = GbmDetectors.n6.value
n7 = GbmDetectors.n7.value
n8 = GbmDetectors.n8.value
n9 = GbmDetectors.n9.value
na = GbmDetectors.na.value
nb = GbmDetectors.nb.value
b0 = GbmDetectors.b0.value
b1 = GbmDetectors.b1.value