Hubble PHY v-1 / v1 preamble detector, FSK decoder, and spectrogram computation
Project description
hubble-satnet-decoder
Hubble PHY v-1 / v1 preamble detector, FSK decoder, and spectrogram computation — extracted as a standalone, pip-installable library.
Install
pip install hubble-satnet-decoder
Or for development:
git clone https://github.com/hubblenetwork/hubble-satnet-decoder.git
cd hubble-satnet-decoder
pip install -e ".[dev]"
Quick start
import numpy as np
from hubble_satnet_decoder import decode_signal, configure
# (optional) override the default sample rate
configure(sample_rate=781_250)
# Load 1 second of IQ data (complex64)
iq = np.load("capture.npy")
packets, detections, attempts = decode_signal(iq)
for pkt in packets:
print(f"Device 0x{pkt['ntw_id']:08X} seq={pkt['seq_num']} "
f"chipset={pkt.get('chipset', 'v-1')}")
API reference
decode_signal(signal) -> (packets, detections, attempts)
Full dual-protocol decode pipeline on a 1-second IQ chunk.
detect_preambles(spec_img, t_det, f_det) -> (time, freq, scores, phy_ver)
Dual-template preamble detection via OpenCV + NMS.
compute_spec_chunk(iq_chunk) -> Sxx_dB
Compute a visualisation spectrogram (freq × time) for an IQ chunk.
configure(sample_rate=None)
Recompute all sample-rate-dependent derived values.
Constants
from hubble_satnet_decoder import (
SYNTH_RES, # per-chipset synthesiser resolution (Hz)
CHANNEL_SPACING, # nominal channel spacing (Hz)
DEVICE_CHANNEL_SPACING,# actual per-device channel spacing
HOPPING_SEQS, # frequency hopping sequences
RS_N_V1, RS_K_V1, # Reed-Solomon block sizes (v1)
PREAMBLE_CODE_V1, # v1 preamble code [63,0,63,0,63,0,63,63]
)
Chipset statistics
from hubble_satnet_decoder import get_chipset_stats, reset_chipset_stats
stats = get_chipset_stats() # {"nordic": {"detected": 5, "ok": 4, ...}, ...}
reset_chipset_stats()
Releasing
- Bump the version in
pyproject.toml(e.g.version = "1.0.2") - Write release notes in
release-notes.md— categorise commits since the last tag underAdded,Fixed,Documentation,Tests, andMaintenanceheadings - Commit:
git add pyproject.toml release-notes.md git commit -m "chore: release X.Y.Z"
- Tag and push:
git tag vX.Y.Z git push origin main git push origin vX.Y.Z
- Approve the publish — the tag push triggers the GitHub Actions workflow which runs tests, builds the package, and publishes to PyPI. Approve the publish step in the GitHub Actions UI (the
pypienvironment gate).
Tip: The
/releaseClaude Code skill automates steps 1–4.
License
Apache-2.0 — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hubble_satnet_decoder-1.1.1.tar.gz.
File metadata
- Download URL: hubble_satnet_decoder-1.1.1.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1687f31a9ebf816beafc59119bcfc96880ff457420844c2edf7aec83c8f3bdf7
|
|
| MD5 |
688aab91c76d0b7101a2e99c87e8128a
|
|
| BLAKE2b-256 |
e503f0e5635e1fb91feaf4e3b19bea6bf8d29064d55e928eac45b5dfd00191f5
|
Provenance
The following attestation bundles were made for hubble_satnet_decoder-1.1.1.tar.gz:
Publisher:
release.yml on HubbleNetwork/hubble-satnet-decoder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hubble_satnet_decoder-1.1.1.tar.gz -
Subject digest:
1687f31a9ebf816beafc59119bcfc96880ff457420844c2edf7aec83c8f3bdf7 - Sigstore transparency entry: 1203595050
- Sigstore integration time:
-
Permalink:
HubbleNetwork/hubble-satnet-decoder@5b61274b533b8664df45106fb195e90fcd6961d0 -
Branch / Tag:
refs/tags/v1.1.1 - Owner: https://github.com/HubbleNetwork
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5b61274b533b8664df45106fb195e90fcd6961d0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file hubble_satnet_decoder-1.1.1-py3-none-any.whl.
File metadata
- Download URL: hubble_satnet_decoder-1.1.1-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e09e54479a1a722c4979aa6915b5bbf347233a86a155375002feb02d512dc67e
|
|
| MD5 |
36ebb098dbf001c8cd5212ee747f5b01
|
|
| BLAKE2b-256 |
b9c465fae6de314ffedec41b3e75065da53a310df49b405894b8cef78e92f13f
|
Provenance
The following attestation bundles were made for hubble_satnet_decoder-1.1.1-py3-none-any.whl:
Publisher:
release.yml on HubbleNetwork/hubble-satnet-decoder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hubble_satnet_decoder-1.1.1-py3-none-any.whl -
Subject digest:
e09e54479a1a722c4979aa6915b5bbf347233a86a155375002feb02d512dc67e - Sigstore transparency entry: 1203595052
- Sigstore integration time:
-
Permalink:
HubbleNetwork/hubble-satnet-decoder@5b61274b533b8664df45106fb195e90fcd6961d0 -
Branch / Tag:
refs/tags/v1.1.1 - Owner: https://github.com/HubbleNetwork
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5b61274b533b8664df45106fb195e90fcd6961d0 -
Trigger Event:
push
-
Statement type: