From 199a6bcc8b6ab48b4587f28842343595f094e7b5 Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Thu, 15 Jun 2023 04:26:01 +1200 Subject: [PATCH 1/2] run finder on each tuning range individually. --- gamutrf/sigfinder.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/gamutrf/sigfinder.py b/gamutrf/sigfinder.py index 8ac4d00f..4f2afbe2 100755 --- a/gamutrf/sigfinder.py +++ b/gamutrf/sigfinder.py @@ -198,9 +198,21 @@ def process_scan(args, scan_configs, prom_vars, df, lastbins, running_df, last_d freq_start_mhz = ( min([scan_config["freq_start"] for scan_config in scan_configs]) / 1e6 ) - signals = scipy_find_sig_windows( - df, width=args.width, prominence=args.prominence, threshold=args.threshold - ) + signals = [] + for scan_config in scan_configs: + scan_df = df[ + (df.freq >= scan_config["freq_start"]) + & (df.freq <= scan_config["freq_end"]) + ] + assert not scan_df.empty + signals.extend( + scipy_find_sig_windows( + scan_df, + width=args.width, + prominence=args.prominence, + threshold=args.threshold, + ) + ) if PEAK_TRIGGER == 1 and signals: led_sleep = 0.2 From effcbe82fb57b170f8309832d48b41aac00dfab4 Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Wed, 14 Jun 2023 16:58:30 +0000 Subject: [PATCH 2/2] mhz --- gamutrf/sigfinder.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gamutrf/sigfinder.py b/gamutrf/sigfinder.py index 4f2afbe2..04fac792 100755 --- a/gamutrf/sigfinder.py +++ b/gamutrf/sigfinder.py @@ -201,10 +201,9 @@ def process_scan(args, scan_configs, prom_vars, df, lastbins, running_df, last_d signals = [] for scan_config in scan_configs: scan_df = df[ - (df.freq >= scan_config["freq_start"]) - & (df.freq <= scan_config["freq_end"]) + (df.freq >= scan_config["freq_start"] / 1e6) + & (df.freq <= scan_config["freq_end"] / 1e6) ] - assert not scan_df.empty signals.extend( scipy_find_sig_windows( scan_df,