Time Utilities (gwpy.time)#

GPS time conversion utilities.

The Time object from the astropy package is imported for user convenience, and a GPS time conversion function is provided.

All other time conversions can be easily completed using the Time object.

See also

Functions#

from_gps(gps)

Convert a GPS time into a datetime.datetime.

tconvert(-> ~datetime.datetime)

Convert GPS times to ISO-format date-times and vice-versa.

to_gps(t, *[, tzinfo])

Convert any input date/time into a LIGOTimeGPS.

Classes#

LIGOTimeGPS

::tagLIGOTimeGPS

LIGOTimeGPSLike(new)

Protocol for types that are implementations of LIGOTimeGPS.

Class Inheritance Diagram#

digraph inheritance10d319509c { bgcolor=transparent; rankdir=TB; size="8.0, 12.0"; "Generic" [URL="https://docs.python.org/3/library/typing.html#typing.Generic",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Abstract base class for generic types."]; "LIGOTimeGPS" [URL="../gwpy.time.LIGOTimeGPS/#gwpy.time.LIGOTimeGPS",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="::tagLIGOTimeGPS"]; "SwigPyObject" -> "LIGOTimeGPS" [arrowsize=0.5,style="setlinewidth(0.5)"]; "LIGOTimeGPSLike" [URL="../gwpy.time.LIGOTimeGPSLike/#gwpy.time.LIGOTimeGPSLike",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Protocol for types that are implementations of LIGOTimeGPS."]; "Protocol" -> "LIGOTimeGPSLike" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Protocol" [URL="https://docs.python.org/3/library/typing.html#typing.Protocol",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base class for protocol classes."]; "Generic" -> "Protocol" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SwigPyObject" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Swig object carries a C/C++ instance pointer"]; }