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

gr-iqlabs '91 with I/Q inference length. #1226

Merged
merged 1 commit into from
Apr 11, 2024
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 @@ -14,7 +14,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.90
RUN git clone https://github.com/iqtlabs/gr-iqtlabs -b 1.0.91
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
Expand Down
2 changes: 2 additions & 0 deletions gamutrf/grscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def __init__(
inference_output_dir="",
inference_port=10001,
inference_text_color="",
iq_inference_len=1024,
iq_inference_model_name="",
iq_inference_model_server="",
iq_power_inference=False,
Expand Down Expand Up @@ -297,6 +298,7 @@ def __init__(
self.iq_inference_block = iqtlabs.iq_inference(
tag="rx_freq",
vlen=nfft,
n_vlen=int(iq_inference_len / nfft),
sample_buffer=tune_step_fft,
min_peak_points=inference_min_db,
model_server=iq_inference_model_server,
Expand Down
10 changes: 10 additions & 0 deletions gamutrf/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,13 @@
default="",
help="torchserve model server inference API address (e.g. localhost:1234)",
)
parser.add_argument(
"--iq_inference_len",
dest="iq_inference_len",
type=int,
default=4096,
help="number of samples to send for I/Q inference",
)
parser.add_argument(
"--iq_inference_model_name",
dest="iq_inference_model_name",
Expand Down Expand Up @@ -484,6 +491,9 @@
if options.samp_rate % options.nfft:
print("NFFT should be a factor of sample rate")

if options.iq_inference_len % options.nfft:
return "NFFT should be a factor of I/Q inference length"

Check warning on line 495 in gamutrf/scan.py

View check run for this annotation

Codecov / codecov/patch

gamutrf/scan.py#L495

Added line #L495 was not covered by tests

if options.freq_end:
if options.freq_start > options.freq_end:
return "freq_start must be less than freq_end"
Expand Down
Loading