Site Logo
Site Logo
Heliophysics Software Search Interface

CCSDSPy

2.0.0
Citation

Software

Concise Description
I/O interface and utilities for CCSDS binary spacecraft data in Python. Library used in flight missions at NASA, NOAA, and SWRI.
Description
I/O interface and utilities for CCSDS binary spacecraft data in Python. Library used in flight missions at NASA, NOAA, and SWRI. CCSDSPy provides a Python interface for reading and writing the tightly packed bits of the Consultative Committee for Space Data Systems (CCSDS) Space Packet Protocol, the low-level telemetry format used by many NASA and ESA missions. Users describe a packet's layout declaratively with PacketField and PacketArray objects — or load that layout from a CSV definition file — and CCSDSPy decodes a binary telemetry file into a dictionary of NumPy arrays using vectorized shifting and masking. The FixedLength class handles packets whose layout never changes, while the VariableLength class handles packets containing a field that expands to fill the packet or whose length is set by another field. Fields need not be byte-aligned and may have odd bit lengths, unsigned or signed integer, IEEE floating point, string, or fill types, and big-endian, little-endian, or arbitrary byte orderings. A converter system applies post-processing to decoded fields, including linear and polynomial calibration curves, integer-to-string enumeration replacement, datetime construction from coarse and fine time offsets against a reference epoch, and byte stringification in binary, hexadecimal, or octal. Utility functions read primary headers, split a mixed-APID downlink stream by APID (also available as a python -m ccsdspy split command line tool), iterate over or count packets, and validate a packet file for truncation, extra bytes, unknown APIDs, and missing or out-of-order sequence counts. Both packet classes can also write synthetic CCSDS packet files from user-supplied arrays for testing and validation. The library is pure Python, is developed with requirements sourced from the community, is extensively tested, and is a Python in Heliophysics Community (PyHC) package.
Authors
Functionality
Technical Details
Data & File Formats
Science Context
Keywords
Related Items
Licensing & Funding
Version Information