-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscanner.py
More file actions
27 lines (23 loc) · 686 Bytes
/
scanner.py
File metadata and controls
27 lines (23 loc) · 686 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import time
import signal
import subprocess
from HACKRF_scripts.plot_hackrf_sweeps import plot_hackrf_sweep
from HACKRF_scripts.hckrf_sweeps import hckrf_sweep
SWEEP_FILE_PATH = "sweeps"
RUN_SECONDS = 30
FREQUENCY_RANGES = [
"88:108",
"174:230",
]
i = 1
for frequency_range in FREQUENCY_RANGES:
output_file_name = f"{SWEEP_FILE_PATH}/sweep_{i}/sweep_{i}.txt"
hckrf_sweep(frequency_range, output_file_name, RUN_SECONDS)
plot_hackrf_sweep(
sweep_file=output_file_name,
output_dir=f"{SWEEP_FILE_PATH}/sweep_{i}/sweep_{i}_plots",
image_name=f"hackrf_detailed_spectrum_{i}.png",
save_csv=True,
min_power=-100.0
)
i += 1