From 83b10f4c63ddbbb19dbe614456a97136fffa06e1 Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Sun, 4 Aug 2024 20:41:23 +0000 Subject: [PATCH 1/2] stare mode initial frequency --- docker/Dockerfile.base | 2 +- gamutrf/grscan.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base index 58d250ab..2d24dd0b 100644 --- a/docker/Dockerfile.base +++ b/docker/Dockerfile.base @@ -14,7 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libvulkan-dev \ pybind11-dev WORKDIR /root -RUN git clone https://github.com/iqtlabs/gr-iqtlabs -b 1.0.114 +RUN git clone https://github.com/iqtlabs/gr-iqtlabs -b 1.0.115 COPY --from=iqtlabs/gamutrf-vkfft:latest /root /root/gr-iqtlabs WORKDIR /root/gr-iqtlabs/build COPY --from=iqtlabs/gamutrf-sigmf:latest /usr/local /usr/local diff --git a/gamutrf/grscan.py b/gamutrf/grscan.py index 9b5d01b7..acdd1ba4 100644 --- a/gamutrf/grscan.py +++ b/gamutrf/grscan.py @@ -105,10 +105,12 @@ def __init__( description = description.strip('"') tune_step_hz = int(samp_rate * tuneoverlap) stare = False + initial_freq = freq_start if freq_end == 0: stare = True freq_end = freq_start + (tune_step_hz - 1) + initial_freq += int((freq_end - freq_start) / 2) logging.info( f"using stare mode, scan from {freq_start/1e6}MHz to {freq_end/1e6}MHz" ) @@ -167,7 +169,7 @@ def __init__( nfft, tune_step_fft, agc=False, - center_freq=freq_start, + center_freq=initial_freq, sdrargs=sdrargs, dc_ettus_auto_offset=dc_ettus_auto_offset, ) From eb53c824f4ab58fb43e9612db6b3ff0c4bf6997e Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Sun, 4 Aug 2024 22:05:09 +0000 Subject: [PATCH 2/2] scale. --- gamutrf/grscan.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gamutrf/grscan.py b/gamutrf/grscan.py index acdd1ba4..175be885 100644 --- a/gamutrf/grscan.py +++ b/gamutrf/grscan.py @@ -204,6 +204,7 @@ def __init__( if write_fft_points: fft_dir = sample_dir Path(sample_dir).mkdir(parents=True, exist_ok=True) + samples_vlen = fft_batch_size * nfft self.samples_blocks.extend( [ # blocks.vector_to_stream( @@ -215,10 +216,10 @@ def __init__( "rx_freq", gr.sizeof_gr_complex, "_".join(("cf32", endianstr())), - fft_batch_size * nfft, + samples_vlen, sample_dir, "samples", - write_samples, + int(write_samples / samples_vlen), skip_tune_step, int(samp_rate), rotate_secs,