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
gpstime
doesn’t match any known epoch, default is to raiseValueError
- gpstime
- Returns:
- epoch
str
the name of the containing epoch, or
default
if given
- epoch
- Raises:
- ValueError
if
gpstime
doesn’t match any known epoch, anddefault
was not given
Examples
>>> from gwdetchar.const import gps_epoch >>> print(gps_epoch(1126259462)) 'O1' >>> print(gps_epoch(0, default='ER0') 'ER0'