Add ccsds_reader_pipeline.py - #13
Merged
Merged
Conversation
namurphy
commented
Sep 3, 2026
Comment on lines
+37
to
+40
| ######################################### | ||
| def read_stdin(ptp=False, verbose=False): # noqa: ANN001, ANN201, FBT002 | ||
| """Parse binary stream on stdin""" # noqa: D400 | ||
|
|
Member
Author
There was a problem hiding this comment.
This function originally had naught but a pass, so we can probably delete it...though it may be used elsewhere.
namurphy
commented
Sep 3, 2026
|
|
||
|
|
||
| ######################################### | ||
| def wrapper_status(path="", verbose=False, gzip=False, spconly=False): # noqa: ANN001, ANN201, ARG001, D103, FBT002 |
Member
Author
There was a problem hiding this comment.
We can probably use the Parameter design pattern here at least partially, since there are functions with overlap in inputs.
ccsds_reader_pipeline.pyccsds_reader_pipeline.py
namurphy
commented
Sep 3, 2026
Comment on lines
+110
to
+121
| # Define a pattern that will match a SWEM wrapper header and an SPC instrument header | ||
| pattern = struct.pack("1B", 0x0B) | ||
| pattern += b"[" | ||
| for wrap_ap in wrapper_apids: # allowable wrapper apids | ||
| pattern += struct.pack("1B", wrap_ap & 255) | ||
| pattern += b"]" | ||
| pattern += b"." * 10 | ||
| pattern += struct.pack("1B", 0x0B) | ||
| pattern += b"[" | ||
| for inst_ap in ok_apids: # allowable SPC instrument apids | ||
| pattern += struct.pack("1B", inst_ap & 255) | ||
| pattern += b"]" |
Member
Author
There was a problem hiding this comment.
We may want to extract this into a standalone function so that we can write tests for it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull requests adds
ccsds_reader_pipeline.pyto a newpipelinesubpackage, which contains the bulk of the functionality for the decommutation step (level 0 to level 0.5). This PR includes autoformatting and safe fixes to get the pre-commit checks to pass.Description
pipelinesubpackageccsds_reader_pipeline.pyfrom/psp/coderuff formatruff check