Skip to content

Commit

Permalink
Allow FFT writing to be disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
anarkiwi committed May 13, 2024
1 parent d03d2ee commit c997abc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion gamutrf/grscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def __init__(
use_external_heading=False,
vkfft=False,
wavelearner=None,
write_fft_points=False,
write_samples=0,
):
gr.top_block.__init__(self, "scan", catch_exceptions=True)
Expand Down Expand Up @@ -186,7 +187,8 @@ def __init__(
self.samples_blocks = []
self.write_samples_block = None
if write_samples:
fft_dir = sample_dir
if write_fft_points:
fft_dir = sample_dir
Path(sample_dir).mkdir(parents=True, exist_ok=True)
self.samples_blocks.extend(
[
Expand Down
9 changes: 8 additions & 1 deletion gamutrf/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,14 @@ def argument_parser():
dest="write_samples",
default=0,
type=int,
help="if > 0, write FFT/raw samples to --sample_dir",
help="if > 0, write FFT points/raw samples to --sample_dir",
)
parser.add_argument(
"--write_fft_points",
dest="write_fft_points",
default=False,
action=BooleanOptionalAction,
help="Write FFT points to --sample_dir if write_samples > 0",
)
parser.add_argument(
"--nfft",
Expand Down

0 comments on commit c997abc

Please sign in to comment.