gwdetchar.const module¶
Constants for gwdetchar
- gwdetchar.const.gps_epoch(gpstime, default=None)[source]¶
Returns the epoch name containing the given GPS time
- Parameters:
- gpstime
float,int the GPS time to match
- default
str, optional the epoch to return if
gpstimedoesn’t match any known epoch, default is to raiseValueError
- gpstime
- Returns:
- epoch
str the name of the containing epoch, or
defaultif given
- epoch
- Raises:
- ValueError
if
gpstimedoesn’t match any known epoch, anddefaultwas not given
Examples
>>> from gwdetchar.const import gps_epoch >>> print(gps_epoch(1126259462)) 'O1' >>> print(gps_epoch(0, default='ER0') 'ER0'