lasp / lasp/space_packet_parser
Support Optionally Skipping Enum String Representations in create_dataset
@blakedehaas is already working on this.
Since May 28, 2026.
- Dominant language
- Python
- Stars
- 39
- Forks
- 15
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 12
Description
Context
If an XTCE definition contains enum parameter types mapping numeric values to string labels, SPP converts those numeric values to strings in its output. This is fine and it does follow the strict interpretation of the XTCE packet definition, but some users may find it more desirable to get the numeric representations for enum fields for downstream reasons.
For example, if an enum field is encoded as a uint8 in binary, but expanded to a 32 char string, we have just created a 32x data volume increase to store that string, in addition to all the additional fragility that comes with storing string values in data products (are they ASCII? Unicode? Fixed length? What's the max length? etc).
Driving Requirements
Enable create_dataset to generate its output Dataset containing the numeric values for EnumeratedParameterType fields instead of strings.
Implementation Requirements
- kwarg to create_dataset for
disable_enum_labels - Think about how to reliably use the raw_value for enum parameters (they come out as StringParameter objects) when creating the xarray dataset and determining the correct numpy dtype.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.