python-aaronia 0.5.0__cp39-abi3-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
aaronia/__init__.py
ADDED
aaronia/aaronia.pyd
ADDED
|
Binary file
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: python-aaronia
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Classifier: Programming Language :: Rust
|
|
5
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
7
|
+
Classifier: Topic :: Communications :: Ham Radio
|
|
8
|
+
Classifier: Topic :: Scientific/Engineering
|
|
9
|
+
Summary: Python bindings for sdr-aaronia-rs (Aaronia SPECTRAN V6 SDR source)
|
|
10
|
+
License: GPL-3.0-or-later
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
13
|
+
Project-URL: Changelog, https://github.com/isaacbentley/sdr-aaronia-rs/blob/main/CHANGELOG.md
|
|
14
|
+
Project-URL: Repository, https://github.com/isaacbentley/sdr-aaronia-rs
|
|
15
|
+
|
|
16
|
+
# python-aaronia
|
|
17
|
+
|
|
18
|
+
Python bindings for [`sdr-aaronia-rs`](https://github.com/isaacbentley/sdr-aaronia-rs) —
|
|
19
|
+
stream IQ samples from Aaronia SPECTRAN V6 devices (via an RTSA-Suite PRO
|
|
20
|
+
HTTP server block or the native SDK) or play back recorded `.rtsa` files,
|
|
21
|
+
straight into NumPy or Apache Arrow.
|
|
22
|
+
|
|
23
|
+
- **PyPI package:** `python-aaronia` · **importable module:** `aaronia`
|
|
24
|
+
- **Wheels:** abi3, CPython ≥ 3.9, one wheel per OS/arch (plus an sdist
|
|
25
|
+
for everything else — building from source needs a Rust toolchain)
|
|
26
|
+
- **License:** GPL-3.0-or-later
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install python-aaronia
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Or from a checkout (requires Rust + [maturin](https://maturin.rs)):
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
cd python-aaronia
|
|
38
|
+
maturin develop --release
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Quickstart
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
import aaronia
|
|
45
|
+
|
|
46
|
+
cfg = aaronia.AaroniaConfig()
|
|
47
|
+
cfg.http_base_url = "http://localhost:54664" # RTSA-Suite HTTP server block
|
|
48
|
+
cfg.center_freq = 2.44e9 # Hz
|
|
49
|
+
cfg.sample_rate = 15.36e6 # Hz
|
|
50
|
+
cfg.format = "F32" # wire format: F32, F16, or I16
|
|
51
|
+
|
|
52
|
+
src = aaronia.AaroniaSource()
|
|
53
|
+
src.start_streaming(cfg)
|
|
54
|
+
|
|
55
|
+
samples = src.read_samples_numpy(65536) # numpy complex64 array
|
|
56
|
+
batch = src.read_samples_arrow(65536) # pyarrow FixedSizeListArray of [re, im]
|
|
57
|
+
|
|
58
|
+
src.set_center_frequency(2.41e9) # live retune, no teardown
|
|
59
|
+
|
|
60
|
+
print(src.cumulative_drops(), src.take_overrun(), src.last_timestamp_ns())
|
|
61
|
+
src.stop_streaming()
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
File playback: set `cfg.file_path = "capture.rtsa"` instead of
|
|
65
|
+
`http_base_url`.
|
|
66
|
+
|
|
67
|
+
## Configuration (`AaroniaConfig`)
|
|
68
|
+
|
|
69
|
+
Every field is readable and writable.
|
|
70
|
+
|
|
71
|
+
| Field | Meaning |
|
|
72
|
+
| --- | --- |
|
|
73
|
+
| `http_base_url` | RTSA-Suite HTTP server URL; pins the HTTP backend |
|
|
74
|
+
| `file_path` | Path to a recorded `.rtsa` file; pins the file backend |
|
|
75
|
+
| `device_serial` | Device selection for the native-SDK backend |
|
|
76
|
+
| `center_freq` | Center frequency, Hz |
|
|
77
|
+
| `sample_rate` | IQ sample rate, Hz (the Aaronia "span") |
|
|
78
|
+
| `reference_level` | Reference level, dBm |
|
|
79
|
+
| `format` | HTTP wire format: `"F32"`, `"F16"`, or `"I16"` (true low-bandwidth mode) |
|
|
80
|
+
| `receiver_channel` | `"Rx1"` (default), `"Rx2"`, or `"Rx1And2"` (native SDK, full V6) |
|
|
81
|
+
|
|
82
|
+
Unknown `format`/`receiver_channel` strings raise `ValueError` instead of
|
|
83
|
+
silently defaulting.
|
|
84
|
+
|
|
85
|
+
## Semantics worth knowing
|
|
86
|
+
|
|
87
|
+
- **One copy per read.** Samples are copied once out of the Rust receive
|
|
88
|
+
buffer into a NumPy/Arrow-owned buffer — safe to hold indefinitely.
|
|
89
|
+
(Not "zero-copy"; one copy is the honest count.)
|
|
90
|
+
- **Blocking calls release the GIL.** Other Python threads keep running;
|
|
91
|
+
`KeyboardInterrupt` is delivered between calls. Reads block until
|
|
92
|
+
`count` samples arrive or an internal 30 s timeout raises
|
|
93
|
+
`AaroniaTimeoutError`.
|
|
94
|
+
- **Typed exceptions.** `AaroniaConnectionError` (unreachable endpoint),
|
|
95
|
+
`AaroniaTimeoutError`, `AaroniaHardwareError` (device/SDK errors),
|
|
96
|
+
`ValueError` (invalid configuration) — mapped from the Rust error
|
|
97
|
+
enum, with the full cause chain in the message.
|
|
98
|
+
- **Dual-channel** (`receiver_channel = "Rx1And2"`,
|
|
99
|
+
`read_samples_dual_numpy(count)` → two time-aligned arrays) requires
|
|
100
|
+
the native-SDK backend: Windows/Linux with the Aaronia SDK installed,
|
|
101
|
+
and a full (two-input) V6. Hardware-unverified — the development
|
|
102
|
+
device is a single-channel V6 ECO.
|
|
103
|
+
|
|
104
|
+
## Source methods
|
|
105
|
+
|
|
106
|
+
| Method | Purpose |
|
|
107
|
+
| --- | --- |
|
|
108
|
+
| `start_streaming(cfg)` / `stop_streaming()` | Session lifecycle |
|
|
109
|
+
| `read_samples_numpy(count)` | NumPy `complex64` array |
|
|
110
|
+
| `read_samples_arrow(count)` | PyArrow `FixedSizeListArray` of `[re, im]` float32 pairs |
|
|
111
|
+
| `read_samples_dual_numpy(count)` | `(rx1, rx2)` NumPy arrays (dual-channel captures) |
|
|
112
|
+
| `set_center_frequency(hz)` / `set_sample_rate(hz)` / `set_reference_level(dbm)` | Live retuning |
|
|
113
|
+
| `cumulative_drops()` | Total server-reported dropped samples |
|
|
114
|
+
| `take_overrun()` | True once per detected receive-side overrun |
|
|
115
|
+
| `last_timestamp_ns()` | Epoch-ns timestamp of the last received block (HTTP backend; 0 otherwise) |
|
|
116
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
aaronia/__init__.py,sha256=Qz64NPjiy1rjLd1WAcT8CqPKIpZpmCInSsyd86BLF0I,111
|
|
2
|
+
aaronia/aaronia.pyd,sha256=SozBXg69Y4ed5JUoVrXg1CkoldZHzU_dZgFbrgQKMf0,6530560
|
|
3
|
+
python_aaronia-0.5.0.dist-info/METADATA,sha256=KsQo85cWSusMQVwlzkmbz5uTOqsKSYIUWKxuytg7hws,4787
|
|
4
|
+
python_aaronia-0.5.0.dist-info/WHEEL,sha256=_rgZdQc9sLFEqt2IemX7qyxsGt5fFRnBDATxGzerdmg,95
|
|
5
|
+
python_aaronia-0.5.0.dist-info/sboms/python-aaronia.cyclonedx.json,sha256=MU8rEEHwiW8o2GU3N7H8d__eY_1iN_IssXMcI7mMZNc,338964
|
|
6
|
+
python_aaronia-0.5.0.dist-info/RECORD,,
|