Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EdosL0Util
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SIPS
EdosL0Util
Commits
3f6e3f87
Commit
3f6e3f87
authored
9 years ago
by
Bruce Flynn
Browse files
Options
Downloads
Patches
Plain Diff
Use Timecode base class
parent
8f800236
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
edosl0util/headers.py
+12
-7
12 additions, 7 deletions
edosl0util/headers.py
edosl0util/merge.py
+0
-4
0 additions, 4 deletions
edosl0util/merge.py
with
12 additions
and
11 deletions
edosl0util/headers.py
+
12
−
7
View file @
3f6e3f87
...
...
@@ -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
()
This diff is collapsed.
Click to expand it.
edosl0util/merge.py
+
0
−
4
View file @
3f6e3f87
...
...
@@ -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__
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment