Skip to content

Commit

Permalink
clarify tune-dwell-ms arguments.
Browse files Browse the repository at this point in the history
  • Loading branch information
anarkiwi committed Oct 23, 2023
1 parent e7861bb commit c8c85cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions gamutrf/grscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check warning on line 136 in gamutrf/grscan.py

View check run for this annotation

Codecov / codecov/patch

gamutrf/grscan.py#L135-L136

Added lines #L135 - L136 were not covered by tests
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"
Expand Down
6 changes: 3 additions & 3 deletions gamutrf/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit c8c85cc

Please sign in to comment.