Source code for gdt.missions.gifts.time
#
# 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.
#
from astropy.time import TimeFromEpoch, Time
from gdt.missions.fermi.time import GbmBurstNumber
__all__ = ['GiftsSecTime', 'GiftsBurstNumber', 'Time']
[docs]
class GiftsSecTime(TimeFromEpoch):
"""Represents the number of seconds elapsed since Jan 1, 2001, 00:00:00 UTC,
including leap seconds
"""
name = 'gifts'
"""(str): Name of the mission"""
unit = 1.0 / 86400
"""(float): unit in days"""
epoch_val = '2001-01-01 00:01:04.184'
"""(str): The epoch in Terrestrial Time"""
epoch_val2 = None
epoch_scale = 'tt'
"""(str): The scale of :attr:`epoch_val`"""
epoch_format = 'iso'
"""(str): Format of :attr:`epoch_val`"""
[docs]
class GiftsBurstNumber(GbmBurstNumber):
"""
Represent date as GIFTS burst number.
For now, this reuses the Fermi-GBM burst number implementation.
"""
name = 'gifts_bn'
"""(str): The name of the time format"""