From c8c85cc5efba9b5068d588e1f39e3db1a18b4fbf Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Mon, 23 Oct 2023 17:29:31 +1300 Subject: [PATCH] clarify tune-dwell-ms arguments. --- gamutrf/grscan.py | 3 +++ gamutrf/scan.py | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gamutrf/grscan.py b/gamutrf/grscan.py index 189af8f5..c223b9e2 100644 --- a/gamutrf/grscan.py +++ b/gamutrf/grscan.py @@ -131,6 +131,9 @@ def __init__( logging.info( f"retuning across {freq_range/1e6}MHz in {self.sweep_sec}s, requires retuning at {target_retune_hz}Hz in {tune_step_hz/1e6}MHz steps ({tune_step_fft} FFTs)" ) + if not tune_step_fft: + logging.info("tune_step_fft cannot be 0 - defaulting to nfft") + tune_step_fft = nfft tune_dwell_ms = tune_step_fft / fft_rate * 1e3 logging.info( f"requested retuning across {freq_range/1e6}MHz every {tune_step_fft} FFTs, dwell time {tune_dwell_ms}ms" diff --git a/gamutrf/scan.py b/gamutrf/scan.py index 351484f3..04462ae8 100644 --- a/gamutrf/scan.py +++ b/gamutrf/scan.py @@ -75,21 +75,21 @@ def argument_parser(): dest="sweep_sec", type=float, default=30, - help="Set sweep_sec [default=%(default)r]", + help="Set sweep_sec [default=%(default)r] - ignored if --tune-dwell-ms > 0 or --tune-step-fft > 0", ) parser.add_argument( "--tune-dwell-ms", dest="tune_dwell_ms", type=float, default=0, - help="Set tune dwell time in ms (0 is use sweep_sec) [default=%(default)r]", + help="Set tune dwell time in ms [default=%(default)r] - ignored if --tune-step-fft > 0", ) parser.add_argument( "--tune-step-fft", dest="tune_step_fft", type=int, default=0, - help="tune FFT step (0 is use sweep_sec) [default=%(default)r]", + help="tune FFT step [default=%(default)r] - if 0, use --tune-dwell-ms (if > 0) or --sweep-sec (if > 0)", ) parser.add_argument( "--skip-tune-step",