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
bf708e62
Commit
bf708e62
authored
4 years ago
by
Bruce Flynn
Browse files
Options
Downloads
Patches
Plain Diff
fix bad kw
parent
341356fa
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
edosl0util/eos.py
+7
-6
7 additions, 6 deletions
edosl0util/eos.py
with
7 additions
and
6 deletions
edosl0util/eos.py
+
7
−
6
View file @
bf708e62
...
...
@@ -5,7 +5,6 @@ References:
Document Number 151840, May 1997, Appendix C
https://directreadout.sci.gsfc.nasa.gov/documents/satellite_gen/MODIS_UG.pdf
"""
import
struct
packet_types
=
{
0
:
"
day
"
,
...
...
@@ -46,10 +45,11 @@ def pkttype(p):
def
frame_count
(
p
):
x
=
int
.
from_bytes
(
b
'
\x00\x00
'
+
p
.
data
[:
2
],
'
big
'
)
x
=
int
.
from_bytes
(
b
"
\x00\x00
"
+
p
.
data
[:
2
],
"
big
"
)
if
sourceid
(
p
)
==
"
earthdata
"
:
return
x
>>
4
&
0x7ff
return
x
>>
4
&
0x3f
return
x
>>
4
&
0x7FF
return
x
>>
4
&
0x3F
# Combination of source ids and packet types to their position within a scan.
_sort_indexes
=
{
...
...
@@ -62,8 +62,9 @@ _sort_indexes = {
"
eng2
"
:
7
,
}
def
_modis_sort_key
(
p
):
"""
Return a tuple that will maintain order for this packet in a stream of
"""
Return a tuple that will maintain order for this packet in a stream of
MODIS data. Intended to be used as a key func for sorting.
Packets are sorted in the order defined in _sort_indexes.
...
...
@@ -73,4 +74,4 @@ def _modis_sort_key(p):
def
sort_modis
(
packets
):
return
sorted
(
packets
,
key
=
_sort_key
)
\ No newline at end of file
return
sorted
(
packets
,
key
=
_modis_sort_key
)
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