LIGOTimeGPS¶
-
class
ligotimegps.LIGOTimeGPS(seconds, nanoseconds=0)¶ Bases:
objectAn object for storing times with nanosecond resolution
Internally the time is represented as a signed integer
gpsSecondspart and an unsigned integergpsNanosecondspart. The actual time is always constructed by adding the nanoseconds to the seconds. So -0.5 s is represented by setting seconds = -1, and nanoseconds to 500000000.Parameters: Examples
>>> LIGOTimeGPS(100.5) LIGOTimeGPS(100, 500000000) >>> LIGOTimeGPS("100.5") LIGOTimeGPS(100, 500000000) >>> LIGOTimeGPS(100, 500000000) LIGOTimeGPS(100, 500000000) >>> LIGOTimeGPS(0, 100500000000) LIGOTimeGPS(100, 500000000) >>> LIGOTimeGPS(100.2, 300000000) LIGOTimeGPS(100, 500000000) >>> LIGOTimeGPS("0.000000001") LIGOTimeGPS(0, 1) >>> LIGOTimeGPS("0.0000000012") LIGOTimeGPS(0, 1) >>> LIGOTimeGPS("0.0000000018") LIGOTimeGPS(0, 2) >>> LIGOTimeGPS("-0.8") LIGOTimeGPS(-1, 200000000) >>> LIGOTimeGPS("-1.2") LIGOTimeGPS(-2, 800000000)
Attributes Summary
gpsNanoSecondsresidual nanoseconds gpsSecondsSeconds since 0h UTC 6 Jan 1980 nanosecondsresidual nanoseconds secondsSeconds since 0h UTC 6 Jan 1980 Methods Summary
ns()Convert a LIGOTimeGPSto a count of nanoseconds as an intAttributes Documentation
-
gpsNanoSeconds¶ residual nanoseconds
-
gpsSeconds¶ Seconds since 0h UTC 6 Jan 1980
-
nanoseconds¶ residual nanoseconds
-
seconds¶ Seconds since 0h UTC 6 Jan 1980
Methods Documentation
-
ns()¶ Convert a
LIGOTimeGPSto a count of nanoseconds as an intWhen running python2.7 on Windows this is returned as
numpy.longto guarantee long-ness.Examples
>>> LIGOTimeGPS(100.5).ns() 100500000000
-