python-aaronia
Python bindings for
sdr-aaronia-rs.
Stream IQ samples from Aaronia SPECTRAN V6 devices, through an
RTSA-Suite PRO HTTP server block or the native SDK, or play back
recorded .rtsa files, into NumPy or Apache Arrow.
- PyPI package:
python-aaronia· importable module:aaronia - Wheels: abi3, CPython ≥ 3.9, one wheel per OS and architecture, plus an sdist for other platforms. Building from the sdist requires a Rust toolchain.
- License: GPL-3.0-or-later
Install
pip install python-aaronia
From a checkout, which requires Rust and maturin:
cd python-aaronia
maturin develop --release
Check your setup before writing any code:
aaronia-doctor http://localhost:54664
It reports whether the server is reachable, whether the mission has an input carrying IQ, and what rate the device is running, and names the fix for each failure.
Quickstart
import aaronia
with aaronia.open("http://localhost:54664", freq=2.44e9, bandwidth=10e6) as src:
for block in src.blocks(65536): # numpy complex64 arrays
process(block)
aaronia.open() connects and starts streaming in one call. bandwidth
asks for that much usable spectrum and picks a sample rate the hardware
can actually run; pass rate= instead to name one exactly. Use
file="capture.rtsa" in place of the URL to play back a recording.
Iterating with blocks() ends when the stream closes. To read on your
own schedule, or for Apache Arrow:
src = aaronia.open(freq=2.44e9, rate=15.36e6, format="I16")
samples = src.read_samples_numpy(65536) # numpy complex64 array
batch = src.read_samples_arrow(65536) # pyarrow FixedSizeListArray of [re, im]
src.set_center_frequency(2.41e9) # live retune, no teardown
print(src.cumulative_drops(), src.take_overrun(), src.last_timestamp_ns())
src.stop_streaming()
For full control, build an AaroniaConfig and pass it to
AaroniaSource.start_streaming(); open() is a shorthand for the
common fields.
The quickstart covers configuring the RTSA-Suite HTTP Server block, which everything above depends on.
Sample rates
The device runs a fixed ladder of rates: 61.44 MHz halved down to 120 kHz. Ask for anything else and it quietly uses the nearest rung, leaving your program computing against a rate that is not in use.
aaronia.sample_rates() # every rate, highest first
aaronia.sample_rate_for_bandwidth(8e6) # 15.36e6: the lowest rate covering 8 MHz
A rate carries only 80% of itself as alias-free bandwidth, which is why 8 MHz of spectrum needs 15.36 MHz of sampling.
Configuration (AaroniaConfig)
Every field is readable and writable.
| Field | Meaning |
|---|---|
http_base_url |
RTSA-Suite HTTP server URL; pins the HTTP backend |
file_path |
Path to a recorded .rtsa file; pins the file backend |
device_serial |
Device selection for the native-SDK backend |
center_freq |
Center frequency, Hz |
sample_rate |
IQ sample rate, Hz (the Aaronia "span") |
reference_level |
Reference level, dBm |
format |
HTTP wire format: "F32", "F16" or "I16". I16 is the low-bandwidth network mode |
receiver_channel |
"Rx1" (default), "Rx2", or "Rx1And2" (native SDK, full V6) |
read_timeout |
Seconds a blocking read waits before AaroniaTimeoutError (default 30.0) |
auto_reconnect |
Reconnect the HTTP stream after a drop (default True) |
Unknown format/receiver_channel strings raise ValueError instead of
silently defaulting.
Behaviour
- One copy per read. Samples are copied once from the Rust receive buffer into a NumPy or Arrow owned buffer, which is then safe to hold indefinitely. This is not zero-copy; one copy is the accurate count.
- Blocking calls release the GIL. Other Python threads keep running;
KeyboardInterruptis delivered between calls. Reads block untilcountsamples arrive orcfg.read_timeoutseconds (default 30) elapse, which raisesAaroniaTimeoutError. - Connecting retries transient failures, up to 4 attempts within a
10 second budget, so a cold
*.localhostname or a server that is still starting does not fail on the first attempt. - Dropped streams reconnect automatically when
auto_reconnectis enabled, which is the default. The reader reopens the stream, re-applies the current tuning, and flags the first read after the gap throughtake_overrun(). After five failed attempts the stream ends and reads raiseAaroniaStreamClosed. - Typed exceptions.
AaroniaConnectionError(unreachable endpoint),AaroniaTimeoutError,AaroniaHardwareError(device and SDK errors) andValueError(invalid configuration), mapped from the Rust error enum with the full cause chain in the message.AaroniaStreamClosedsubclassesAaroniaConnectionErrorand means the stream finished rather than failed;blocks()ends on it, while a timeout or transport failure still raises. - Dual-channel reads (
receiver_channel = "Rx1And2"withread_samples_dual_numpy(count), returning two time-aligned arrays) require the native-SDK backend: Windows or Linux with the Aaronia SDK installed, and a two-input V6. This path is hardware-unverified; the development device is a single-channel V6 ECO.
Source methods
| Method | Purpose |
|---|---|
start_streaming(cfg) / stop_streaming() |
Session lifecycle |
with src: ... |
Stops streaming on the way out, including after an exception |
blocks(count) |
Iterate count-sample arrays until the stream closes |
read_samples_numpy(count) |
NumPy complex64 array |
read_samples_arrow(count) |
PyArrow FixedSizeListArray of [re, im] float32 pairs |
read_samples_dual_numpy(count) |
(rx1, rx2) NumPy arrays (dual-channel captures) |
set_center_frequency(hz) / set_sample_rate(hz) / set_reference_level(dbm) |
Live retuning |
cumulative_drops() |
Total server-reported dropped samples |
take_overrun() |
True once per detected receive-side overrun |
last_timestamp_ns() |
Epoch-ns timestamp of the last received block (HTTP backend; 0 otherwise) |
Module functions
| Function | Purpose |
|---|---|
open(url=None, *, freq, rate, bandwidth, ref_level, file, format, read_timeout) |
Configure, connect and start streaming in one call |
sample_rates() |
Every sample rate the hardware can run |
sample_rate_for_bandwidth(hz) |
Lowest rate covering that much spectrum |
diagnose(url) |
(ok, message, fix) for each setup check; what aaronia-doctor prints |
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
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 python_aaronia-0.7.2.tar.gz.
File metadata
- Download URL: python_aaronia-0.7.2.tar.gz
- Upload date:
- Size: 427.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f114cf379aad2c37f7050423dbdef9d500b41e791894df6b12f6cf4213e4bd35
|
|
| MD5 |
a9ea8db23f43fd65e8ab4ca571211fb4
|
|
| BLAKE2b-256 |
e21c490b7ec92a134e0ef054963a8e5927ed7195dbd120d9153cd85f102650a0
|
Provenance
The following attestation bundles were made for python_aaronia-0.7.2.tar.gz:
Publisher:
release.yml on isaacbentley/sdr-aaronia-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_aaronia-0.7.2.tar.gz -
Subject digest:
f114cf379aad2c37f7050423dbdef9d500b41e791894df6b12f6cf4213e4bd35 - Sigstore transparency entry: 2434139732
- Sigstore integration time:
-
Permalink:
isaacbentley/sdr-aaronia-rs@f1db5ecda1bafe796c862354cc252dcb6860fcdb -
Branch / Tag:
refs/tags/v0.7.2 - Owner: https://github.com/isaacbentley
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f1db5ecda1bafe796c862354cc252dcb6860fcdb -
Trigger Event:
push
-
Statement type:
File details
Details for the file python_aaronia-0.7.2-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: python_aaronia-0.7.2-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a1f3e0f0747ea6be9de727444ef512fac9c24a8f2f1e64e25bc621c62fe2fea
|
|
| MD5 |
721bcae75a5871d50c5a4facc2a99578
|
|
| BLAKE2b-256 |
a2258ea7321cc4de10a3cdc91d1430c6a16fe40f85765d3bd9a7bc606ad33c55
|
Provenance
The following attestation bundles were made for python_aaronia-0.7.2-cp39-abi3-win_amd64.whl:
Publisher:
release.yml on isaacbentley/sdr-aaronia-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_aaronia-0.7.2-cp39-abi3-win_amd64.whl -
Subject digest:
9a1f3e0f0747ea6be9de727444ef512fac9c24a8f2f1e64e25bc621c62fe2fea - Sigstore transparency entry: 2434140677
- Sigstore integration time:
-
Permalink:
isaacbentley/sdr-aaronia-rs@f1db5ecda1bafe796c862354cc252dcb6860fcdb -
Branch / Tag:
refs/tags/v0.7.2 - Owner: https://github.com/isaacbentley
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f1db5ecda1bafe796c862354cc252dcb6860fcdb -
Trigger Event:
push
-
Statement type:
File details
Details for the file python_aaronia-0.7.2-cp39-abi3-manylinux_2_39_x86_64.whl.
File metadata
- Download URL: python_aaronia-0.7.2-cp39-abi3-manylinux_2_39_x86_64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.9+, manylinux: glibc 2.39+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c90d23f8ec4091a52e1f0c524afba8635b23838e22aa8578a4005f4c4cc14237
|
|
| MD5 |
b6db76cfea2858ab46981a2b3ba2cced
|
|
| BLAKE2b-256 |
0b1ad1cae9c2b78595957e91f4ef2d08286a44114cda97cffc26973617efec2c
|
Provenance
The following attestation bundles were made for python_aaronia-0.7.2-cp39-abi3-manylinux_2_39_x86_64.whl:
Publisher:
release.yml on isaacbentley/sdr-aaronia-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_aaronia-0.7.2-cp39-abi3-manylinux_2_39_x86_64.whl -
Subject digest:
c90d23f8ec4091a52e1f0c524afba8635b23838e22aa8578a4005f4c4cc14237 - Sigstore transparency entry: 2434141168
- Sigstore integration time:
-
Permalink:
isaacbentley/sdr-aaronia-rs@f1db5ecda1bafe796c862354cc252dcb6860fcdb -
Branch / Tag:
refs/tags/v0.7.2 - Owner: https://github.com/isaacbentley
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f1db5ecda1bafe796c862354cc252dcb6860fcdb -
Trigger Event:
push
-
Statement type:
File details
Details for the file python_aaronia-0.7.2-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: python_aaronia-0.7.2-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.4 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14f9d6e38943b3add3238fe54b655672d196b97a8d3767b61261dd998f88ba42
|
|
| MD5 |
19e3594e21a4e1bb70ac122594758ae3
|
|
| BLAKE2b-256 |
2450e2336496683f66ec846f356c8732e202f8c32707674843ee591e2fee6c40
|
Provenance
The following attestation bundles were made for python_aaronia-0.7.2-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on isaacbentley/sdr-aaronia-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_aaronia-0.7.2-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
14f9d6e38943b3add3238fe54b655672d196b97a8d3767b61261dd998f88ba42 - Sigstore transparency entry: 2434140106
- Sigstore integration time:
-
Permalink:
isaacbentley/sdr-aaronia-rs@f1db5ecda1bafe796c862354cc252dcb6860fcdb -
Branch / Tag:
refs/tags/v0.7.2 - Owner: https://github.com/isaacbentley
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f1db5ecda1bafe796c862354cc252dcb6860fcdb -
Trigger Event:
push
-
Statement type: