← All tools

Signal Tools

Digital signal processing for any numeric series. Fast Fourier transforms, power spectra, FIR frequency filters, and convolution — the transforms run in native Rust (rustfft), and every result is deterministic with no AI premium.

Why this matters

Sensor streams, time series, and audio all hide their structure in the frequency domain, and an LLM cannot compute an FFT or design a filter. Signal tools give an agent an exact, O(n log n) FFT, a one-sided power spectrum with the dominant frequency picked out, and windowed-sinc FIR filters to isolate or remove frequency bands — all deterministic and computed natively, then handed back chart-ready.

Transforms

  • signal.fft — Forward FFT of a real or complex signal (native, rustfft). Returns the complex spectrum, magnitude, phase, and per-bin frequency; one_sided for real input
  • signal.ifft — Inverse FFT, 1/n-normalized so ifft(fft(x)) == x; recovers the time-domain signal from a spectrum
  • signal.spectral — One-sided power spectrum via the native FFT: per-bin magnitude, power, and phase, plus the top peaks and dominant frequency

Filtering

  • signal.filter — FIR windowed-sinc filter: lowpass, highpass, bandpass, bandstop. Cutoffs normalized to the sample rate (0.5 = Nyquist)
  • signal.convolve — Discrete convolution (full / same / valid) for smoothing, feature detection, and applying custom kernels
  • signal.correlate — Cross- and auto-correlation by lag for signal alignment and periodicity detection (distinct from the math.correlate coefficient)

Use cases

  • Sensor & IoT analysis — Find the dominant frequency of vibration, current, or temperature data with spectral
  • Time-series denoising — Low-pass filter to smooth noisy series, or high-pass to isolate rapid changes
  • Periodicity detectionfft to expose cycles and seasonality that are invisible in the raw signal
  • Spectral processing — Transform with fft, edit the spectrum, and reconstruct with ifft

Example: transform, inspect, filter

// Transform a sampled signal into the frequency domain (native FFT)
{ "name": "data-grout@1/signal.fft@1",
  "arguments": { "data": "$sensor.readings", "sample_rate": 1000, "one_sided": true }
}

// Or get the power spectrum + dominant frequency directly
{ "name": "data-grout@1/signal.spectral@1",
  "arguments": { "data": "$sensor.readings", "sample_rate": 1000, "window": "hann" }
}

// Smooth the signal with a low-pass FIR filter (cutoff = 50Hz / 1000Hz)
{ "name": "data-grout@1/signal.filter@1",
  "arguments": { "data": "$sensor.readings", "type": "lowpass", "cutoff": 0.05 }
}

The records (frequency, magnitude, phase) and filtered values drop straight into prism.chart for spectrum and waveform plots.

Composes with

Pull a series through Data or Frame tools, transform it here, then chart the spectrum with Prism Chart. Pair with Math for descriptive statistics on the magnitudes, or with Linalg when spectral features feed clustering or similarity.