Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>RF ToolbenchNew to Visual Studio Code? Get it now.
RF Toolbench

RF Toolbench

mikieg

|
2 installs
| (0) | Free
RF analysis inside VS Code: IQ recordings as a zoomable waterfall + spectrum with playback, measurements, markers, spectrum masks and signal extraction to SigMF.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

RF Toolbench

RF analysis inside VS Code. Open an IQ recording and get a zoomable, full-resolution waterfall and spectrum, with playback through time. Measure signals, mark them, mask the spectrum to find new energy, overlay boxes from your own detector, and extract any time × frequency box to a narrowband SigMF file. Everything runs inside the extension: no Python, no external tools.

Opening recordings

Open a recording from the Explorer:

  • Opens in the viewer by default: .sigmf-meta / .sigmf-data, .cu8, .cs8 / .ci8, .cs16 / .ci16 / .sc16, .cf32 / .fc32 / .cfile, and SDRangel .sdriq.
  • Via right-click → Open in RF Toolbench IQ Viewer: .wav (2-channel IQ WAV), .raw, .iq, .bin, .dat.
Format Sample rate / centre / start time from
SigMF .sigmf-meta (first capture segment). Annotations are drawn as boxes.
.sdriq its 32-byte header (16- or 24-bit)
IQ WAV (RIFF / RF64; 8/16/24/32-bit PCM, float32) rate from the header; centre / time from the auxi chunk, SDR# / SDR++ file names, or the sidecar
raw (.cu8 .cs8 .cs16 .cf32 …) the sidecar <file>.meta.json, else the file name

The sidecar is a JSON file <file>.meta.json next to the recording (sample_rate_hz, center_frequency_hz, datetime (ISO 8601), plus datatype such as ci16_le for extension-less raw files). File-name patterns recognised: …_855.7000MHz_10Msps.cs8, rtl_433 (g001_912.6M_2359.3k.cs16), gqrx (gqrx_YYYYMMDD_HHMMSS_<f>_<rate>_fc.raw), SDR# and SDR++.

If the sample rate (or, for .raw, the sample format) is unknown, the viewer asks for it and offers to save the answer as a sidecar. Metadata… (or the command RF Toolbench: Edit Recording Metadata) changes it later.

Using the viewer

  • Waterfall: time runs down, frequency across, with absolute RF on the axis.

    • Wheel zooms time around the cursor; Ctrl/⌘+wheel zooms frequency; Shift+wheel pans frequency.
    • Right-drag, middle-drag or Alt+drag pans. Double-click resets the view.
    • Click to move the playhead. Drag to select a time × frequency box.
  • Resolution follows the zoom:

    • FFT size: each view is computed fresh at device-pixel resolution. Auto picks the largest FFT that still fits one bin per pixel, up to rftoolbench.maxFftSize (262144). A fixed FFT larger than that is max-pooled, so narrow signals aren't dropped.
    • Colour range: it moves with the bin width, so the noise floor keeps its colour as you zoom.
  • Detail:

    • full averages every sample of each row.
    • sparse averages 32 adjacent frames from the middle of each row, which is fast for long recordings but can miss a short burst. auto chooses full whenever a view covers ≤ 134 M samples.
    • Row = peak shows the per-bin maximum over a row's frames instead of the mean. It's good for spotting bursts.
  • Spectrum (top): the line at the playhead.

    • While paused it averages the waterfall row under the playhead. While playing it averages one display frame's worth of recording.
    • Wheel / drag on the spectrum zooms and pans frequency.
  • Markers (green):

    • Shift+click (spectrum or waterfall) or M at the cursor adds one, snapped to the local peak. P or Peak marks the strongest point in view.
    • Drag a marker along the spectrum to move it.
    • The Markers & bands panel lists each marker's frequency and level, plus Δf / ΔdB against M1. Delete removes the last one.
  • Band labels (magenta bars across the top of spectrum and waterfall):

    • SigMF annotations with frequency edges and a label show as bands. Label… (L) in the selection panel names the box's frequency span.
    • Clicking a bar zooms to that band.
    • Markers and your bands are kept per recording in the workspace, not written next to the recording.
  • Time axis: relative seconds, or UTC wall clock (HH:MM:SS with the fraction under it) when the start time is known. The selection's start and end follow the same choice.

  • Overview: a minimap of the whole recording in the waterfall's top-right corner, with the current view boxed and the playhead marked. Drag the box or click to move. It hides at full view. The transport bar shows the view span (View 7.2 s × 540 kHz).

  • Playback: Space plays / pauses at 0.01×–100×. Follow pages the view to keep the playhead visible.

    • Keys: Home / End, ← / →, + / - zoom time, 0 resets, F toggles follow, Esc clears the selection (or closes Time / IQ).
    • Box and marker keys: X extract, T Time / IQ, L label, M / P markers, Delete removes the last marker.
  • Selection panel: shows centre, bandwidth, low / high, start, end and duration. It also measures the box from its samples:

    • Channel power (dBFS, window ENBW removed, so it doesn't depend on FFT size).
    • Peak level and frequency.
    • Noise floor (dBFS/Hz): the span's median bin, bias-corrected.
    • C/N of the box, and peak SNR per bin.
    • 99% occupied bandwidth.
  • Time / IQ (T): a window for the box with three plots:

    • Band power against time over the whole box.
    • I and Q against time.
    • A raw I/Q constellation (density plot).

    The I/Q is the box's bins cut out of one FFT and inverse-transformed: a brick-wall band filter, for looking at.

    • It covers up to 2²¹ input samples (0.21 s at 10 Msps). For a longer box, the window sits on the playhead if it's in the box, else on the box's strongest stretch. Click the power plot to move it.
    • Nothing is demodulated: no carrier, timing or symbol recovery.
    • Zoom fits the view to the box. Play plays just that span.
    • Extract… (or X) channelizes the box out to its own file. See Extracting signals below.
    • Copy candidate copies the box as a candidates-file entry (absolute frequency_hz, bandwidth_hz, start_time_s, end_time_s; see Candidates file format), ready to paste into a list of your own.
  • Colour: the default map is nightfire. It runs from a navy noise floor through blue, purple, crimson, red and orange to gold, so the noise stays dark and signals burn bright. A dB colour bar sits right of the waterfall. turbo, viridis, inferno and gray are in the menu; rftoolbench.colormap sets the default.

  • Spectrum traces (the Traces row):

    • A blue averaged trace over a white live one. The average is exponential in linear power, each new line weighing 1/N; the depth menu sets N, from 2 to 128.
    • Max hold (orange) and Min hold (cyan) are optional.
    • Markers, mask and reference work from the average when it's shown, else the live line.
  • Reference:

    • Freeze (R) keeps the current trace as a dashed grey reference. It stays put by frequency while you zoom, and moves with the bin width like the noise floor.
    • Live − ref plots the difference in dB on a ±30 dB axis, to see what changed.
  • Mask and new energy (the Mask row): spectrum masking and new-energy detection.

    • Learn from view sets the mask to the per-frequency peak of the visible waterfall plus the margin. Zoom onto a quiet stretch first; everything on screen then becomes the baseline. Flat sets a level line at the trace's median plus margin.
    • The mask is drawn only over its own span. The trace's excess over it is filled red.
    • Edit: drag points, click to add one, right- or Alt-click to delete.
    • The mask is saved with the recording's markers and bands.
    • Find new energy scans the whole recording over the mask's span:
      • Every sample is used, at the mask's bin width, with each row the per-bin peak of its frames.
      • Cells above the mask are joined into connected regions, bridging a one-row gap.
      • Every region is listed with start, duration, centre, width, peak and how far it rose over the mask, and boxed in red on the waterfall.
      • Clicking a row selects and measures that event and brings it into view.
    • Measured on the 60 s, 10 Msps P25 recording: a mask learned over 856.0–856.6 MHz from a quiet 14–25 s stretch.
      • The scan found exactly the three voice bursts on 856.488 MHz (4.3–11.0 s, 26.1–33.7 s, 45.4–55.5 s), plus one 0.5 dB, 15 ms blip.
      • It took 46 s cold from the USB disk and 3.3 s cached.
  • Candidates (Candidates… in the toolbar) shows a list of boxes over the recording: the output of your own detector, classifier or decoder, written in the candidates file format.

    • Every candidate is boxed in cyan with its id (and label) on the waterfall, and listed (the first 2000; all are drawn). Click a row or a box to select it, measure it and bring it into view; Extract…, Time / IQ and the rest then work on it. When the file gives labels, the filter shows one label at a time.
    • A warning appears when the file names another recording, a different sample rate or centre, or when candidates fall outside this recording.
    • The file is remembered per recording and reloads with it; Clear forgets it.
    • From the explorer, right-click a .json → Show Candidates on Their Recording opens the recording the file names, with the candidates on it (asking for the recording if the file names none, or it has moved).

Candidates file format

A candidates file is JSON: an object with a candidates array, or just the array. Each candidate is a time × frequency box. A JSON Schema is in docs/candidates.schema.json.

{
  "recording": "capture_855.7000MHz_10Msps.cs8",
  "capture": { "sample_rate_hz": 10000000, "center_frequency_hz": 855700000 },
  "candidates": [
    { "id": "c1", "frequency_hz": 856487500, "bandwidth_hz": 12500, "start_time_s": 4.31, "end_time_s": 11.02, "label": "P25", "records": 12 },
    { "id": "c2", "frequency_hz": 855212500, "bandwidth_hz": 25000, "start_time_s": 20.5, "end_time_s": 20.9 }
  ]
}
Field Required Meaning
candidates[].frequency_hz yes Absolute centre frequency (Hz), on the same scale as the recording's centre frequency (use offsets from 0 for a recording with no centre frequency).
candidates[].bandwidth_hz yes Width of the box (Hz).
candidates[].start_time_s yes Start, seconds from the recording's first sample.
candidates[].end_time_s yes End, seconds from the recording's first sample.
candidates[].id no Shown on the box and in the list. Default #1, #2, … in file order. Also appended to file names by Extract all….
candidates[].label no What the signal is (protocol, class, note). Shown with the id; the list can be filtered by it.
candidates[].records no A number shown in the list's Records column (for example, messages decoded).
recording no The recording the boxes belong to (absolute, or relative to the candidates file). Lets the explorer command open it, and warns when the boxes are shown over a different recording.
capture.sample_rate_hz, capture.center_frequency_hz no Warn when the recording the boxes are shown on differs.

Entries missing one of the four required numbers are skipped (and counted in a warning); other fields are ignored, so a detector can keep its own extra data in the same file. At most 20 000 candidates are loaded. Copy candidate in the selection panel produces an entry in this format.

Extracting signals

Extract… does three things:

  1. Asks for the output rate:
    • the decimated rate (bandwidth × extract.bandwidthMargin, integer decimation), or
    • an exact rate (48 k, 96 k, or custom).
  2. Asks where to save, starting in the last folder used, else <workspace>/extracts/.
  3. Extracts with cancellable progress, then opens the new recording beside the original.

Extract all… in the candidates panel does the same for every listed candidate (respecting the filter): one rate prompt (the decimated rate follows each candidate's own bandwidth, or an exact rate for all), one folder, one cancellable progress bar. Files are named like single extractions plus the candidate id. A candidate that fails is reported at the end and the rest carry on.

The DSP is plain JavaScript on worker threads (src/dsp/channelize.js), so the editor never blocks:

  • Mix and decimate: the box's centre is shifted to 0 Hz and low-pass filtered and decimated by q = ⌊rate / (bandwidth × margin)⌋ with a 20q + 1 tap Hamming-windowed sinc (cutoff at the new Nyquist), zero-phase. The work is split across up to 8 threads.
  • Exact rate: a polyphase rational resampler (up/down, denominator ≤ 4096) with a Kaiser (β = 5) windowed sinc.
  • Both stages stream, so the selection's length is limited by disk space, not memory. Results match scipy.signal.decimate (ftype="fir") and scipy.signal.resample_poly to float32 precision.

The reader takes the recording as it is (raw, WAV, .sdriq or SigMF), so nothing is converted first. The output is a cf32 SigMF pair with:

  • the box's centre as core:frequency,
  • the start time offset to the box,
  • a description of the source and settings.

Measured: 5 s of a 12.5 kHz channel out of a 10 Msps cs8 recording, resampled to 48 ksps, took 1 s (32-core machine, file in page cache).

Setting Default
rftoolbench.extract.bandwidthMargin 2.0 output rate = bandwidth × margin
rftoolbench.extract.guardSeconds 0 padding either side of the box
rftoolbench.extract.directory last used where the save dialog starts

How it works

webview (media/viewer.js)         extension host (src/)                       worker_threads (src/dsp/worker.js)
 canvas waterfall + spectrum  ->  session.js: planView() for the viewport  ->  SampleReader positioned reads
 asks for {t0,t1,f0,f1,rows,cols} pool.js: rows split coarse-to-fine       ->  window + radix-2 FFT, mean / peak per row
 <- rows stream in (dBFS)     <-  batched every 30 ms                      <-  (one shared read lock: HDD-friendly)
  • Nothing is precomputed or cached on disk. Each viewport is computed fresh, so a 6 GB capture opens as fast as a small one.
  • Coarse to fine: rows arrive every 64th first, then every 16th, every 4th, and the rest. The whole time span appears almost at once and then sharpens. Until then each row shows the nearest computed one, and on a zoom or pan the previous image is redrawn at the new mapping straight away.
  • Measured on 10 Msps cs8 recordings on a USB hard disk:
    • 1.5 GB file, cold cache: the full time span is visible after 0.9 s and complete after 26 s.
    • The same view from page cache: 0.65 s.
    • A 10 s × 200 kHz zoom at 131k-point FFTs: 1.4 s.
  • Levels are dBFS: a full-scale complex tone reads 0 dB. Integers are scaled to full scale (int8 / 128, int16 / 32768; cu8 is centred on 127.5).
  • No dependencies or build step: plain CommonJS on VS Code's own Node. No npm is needed.

Development

No build step and no dependencies: the tests use Node's built-in runner (Node 18 or later; VS Code's own bundled Node works).

node --test test/*.test.js                               # FFT, formats, reader, spectrogram, pool, extraction, candidates
node tools/devserver.js <recording> [--candidates FILE]  # the viewer in a browser, same host code (UI work / tests)
python3 tools/package_vsix.py                            # -> dist/rftoolbench-<version>.vsix (no Node tooling needed)
npx @vscode/vsce package                                 # or the standard packager (honours .vscodeignore)
code --install-extension dist/rftoolbench-<version>.vsix # then: Developer: Reload Window

To debug: open this folder in VS Code and press F5 (Run RF Toolbench). That starts an Extension Development Host; open a recording there.

Roadmap

See ROADMAP.md.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft