Repository navigation
Rename L1 to L0.5 in the decommutator - #75
Merged
Merged
Conversation
The decommutator converts L0 files into L0.5 CDF files, but the code inherited from the original pipeline sometimes called them L1. Rename swp_spc_l02l1.py to swp_spc_l0_to_l05.py, update imports and log messages to match, and use L0.5 in docstrings and comments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The decommutator writes L0.5 CDF files, so rename the output directory option of pfc_decommutator from --l1dir (-dl1) to --l05dir (-dl05), and the corresponding parameter of swp_spc_l0_to_l05.main from l1dir to l05dir. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
namurphy
commented
Oct 7, 2026
Comment on lines
+3
to
34
| # The original version of this file from /psp/code on fc was swp_spc_l02l1.py, | ||
| # which was run as a script. | ||
|
|
||
| # While the decommutator step goes from level 0 (L0) to level 0.5 (L05 or L0.5), | ||
| # the software and filenames has sometimes used level 1 (L1) for level 0.5. | ||
|
|
||
| # The following are relic comments from the previous file. | ||
|
|
||
| # Purpose: Convert binary "level-zero" or "ssr" files that come from the SWEM or Spacecraft | ||
| # into L0.5 CDF files | ||
|
|
||
| # Requirements: Must have a reference to a skeleton file for the ApID that you wish to convert_one | ||
|
|
||
| # Input: path to a binary L0 file | ||
|
|
||
| # Output: saves a CDF file | ||
|
|
||
| # Revision History | ||
| # 2020/02/03 - Fix timing bug in 0x351 that arose when switching to spiceypy. Add capability to produce 0x352 (time series) files. Will require update to 0x352 (time series) skeleton also. Update bug in naming of L1 files coming from gzip (spacecraft files, probably). Remove versioning from skeleton files (since SVN is taking care of that). | ||
| # 2020/01/29 - Use spiceypy to adjust time of each measurement to SCET; remove unused command-line argument options | ||
| # Change method by which newest skeleton files are found; various other cleanups | ||
| # 2019/08/27 - Calling new ccsds_reader that separates out s/c from instr. packets | ||
| # - Also, new ccsds_reader will use new packet finder (much faster), and does not scan through packets like before | ||
| # 2019/08/23 - Fixed bug that was reading in the oldest rather than newest skeleton file | ||
| # - Added capability to read 0x081 and 0x262 packets from s/c hsk files. Requires link to SC_HK.blk block definition file | ||
| # - Added revision history | ||
|
|
||
|
|
||
| # $URL: file:///psp/psp_swp_spc_code_repository/trunk/swp_spc_l02l1.py $ | ||
| # $LastChangedRevision: 97 $ | ||
| # $LastChangedDate: 2020-08-04 09:20:42 -0400 (Tue, 04 Aug 2020) $ | ||
| # $LastChangedBy: acase $ |
Member
Author
There was a problem hiding this comment.
We'll likely want to remove this eventually, but it's helpful context for now.
namurphy
commented
Oct 7, 2026
Comment on lines
-34
to
-37
| def _read_stdin(ptp: bool = False, verbose: bool = False) -> None: # ruff:ignore[FBT001, FBT002] | ||
| """Parse binary stream on stdin""" # ruff:ignore[D400] | ||
|
|
||
|
|
Member
Author
There was a problem hiding this comment.
This function didn't do anything, and wasn't used anywhere else either.
namurphy
commented
Oct 7, 2026
namurphy
commented
Oct 7, 2026
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.
The decommutator converts L0 files into L0.5 CDF files, but the code inherited from the original pipeline sometimes refers to them as L1. This PR makes the naming consistent.
swp_spc_l02l1.pytoswp_spc_l0_to_l05.py, and update imports, the README, and log messages.--l1dir(-dl1) option ofpfc_decommutatorto--l05dir(-dl05), and thel1dirparameter ofswp_spc_l0_to_l05.maintol05dir. This is a breaking change for anyone using the old option or keyword argument._read_stdinstub fromccsds_reader_pipeline.py.ccsds_reader_pipeline.pyandswp_spc_l0_to_l05.py.Not changed here: the
_L1.cdfoutput file suffix, thel1pathvariable, and thesc_hsk/L1/data directory, since renaming these would change outputs or data paths.🤖 Generated with Claude Code