Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit caa1641

Browse files
committed
resolve conflicts
2 parents 12b265b + d6c2eca commit caa1641

7 files changed

Lines changed: 1185 additions & 646 deletions

File tree

custom_handlers/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
setuptools==69.5.1

experiments/mixed_experiments.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
import torch
2+
3+
torch.set_float32_matmul_precision("high")
4+
5+
16
from rfml.experiment import *
27

38
# Ensure that data directories have sigmf-meta files with annotations
@@ -230,6 +235,14 @@
230235
"spec_epochs": 0,
231236
"notes": "DJI Mavic3 Detection",
232237
},
238+
"experiment_siggen": {
239+
"class_list": ["am", "fm"],
240+
"train_dir": ["/scratch/tmp/rfmltest"],
241+
"iq_epochs": 10,
242+
"spec_epochs": 0,
243+
"notes": "narrowband test",
244+
"iq_only_start_of_burst": False,
245+
},
233246
}
234247

235248

@@ -255,6 +268,7 @@
255268
# "experiment_ettus_2",
256269
# "experiment_blade_2",
257270
# "experiment_mavic3",
271+
"experiment_siggen",
258272
]
259273

260274
train({name: experiments[name] for name in experiments_to_run})

label_scripts/label_siggen.py

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import glob
2+
3+
from pathlib import Path
4+
from tqdm import tqdm
5+
6+
import rfml.annotation_utils as annotation_utils
7+
import rfml.data as data_class
8+
9+
# generated with
10+
# $ for i in am fm ; do /scratch/iqtlabs/rfml/utils/siggen.py --samp_rate 1000000 --siggen $i --int_count 1000 ; done
11+
data_globs = {
12+
"am": ["/scratch/tmp/rfmltest/am.sigmf-meta"],
13+
"fm": ["/scratch/tmp/rfmltest/fm.sigmf-meta"],
14+
}
15+
16+
17+
for data_glob in data_globs["am"]:
18+
for f in tqdm(glob.glob(str(Path(data_glob)))):
19+
data_obj = data_class.Data(f)
20+
annotation_utils.reset_annotations(data_obj)
21+
annotation_utils.annotate(
22+
f,
23+
label="am",
24+
avg_window_len=256,
25+
avg_duration=0.10,
26+
debug=False,
27+
spectral_energy_threshold=0.95,
28+
# force_threshold_db=-1,
29+
overwrite=True,
30+
min_bandwidth=1e2,
31+
min_annotation_length=256,
32+
dc_block=True,
33+
)
34+
35+
for data_glob in data_globs["fm"]:
36+
for f in tqdm(glob.glob(str(Path(data_glob)))):
37+
data_obj = data_class.Data(f)
38+
annotation_utils.reset_annotations(data_obj)
39+
annotation_utils.annotate(
40+
f,
41+
label="fm",
42+
avg_window_len=256,
43+
avg_duration=0.10,
44+
debug=False,
45+
# spectral_energy_threshold=0.95,
46+
force_threshold_db=-0.1,
47+
overwrite=True,
48+
min_bandwidth=1e2,
49+
min_annotation_length=256,
50+
dc_block=True,
51+
)

poetry.lock

Lines changed: 689 additions & 644 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ scikit-image = "^0.24.0"
1111
matplotlib = "^3.8.3"
1212
numpy = "^1.26.4"
1313
opencv-python = "^4.8.0.74"
14-
scipy = "1.13"
14+
scipy = "1.13.1"
1515
zstandard = "^0.23.0"
1616
pyyaml = "^6.0.1"
1717
pillow = "^10.2.0"
18-
python-on-whales = "^0.72.0"
18+
python-on-whales = "^0.73.0"
1919
sigmf = "^1.2.0"
2020
tqdm = "^4.66.4"
2121
torch = "2.0.1"

utils/Dockerfile.siggen

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM ubuntu:24.04
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
ENV PATH="${PATH}:/root/.local/bin"
5+
RUN apt-get -yq update && apt-get install --no-install-recommends -yq festival festvox-us-slt-hts python3-pip gnuradio sox && pip install --break-system-packages sigmf
6+
COPY siggen.py /root/siggen.py
7+
RUN /root/siggen.py --int_count 1 --samp_rate 100000 --siggen am --sample_file /tmp/test && rm -f /tmp/test
8+
CMD ["/root/siggen.py"]

0 commit comments

Comments
 (0)