Utilties for calculating and modifying GPS times using the LAL date package.
This module wraps the LAL Header Date.h module into Python providing functions to convert from the datetime.datetime
objects from the Python standard library into LIGOTimeGPS numbers, and vice-versa. See in particular gps_to_utc and utc_to_gps.
This module also provides a Python implementation of the ‘tconvert’ module, allowing conversion from strings of dates and times into LIGOTimeGPS, and vice-versa. See in particular gps_to_str and str_to_gps.
Prototypes | |
def | lal.gpstime.gps_time_now () |
Get the current time in GPS seconds. More... | |
def | lal.gpstime.utc_to_gps (utc_time) |
Convert the given datetime.datetime into a GPS time. More... | |
def | lal.gpstime.gps_to_utc (gps) |
Convert a GPS time into a datetime.datetime More... | |
def | lal.gpstime.utc_time_now () |
Get the current date and time in UTC. More... | |
def | lal.gpstime.str_to_gps (time_string=None) |
Converts a date/time string into a GPS time. More... | |
def | lal.gpstime.gps_to_str (gps, form=None) |
Convert a LIGOTimeGPS time object into a string. More... | |
def | lal.gpstime.tconvert (arg=None, form=None) |
Convert date/time strings to and from GPS times. More... | |
Variables | |
dictionary | lal.gpstime.TIME_ZONES |
lal.gpstime.GPS_EPOCH = _datetime.datetime(1980, 1, 6, 0, 0, 0) | |
lal.gpstime.LAL_GPS_MAX = _datetime.datetime(2048, 1, 24, 3, 13, 55) | |
def lal.gpstime.gps_time_now | ( | ) |
def lal.gpstime.utc_to_gps | ( | utc_time | ) |
Convert the given datetime.datetime
into a GPS time.
Definition at line 99 of file gpstime.py.
def lal.gpstime.gps_to_utc | ( | gps | ) |
Convert a GPS time into a datetime.datetime
datetime.datetime
object in UTC Definition at line 110 of file gpstime.py.
def lal.gpstime.utc_time_now | ( | ) |
Get the current date and time in UTC.
datetime.datetime
object in UTC Definition at line 128 of file gpstime.py.
def lal.gpstime.str_to_gps | ( | time_string = None | ) |
Converts a date/time string into a GPS time.
The following special words are permitted:
Example:
Definition at line 148 of file gpstime.py.
def lal.gpstime.gps_to_str | ( | gps, | |
form = None |
|||
) |
Convert a LIGOTimeGPS time object into a string.
The output format can be given explicitly, but will default as shown in the example.
Example:
Definition at line 185 of file gpstime.py.
def lal.gpstime.tconvert | ( | arg = None , |
|
form = None |
|||
) |
Convert date/time strings to and from GPS times.
If no argument is given, the current GPS time is returned.
The following special words are permitted:
Example:
Definition at line 218 of file gpstime.py.
dictionary lal.gpstime.TIME_ZONES |
Definition at line 59 of file gpstime.py.
lal.gpstime.GPS_EPOCH = _datetime.datetime(1980, 1, 6, 0, 0, 0) |
Definition at line 72 of file gpstime.py.
lal.gpstime.LAL_GPS_MAX = _datetime.datetime(2048, 1, 24, 3, 13, 55) |
Definition at line 73 of file gpstime.py.