Skip to content

Commit 8e48b6f

Browse files
authored
Merge pull request #92 from ltindall/patch_siggen_label
Update label_siggen.py to match new annotation_utils.py
2 parents e74a4d0 + 635972c commit 8e48b6f

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

label_scripts/label_siggen.py

+16-18
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
# generated with
1010
# $ for i in am fm ; do /scratch/iqtlabs/rfml/utils/siggen.py --samp_rate 1000000 --siggen $i --int_count 1000 ; done
1111
data_globs = {
12-
"am": ["/scratch/tmp/rfmltest/am.sigmf-meta"],
13-
"fm": ["/scratch/tmp/rfmltest/fm.sigmf-meta"],
12+
"am": ["/data/siggen/am.sigmf-meta"],
13+
"fm": ["/data/siggen/fm.sigmf-meta"],
1414
}
1515

1616

@@ -19,33 +19,31 @@
1919
data_obj = data_class.Data(f)
2020
annotation_utils.reset_annotations(data_obj)
2121
annotation_utils.annotate(
22-
f,
23-
label="am",
24-
avg_window_len=256,
25-
avg_duration=0.10,
22+
data_obj,
23+
avg_window_len=1024,
2624
debug=False,
27-
spectral_energy_threshold=0.95,
28-
# force_threshold_db=-1,
25+
bandwidth_estimation=False,
26+
force_threshold_db=-200,
2927
overwrite=True,
30-
min_bandwidth=1e2,
31-
min_annotation_length=256,
3228
dc_block=True,
29+
labels={"am": {"annotation_length": (1024, None)}},
3330
)
3431

3532
for data_glob in data_globs["fm"]:
3633
for f in tqdm(glob.glob(str(Path(data_glob)))):
3734
data_obj = data_class.Data(f)
3835
annotation_utils.reset_annotations(data_obj)
3936
annotation_utils.annotate(
40-
f,
41-
label="fm",
42-
avg_window_len=256,
43-
avg_duration=0.10,
37+
data_obj,
38+
avg_window_len=1024,
4439
debug=False,
45-
# spectral_energy_threshold=0.95,
46-
force_threshold_db=-0.1,
40+
bandwidth_estimation=False,
41+
force_threshold_db=-200,
4742
overwrite=True,
48-
min_bandwidth=1e2,
49-
min_annotation_length=256,
5043
dc_block=True,
44+
labels={
45+
"fm": {
46+
"annotation_length": (1024, None),
47+
}
48+
},
5149
)

0 commit comments

Comments
 (0)