Skip to content

Home

doppler — signal, shifted

Dead-simple, ultra-fast digital signal processing.

CI Docs PyPI Python License: MIT

C99 Rust uv Ruff

doppler is a C99 DSP library: NCO, FIR filter, FFT, polyphase resampler, DDC, and ZMQ-based signal streaming. Python and Rust wrap the same C core — no second implementation, no divergence, full SIMD throughput from any language.

Why it's built this way

Every algorithm lives in C exactly once. The Python layer is type conversion and lifetime bridging — a few hundred lines of glue, not a reimplementation. Bugs get fixed once, benchmarks reflect real hardware, and a C transmitter talks to a Python subscriber without surprises.

Performance

On a Ryzen 7 AI 350 (-O2): NCO raw accumulator ~15 GSa/s, LO CF32 ~1.8 GSa/s, FIR CF32 ~900 MSa/s, FFT CF32 (N=4096) ~180 MSa/s, polyphase resampler (2× decim) ~70 MSa/s. Run make bench to measure on your hardware.

Quick start

Python

from doppler.spectral import FFT
import numpy as np

x = np.random.randn(1024).astype(np.complex64)
X = FFT(1024).execute_cf32(x)

C

#include <fft/fft_core.h>

fft_state_t *fft = fft_create(1024, -1, 1);  /* n, sign, nthreads */
fft_execute_cf32(fft, in, 1024, out);        /* in,out: float complex[1024] */
fft_destroy(fft);

Build

jbx install-deps        # install system deps (detects OS/distro)
make                    # C library
make pyext              # + Python bindings
make test               # CTest suite
make bench              # benchmarks

Docs

Full docs at doppler-dsp.github.io/doppler — Quick Start, Architecture, API Reference, Examples.

Licensing

MIT. The core C library is pure C99 and links only -lm. Its FFT uses the vendored pocketfft (BSD-3-Clause) for double precision and arbitrary sizes, and the vendored PFFFT (Pommier/FFTPACK, BSD) for the native single-precision SIMD path. The optional ZMQ stream component (libdoppler_stream) vendors libzmq (MPL-2.0).