Metadata-Version: 2.1
Name: doppler-dsp
Version: 0.35.0
Summary: Practical, portable, performant digital signal processing.
License: MIT
Requires-Python: >=3.9
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: C
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: System :: Hardware :: Hardware Drivers
Keywords: dsp,sdr,fft,fir,nco,signal-processing,nats,iq
Project-URL: Homepage, https://doppler-dsp.github.io/doppler/
Project-URL: Repository, https://github.com/doppler-dsp/doppler
Project-URL: Documentation, https://doppler-dsp.github.io/doppler/
Project-URL: Bug Tracker, https://github.com/doppler-dsp/doppler/issues
Author: doppler contributors
Requires-Dist: numpy; python_version >= '3.11'
Requires-Dist: numpy<2.3; python_version == '3.10'
Requires-Dist: numpy<2.1; python_version == '3.9'
Provides-Extra: cli
Requires-Dist: pydantic>=2.0 ; extra == "cli"
Requires-Dist: pyyaml>=6.0 ; extra == "cli"
Requires-Dist: rich>=13.0 ; extra == "cli"
Provides-Extra: specan
Requires-Dist: rich>=13.0 ; extra == "specan"
Provides-Extra: specan-web
Requires-Dist: fastapi>=0.100 ; extra == "specan-web"
Requires-Dist: uvicorn[standard]>=0.23 ; extra == "specan-web"
Requires-Dist: websockets>=12.0 ; extra == "specan-web"
Description-Content-Type: text/markdown

<p align="center">
  <img src="https://raw.githubusercontent.com/doppler-dsp/doppler/main/docs/assets/wordmark.png?v=3" alt="doppler — signal, shifted" width="560">
</p>

<p align="center"><strong>Practical, portable, performant digital signal processing.</strong></p>

<p align="center">
  <a href="https://github.com/doppler-dsp/doppler/actions/workflows/ci.yml"><img src="https://github.com/doppler-dsp/doppler/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
  <a href="https://doppler-dsp.github.io/doppler/"><img src="https://img.shields.io/badge/docs-doppler--dsp.github.io-blue" alt="Docs"></a>
  <a href="https://pypi.org/project/doppler-dsp/"><img src="https://img.shields.io/pypi/v/doppler-dsp" alt="PyPI"></a>
  <a href="https://pypi.org/project/doppler-dsp/"><img src="https://img.shields.io/badge/python-3.9%20%E2%80%93%203.14-blue" alt="Python"></a>
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="License: MIT"></a>
</p>

<p align="center">
  <a href="https://en.wikipedia.org/wiki/C99"><img src="https://img.shields.io/badge/C-C99-blue" alt="C99"></a>
  <a href="https://doppler-dsp.github.io/doppler/install/rust/"><img src="https://img.shields.io/badge/Rust-FFI-CE4A00?logo=rust&logoColor=white" alt="Rust"></a>
  <a href="https://github.com/astral-sh/uv"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json" alt="uv"></a>
  <a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff"></a>
</p>

<!-- readme-sync:start -->

doppler is a C99 DSP library — NCO, FIR, FFT, polyphase resampling, DDC,
AGC and more — with file, buffer, and NATS-based streaming, and a
scenario-driven waveform generator (`wfmgen`) with byte-identical
CLI/Python/C parity. Python and Rust wrap the same C core — no second
implementation, no divergence, full SIMD throughput from any language.

**New here?** Start with [Start Here](docs/start-here.md) — a one-page map from
"what are you trying to do" to the right doc.

**Navigate** — [Quick Start](docs/quickstart.md) · [Architecture](docs/architecture.md) · [Gallery](docs/gallery/index.md) · [Examples](docs/examples/index.md) · [Guides](docs/guide/index.md) · [Waveform Generator](docs/guide/wfmgen/index.md) · [Design](docs/design/index.md) · [Contributing](docs/dev/index.md)

**API Reference** — [Full Python + C API index](docs/api/index.md)

______________________________________________________________________

## 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. The full generated table lives in
[Benchmarks](docs/benchmarks.md); run
`make bench` to measure on your hardware.

## Quick start

See [Quick Start](docs/quickstart.md) for the full walkthrough.

### Python

**Install**

> [!NOTE]
> Isolate your install from system python with a virtual environment!
>
> ```bash
> python3 -m venv .venv
> . .venv/bin/activate
> ```

```bash
pip install doppler-dsp
```

**Compute FFT**

```python
from doppler.spectral import FFT
import numpy as np

x = np.random.randn(1024).astype(np.complex64)
X = FFT(1024).execute_cf32(x)
print(f"FFT: {len(x)} samples in -> {X.shape[0]} complex64 bins out")
```

**Create a Waveform**

```python
from doppler.wfm import Synth

synth = Synth(type="qpsk", fs=1e6, snr=12.0, snr_mode="esno", sps=8, seed=1)
iq = synth.steps(4096)   # complex64 ndarray
print(f"generated {len(iq)} QPSK samples")
```

### C

> [!TIP]
> **Don't have `jbx` yet?**
>
> ```bash
> . <(curl -sSL https://just-buildit.github.io/get-jb.sh)
> ```

**Install**

Get `libdoppler.a`/`libdoppler.so` plus headers, ready to link, in one command:

```bash
jbx get-doppler
```

**Compute FFT**

```c
/* example.c */

#include <complex.h>
#include <stdio.h>
#include <fft/fft_core.h>

int main(void)
{
  float complex in[1024]  = { 0 };   /* fill with your samples */
  float complex out[1024];

  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);
  printf("FFT: 1024 samples in -> 1024 complex bins out\n");
  return 0;
}
```

**Compile and run**

```bash
cc example.c -I "$HOME/.local/doppler/include" "$HOME/.local/doppler/lib/libdoppler.a" -lm -o example
./example
```

**Other install methods**

Prefer a custom prefix or no `jbx`? Grab a
[pre-built release tarball](docs/install/c.md#install-from-a-release-tarball) by
hand — no toolchain, no building doppler itself — and extract it to
`$PREFIX`; you get the same `libdoppler.a`/`libdoppler.so` plus headers.
See [C Library](docs/install/c.md) for `find_package`/`pkg-config` integration
and building from source.

## Build

Building from source gets you the C library, examples, and Rust FFI
bindings — see [Build from source](docs/quickstart.md#build-from-source) if you
just want the C library without cloning the repo.

```bash
git clone https://github.com/doppler-dsp/doppler
cd doppler
make install-deps       # bootstrap jbx (if needed) + install system deps
make                    # C library
make pyext              # + Python bindings
make test               # CTest suite
make bench              # benchmarks
```

## Docs

Full docs: **[doppler-dsp.github.io/doppler](https://doppler-dsp.github.io/doppler/)**

## 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 NATS stream component (`libdoppler_stream`) vendors
`nats.c` (Apache-2.0) — it too is pure C99, so no C++ toolchain is needed
anywhere in the build.

<!-- readme-sync:end -->
