pycadu
Satellite-agnostic CCSDS/CADU/VCDU frame handling in Python.
Reads raw downlink files containing CADU (Channel Access Data Unit) blocks, reassembles VCDU payloads, and yields instrument frames delimited by a caller-supplied sync pattern: a frame runs to the next sync pattern, or to the instrument’s frame size if that comes first. Works with any CCSDS-compliant downlink: VIIRS, MERSI, MODIS, etc.
Installation
pip install pycadu
Quick start
from pycadu import iter_vcdu_frames
MERSI_SYNC = bytes([0xAA, 0x55] * 6)
MERSI_FRAME_SIZE = 0x38E4F4
MERSI_VCID = 3
for frame in iter_vcdu_frames(
"FY3D_20240101.dat",
pattern=MERSI_SYNC,
frame_size=MERSI_FRAME_SIZE,
vcid=MERSI_VCID,
stride=1024, # or 896 / 1072 depending on ground station
):
process(frame)
API
pycadu
iter_vcdu_frames(path, pattern, frame_size, vcid, stride) — top-level convenience.
pycadu.cadu
detect_cadu_stride(data) — infer stride (896 / 1024 / 1072) from a sample.
extract_cadu_data(block, stride) — strip RS parity / annotation bytes.
extract_vcdu_payload(cadu) — strip CCSDS primary header.
extract_vcid(block) — read the 6-bit virtual channel identifier.
CADU_STRIDE_1072 — 1072-byte stride (1024-byte CADU + 48 annotation bytes).
pycadu.sync
find_sync_pattern(data, pattern, start) — search at all 8 bit offsets.
_build_shifted(data, shift) — build a bit-shifted copy of data.
pycadu.reader
cadu_blocks(path, stride) — stream physical blocks from a file.
vcdu_payloads(blocks, stride, target_vcid) — filter by VCID, strip headers.
vcdu_frames(payloads, pattern, frame_size) — reassemble variable-length chunks into frames of at most frame_size bytes, each ending at the next sync pattern, handling 0-7 bit shifts automatically.
read_frames_batch(path, stride, vcid, pattern, frame_size) — memory-mapped bulk reader, ~20x faster than the streaming path on large files.
pycadu.constants
CCSDS_SYNC_MARKER, CADU_STRIDE_896, CADU_STRIDE_1024, RS_PARITY_LENGTH, CADU_DATA_LENGTH, CCSDS_HEADER_LENGTH, VCDU_PAYLOAD_LENGTH.
Metadata
Release files for pycadu 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pycadu-0.2.0.tar.gz | 52.1 kB | Without provenance | Details for pycadu-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pycadu-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for pycadu-0.2.0-py3-none-any.whl |
Total release size: 72.1 kB
Release files / pycadu-0.2.0.tar.gz
| Download URL | pycadu-0.2.0.tar.gz |
|---|---|
| Size | 52.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da0c5ec7a4f6a51b938d3d5a53f1e778a5f49ffd4f990f8767e3c459f360cb64
|
|
BLAKE2b-256 checksum How to use checksums |
20bd49dfb1d31e1c1671d8697fcc2819a70f62493910e1b6680e55081faeb2ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Red Hat Enterprise Linux","version":"10.2","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / pycadu-0.2.0-py3-none-any.whl
| Download URL | pycadu-0.2.0-py3-none-any.whl |
|---|---|
| Size | 20.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3f07ff03ff92466d49851f776ed9ad3b0ccde12519b15d455b5428926ebde82
|
|
BLAKE2b-256 checksum How to use checksums |
a93483f8fc47480d2334295f31e7b6af717f3023f2d267df8134025642514d12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Red Hat Enterprise Linux","version":"10.2","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for pycadu 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.