Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create more than one image per interval. #1058

Merged
merged 2 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libvulkan-dev \
python3-numpy
WORKDIR /root
RUN git clone https://github.com/iqtlabs/gr-iqtlabs -b 1.0.58
RUN git clone https://github.com/iqtlabs/gr-iqtlabs -b 1.0.59
COPY --from=iqtlabs/gamutrf-vkfft:latest /root /root/gr-iqtlabs
WORKDIR /root/gr-iqtlabs/build
COPY --from=sigmf-builder /usr/local /usr/local
Expand Down
4 changes: 4 additions & 0 deletions gamutrf/grscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ def __init__(
gr.top_block.__init__(self, "scan", catch_exceptions=True)

tune_step_hz = int(samp_rate * tuneoverlap)
stare = False

if freq_end == 0:
stare = True
freq_end = freq_start + (tune_step_hz - 1)
logging.info(
f"using stare mode, scan from {freq_start/1e6}MHz to {freq_end/1e6}MHz"
Expand Down Expand Up @@ -153,6 +155,8 @@ def __init__(
logging.info(
f"requested retuning across {freq_range/1e6}MHz every {tune_step_fft} FFTs, dwell time {tune_dwell_ms}ms"
)
if stare and tune_dwell_ms > 1e3:
logging.warn(">1s dwell time in stare mode, updates will be slow!")

self.fft_blocks = (
self.get_dc_blocks(dc_block_len, dc_block_long)
Expand Down
10 changes: 5 additions & 5 deletions gamutrf/grsource.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@
self.sources[0].set_bandwidth(0, rate)


class file_source_tagger(gr.sync_block):
class file_source_tagger(gr.basic_block):
def __init__(
self,
input_file,
cmd_port,
):
gr.sync_block.__init__(
gr.basic_block.__init__(
self,
name="file_source_tagger",
in_sig=None,
Expand Down Expand Up @@ -71,17 +71,17 @@
pmt.from_double(self.center_freq),
)

def work(self, input_items, output_items):
def general_work(self, input_items, output_items):
if self.complete():
return 0
return -1

Check warning on line 76 in gamutrf/grsource.py

View check run for this annotation

Codecov / codecov/patch

gamutrf/grsource.py#L76

Added line #L76 was not covered by tests
if self.need_tags:
self.add_tags()
self.need_tags = False
n = len(output_items[0])
samples = self.samples[self.i : self.i + n]
if len(samples) < n:
self.i = self.n_samples
return 0
return -1

Check warning on line 84 in gamutrf/grsource.py

View check run for this annotation

Codecov / codecov/patch

gamutrf/grsource.py#L84

Added line #L84 was not covered by tests
self.i += len(samples)
output_items[0][:] = samples
return len(samples)
Expand Down
6 changes: 2 additions & 4 deletions gamutrf/offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,12 @@
"iqtlabs": iqtlabs,
"freq_end": 0,
"freq_start": freq_start,
"pretune": True,
"samp_rate": int(meta["sample_rate"]),
"sdr": "file:" + filename,
"pretune": True,
}
)
tb = grscan(**scan_args)
tb.start()
while not tb.sources[0].complete():
time.sleep(1)
tb.stop()
tb.wait()
tb.stop()

Check warning on line 49 in gamutrf/offline.py

View check run for this annotation

Codecov / codecov/patch

gamutrf/offline.py#L49

Added line #L49 was not covered by tests
Loading