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
f60d0b70
Commit
f60d0b70
authored
9 years ago
by
Bruce Flynn
Browse files
Options
Downloads
Patches
Plain Diff
README
parent
2049cbe1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README
+82
-0
82 additions, 0 deletions
README
with
82 additions
and
0 deletions
README
0 → 100644
+
82
−
0
View file @
f60d0b70
# EdosL0Util
Tools for mangling EDOS L0 PDS files.
### Features:
* API for streaming packets
* CLI tools for:
- merging multiple PDS files
- splitting pds into X minute files
- truncating files to specified time range
- inspecting PDS info
* Dumping JPSS H5 RDRs to L0 PDS files
### Packet streaming
To obtain a simple stream of packets, with support for secondary header
parsing use the ``PacketStream`` class as an iterator.
>>> from edosl0util.stream import PacketStream
>>> stream = PacketStream(open('P1570826VIIRSSCIENCEAS15286023813501.PDS'))
>>> stream.next()
<Packet apid=826 seqid=13072 stamp=2015-10-13 00:22:04.042798>
>>> packets = list(stream)
>>> first, last, info = stream.info()
>>> print info
defaultdict(<function edosl0util.stream.<lambda>>,
{800: {'count': 32351, 'last_seqid': 16043, 'num_missing': 0},
801: {'count': 32351, 'last_seqid': 16043, 'num_missing': 0},
802: {'count': 32351, 'last_seqid': 16043, 'num_missing': 0},
803: {'count': 32351, 'last_seqid': 16043, 'num_missing': 0},
804: {'count': 32351, 'last_seqid': 16043, 'num_missing': 0},
805: {'count': 32351, 'last_seqid': 16043, 'num_missing': 0},
806: {'count': 59005, 'last_seqid': 2684, 'num_missing': 0},
807: {'count': 32351, 'last_seqid': 16043, 'num_missing': 0},
808: {'count': 59007, 'last_seqid': 2686, 'num_missing': 0},
809: {'count': 59007, 'last_seqid': 2686, 'num_missing': 0},
810: {'count': 32351, 'last_seqid': 16043, 'num_missing': 0},
811: {'count': 59007, 'last_seqid': 2686, 'num_missing': 0},
812: {'count': 59007, 'last_seqid': 2686, 'num_missing': 0},
813: {'count': 114543, 'last_seqid': 5214, 'num_missing': 0},
814: {'count': 59007, 'last_seqid': 2686, 'num_missing': 0},
815: {'count': 58994, 'last_seqid': 2673, 'num_missing': 0},
816: {'count': 58990, 'last_seqid': 2669, 'num_missing': 0},
817: {'count': 114510, 'last_seqid': 5181, 'num_missing': 0},
818: {'count': 62766, 'last_seqid': 11834, 'num_missing': 0},
819: {'count': 62766, 'last_seqid': 11834, 'num_missing': 0},
820: {'count': 62766, 'last_seqid': 11834, 'num_missing': 0},
821: {'count': 59007, 'last_seqid': 2686, 'num_missing': 0},
825: {'count': 83280, 'last_seqid': 3768, 'num_missing': 0},
826: {'count': 3471, 'last_seqid': 158, 'num_missing': 0}})
To handle ``PacketTooShort`` and ``NonSequentialSeqId`` errors you have to
iterate manually:
>>> from edosl0util.stream import PacketStream
>>> stream = PacketStream(open('P1570826VIIRSSCIENCEAS15286023813501.PDS'))
>>> while True:
...: try:
...: packet = stream.next()
...: print(packet)
...: except PacketTooShort as err:
...: print("Corrupt packet stream: {:s}".format(packet))
...: break
...: except NonConsecutiveSeqId as err:
...: print("Missing packet: {:s}".format(err))
...: except StopIteration:
...: break
### Command Line Tools
There are command line tools for merging, splitting, truncating and inspecting
L0 PDS files.
* edosl0merge
* edosl0split
* edosl0trunc
* edosl0info
* rdr2l0
If you have quesions or comments related to this software contac
brucef@ssec.wisc.edu.
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