Home | Trees | Indices | Help |
|
---|
|
object --+ | LIGOTimeGPS
An object for storing times with nanosecond resolution. LAL defines an equivalent object which is used through-out the search algorithms to represent times. Many LALApps routines input and output times in a manner that meshes well with this object.
Internally the time is represented as a signed integer "seconds" part and an unsigned integer "nanoseconds" part. 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. That's the way LAL does it.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
gpsNanoSeconds | |||
gpsSeconds | |||
nanoseconds | |||
seconds | |||
Inherited from |
|
Add a value to a LIGOTimeGPS. If the value being added to the LIGOTimeGPS is not also a LIGOTimeGPS, then an attempt is made to convert it to a LIGOTimeGPS. Example: >>> LIGOTimeGPS(100.5) + LIGOTimeGPS(3) LIGOTimeGPS(103, 500000000) >>> LIGOTimeGPS(100.5) + 3 LIGOTimeGPS(103, 500000000) >>> LIGOTimeGPS(100.5) + "3" LIGOTimeGPS(103, 500000000) |
Compare a value to a LIGOTimeGPS. If the value being compared to the LIGOTimeGPS is not also a LIGOTimeGPS, then an attempt is made to convert it to a LIGOTimeGPS. Example: >>> LIGOTimeGPS(100.5) < LIGOTimeGPS(200) True >>> LIGOTimeGPS(100.5) < 200 True >>> LIGOTimeGPS(100.5) < "200" True |
Divide a LIGOTimeGPS by a number. Example: >>> LIGOTimeGPS(100.5) / 2 LIGOTimeGPS(50, 250000000) |
Convert a LIGOTimeGPS to seconds as a float. Example: >>> float(LIGOTimeGPS(100.5)) 100.5 |
hash(x)
|
Create a LIGOTimeGPS instance. The first parameter is the count of seconds, and the second (optional) parameter is the count of nanoseconds. If the nanoseconds parameter is not supplied, it is assumed to be 0. Either parameter can be a numeric type or an ASCII string. Example: >>> 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)
|
Return the integer part (seconds) of a LIGOTimeGPS as an int. Example: >>> int(LIGOTimeGPS(100.5)) 100 |
Return the integer part (seconds) of a LIGOTimeGPS as a long. Example: >>> long(LIGOTimeGPS(100.5)) 100L |
Compute the remainder when a LIGOTimeGPS is divided by a number. Example: >>> LIGOTimeGPS(100.5) % 3 LIGOTimeGPS(1, 500000000) |
Multiply a LIGOTimeGPS by a number. Example: >>> LIGOTimeGPS(100.5) * 2 LIGOTimeGPS(201, 0) |
Return True if the LIGOTimeGPS is nonzero. Example: >>> bool(LIGOTimeGPS(100.5)) True |
Add a value to a LIGOTimeGPS. If the value being added to the LIGOTimeGPS is not also a LIGOTimeGPS, then an attempt is made to convert it to a LIGOTimeGPS. Example: >>> LIGOTimeGPS(100.5) + LIGOTimeGPS(3) LIGOTimeGPS(103, 500000000) >>> LIGOTimeGPS(100.5) + 3 LIGOTimeGPS(103, 500000000) >>> LIGOTimeGPS(100.5) + "3" LIGOTimeGPS(103, 500000000) |
repr(x)
|
Multiply a LIGOTimeGPS by a number. Example: >>> LIGOTimeGPS(100.5) * 2 LIGOTimeGPS(201, 0) |
Return an ASCII string representation of a LIGOTimeGPS.
|
Subtract a value from a LIGOTimeGPS. If the value being subtracted from the LIGOTimeGPS is not also a LIGOTimeGPS, then an attempt is made to convert it to a LIGOTimeGPS. Example: >>> LIGOTimeGPS(100.5) - LIGOTimeGPS(3) LIGOTimeGPS(97, 500000000) >>> LIGOTimeGPS(100.5) - 3 LIGOTimeGPS(97, 500000000) >>> LIGOTimeGPS(100.5) - "3" LIGOTimeGPS(97, 500000000) |
Convert a LIGOTimeGPS to a count of nanoseconds as a long. Example: >>> LIGOTimeGPS(100.5).ns() 100500000000 |
|
gpsNanoSeconds
|
gpsSeconds
|
nanoseconds
|
seconds
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Dec 12 00:34:18 2017 | http://epydoc.sourceforge.net |