diff --git a/edosl0util/headers.py b/edosl0util/headers.py index df27606c3c35cada2275e784cda3ecfb24f26d6f..f21c68c893c5c2c1e5efa4033d3026db78d8cb8c 100644 --- a/edosl0util/headers.py +++ b/edosl0util/headers.py @@ -35,7 +35,16 @@ class BaseStruct(c.BigEndianStructure): return '<%s (%s)>' % (self.__class__.__name__, fields) -class AquaCucTimecode(BaseStruct): +class Timecode(BaseStruct): + + def astimestamp(self): + raise NotImplementedError() + + def asdatetime(self): + raise NotImplementedError() + + +class AquaCucTimecode(Timecode): """ EOS AQUA implementation of a CCSDS Unsegmented Timecode. An CUT is an agency defined timecode which is in this case (I think) specific to Aqua. @@ -71,7 +80,7 @@ class AquaCucTimecode(BaseStruct): return self.EPOCH + timedelta(seconds=seconds, microseconds=micros) -class DaySegmentedTimecode(BaseStruct): +class DaySegmentedTimecode(Timecode): _pack_ = 1 _fields_ = [ ('days', c.c_uint16), @@ -216,16 +225,12 @@ def jpss_header_lookup(primary_header): grouping = primary_header.sequence_grouping if grouping == GROUP_FIRST: return JpssFirstSecondaryHeader - #elif grouping == GROUP_CONTINUING: - # return JpssSecondaryHeader - #elif grouping == GROUP_LAST: - # return JpssSecondaryHeader elif grouping == GROUP_STANDALONE: return JpssSecondaryHeader -_aqua_headers = aqua_headers() def aqua_header_lookup(primary_header): # noqa apid = primary_header.apid grouping = primary_header.sequence_grouping return _aqua_headers.get((apid, grouping)) +_aqua_headers = aqua_headers() diff --git a/edosl0util/merge.py b/edosl0util/merge.py index dd2a448738c74987038e6e8f8bd25f3aac6b023a..17b2a578d644afc3e70793f23e2515c9fd618118 100644 --- a/edosl0util/merge.py +++ b/edosl0util/merge.py @@ -9,10 +9,6 @@ from edosl0util.stream import ( make_streams, ) -# date used as a flag value for comparissons -_FLAG_DATE = datetime(1900, 1, 1) - - LOG = logging.getLogger(__name__)