Skip to main content

lattice-dsp

PyPI Python Docs CI

Stable IIR lattice filters, adaptive recursive DSP, and matrix/MIMO lattice experiments for Python.

lattice-dsp is a compact C++/Python toolkit for signal-processing workflows where stability-aware recursive filters matter. It focuses on reflection/PARCOR coefficients, lattice and lattice-ladder IIR filters, adaptive IIR experiments, AR spectral diagnostics, finite-Hankel model-reduction diagnostics, and experimental matrix/MIMO lattice tools.

Install with lattice-dsp; import with lattice_dsp.

python -m pip install lattice-dsp
import lattice_dsp as ld

Why lattice-dsp?

Direct-form IIR denominator updates can move poles outside the unit circle. Lattice parameterizations provide a safer coordinate system: bounded reflection coefficients correspond to stable recursive filters.

This package is intentionally narrower than SciPy or general audio/room-simulation libraries. It is for users who want stable recursive DSP building blocks, finite-section model-reduction diagnostics, and experimental MIMO/state-space lattice workflows in one tested Python package with a compiled backend.

What is included

  • Stable scalar LatticeIIR and LatticeLadderIIR filters.
  • Reflection/PARCOR coefficient conversion for stable IIR denominators.
  • Adaptive lattice-ladder NLMS/RLS-style examples.
  • Burg, Levinson-Durbin, AR, and spectral diagnostics.
  • Batch processing for many independent filters/signals, with optional OpenMP.
  • Finite-Hankel SISO/MIMO reduction helpers and Nehari/AAK-style finite-section diagnostics.
  • MIMO Markov tensor and state-space processing utilities.
  • Matrix-lattice/all-pass examples and causal online MIMO lattice prediction.
  • Tangential Schur/Pick/J-inner diagnostic helpers.
  • Sphinx tutorials, examples, benchmarks, and interoperability recipes.

Quick example: stable IIR from reflection coefficients

import numpy as np
import lattice_dsp as ld

rng = np.random.default_rng(0)
x = rng.normal(size=4096)

reflection = [0.35, -0.2, 0.1]
numerator = [0.25, 0.0, 0.15, 0.7]

print(ld.reflection_to_denominator(reflection))

filt = ld.LatticeIIR(reflection, numerator)
y = filt.process(x)

Quick example: adaptive stable IIR identification

import numpy as np
import lattice_dsp as ld

rng = np.random.default_rng(1)
x = rng.normal(size=8000)

target = ld.LatticeIIR([0.55, -0.32], [0.4, -0.1, 0.65])
desired = np.asarray(target.process(x), dtype=float)

adaptive = ld.AdaptiveLatticeLadderNLMS(
    initial_reflection=[0.0, 0.0],
    initial_taps=[0.0, 0.0, 0.0],
    mu_taps=0.06,
    mu_reflection=0.0015,
    margin=1e-4,
)

error = np.asarray(adaptive.adapt_block(x, desired), dtype=float)

print("learned reflection:", np.round(adaptive.reflection, 4))
print("final MSE:", np.mean(error[-1000:] ** 2))

MIMO and model-reduction scope

lattice-dsp includes MIMO/state-space and matrix-lattice tools, but the scope is deliberately conservative.

Implemented:

  • finite-Hankel SISO reduction as a C++ finite-section Ho-Kalman-style baseline;
  • MIMO block-Hankel reduction from Markov tensors;
  • compiled batched MIMO state-space simulation;
  • causal online MIMO lattice prediction from fitted matrix reflection coefficients;
  • matrix-lattice/all-pass runtime examples and finite-record adjoint diagnostics;
  • finite definite tangential Schur/Pick and J-inner diagnostic utilities.

Out of scope for the current alpha:

  • full infinite-dimensional AAK/Nehari solvers;
  • full matrix-valued AAK/Nehari optimal reduction;
  • generalized indefinite matrix Schur synthesis;
  • production acoustic echo cancellation;
  • complete room-acoustics, wireless, or control-system frameworks.

The docs label offline estimation, causal runtime, inductive evaluation, and transductive/block diagnostics separately so examples are clear about data use.

Documentation

Start here:

Representative examples:

Development

python -m pip install -e ".[dev,examples,benchmark,docs]"
pytest
ruff check .
ruff format .

Build docs locally:

./scripts/build_docs_with_results.sh
xdg-open docs/_build/html/index.html

The native extension is built with scikit-build-core, CMake, pybind11, NumPy, and optional OpenMP. If OpenMP is unavailable, the package falls back to serial batch processing.

Public validation

For a full release-style check:

python -m pip install -e ".[dev,examples,benchmark,docs]"
./scripts/release_validation.sh

For a quicker public-claim check:

PYTHONPATH="$PWD" pytest -q tests/test_release_trust_claims.py

License

Apache-2.0. See LICENSE and NOTICE.md.

Citation

If this package supports your research or teaching, please cite it using CITATION.cff.

Metadata

Release files for lattice-dsp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lattice-dsp 0.1.1
File Size Uploaded
lattice_dsp-0.1.1.tar.gz 10.8 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for lattice-dsp 0.1.1
File
lattice_dsp-0.1.1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
lattice_dsp-0.1.1-cp314-cp314-win32.whl CPython 3.14 CPython 3.14 Windows x86-32 Details
lattice_dsp-0.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
lattice_dsp-0.1.1-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
lattice_dsp-0.1.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
lattice_dsp-0.1.1-cp313-cp313-win32.whl CPython 3.13 CPython 3.13 Windows x86-32 Details
lattice_dsp-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
lattice_dsp-0.1.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
lattice_dsp-0.1.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
lattice_dsp-0.1.1-cp312-cp312-win32.whl CPython 3.12 CPython 3.12 Windows x86-32 Details
lattice_dsp-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
lattice_dsp-0.1.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details

Total release size: 14.0 MB

Release files / lattice_dsp-0.1.1.tar.gz

Download URL lattice_dsp-0.1.1.tar.gz
Size 10.8 MB
Tags Source
SHA-256 checksum
How to use checksums
535ec85be182d815f7775cb4ad05502b88802036c3ffc7143eb5e84fa675467a
BLAKE2b-256 checksum
How to use checksums
2db758801cc87c7d8653cf7b25d70e5445c5722ef15fed8e09095d62914caaac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 30, 2026.

Transparency log

Release files / lattice_dsp-0.1.1-cp314-cp314-win_amd64.whl

Download URL lattice_dsp-0.1.1-cp314-cp314-win_amd64.whl
Size 244.9 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
ecfcad7c2936b16cf5d4b4998856c21788d5c739a1946ecd5716e59b8f31d2d7
BLAKE2b-256 checksum
How to use checksums
f83c68a54af4871e87d2e813ecb6b7a339199dd5c13792a325146efac2d0e330
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 30, 2026.

Transparency log

Release files / lattice_dsp-0.1.1-cp314-cp314-win32.whl

Download URL lattice_dsp-0.1.1-cp314-cp314-win32.whl
Size 214.3 kB
Tags CPython 3.14 Windows x86-32
SHA-256 checksum
How to use checksums
c49df8bbee545826e7745fbcec4bf3e1baa815f67f200107b1ebe28ad21c720d
BLAKE2b-256 checksum
How to use checksums
892e26fb01f13f4a44071733e73c160a1232f261e9beca1f6778f130c4cf1a26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 30, 2026.

Transparency log

Release files / lattice_dsp-0.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL lattice_dsp-0.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 396.8 kB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
22f7402650f2e50d78a88222cf2958a6c5f7f31280ab02a2d71b9ea4ec942784
BLAKE2b-256 checksum
How to use checksums
30c5ad5f8b5097d4a0a3c278effe6b57f7644701856e85f627493bd8770b518b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 30, 2026.

Transparency log

Release files / lattice_dsp-0.1.1-cp314-cp314-macosx_11_0_arm64.whl

Download URL lattice_dsp-0.1.1-cp314-cp314-macosx_11_0_arm64.whl
Size 231.3 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f9649f8cda8c6570233df5468e5146af5a6a605efa942f1315eb000f6737b07f
BLAKE2b-256 checksum
How to use checksums
f593e9541079c49bdf9a1ae59487989e479c16fc173ea22fb751c56bc0e0998e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 30, 2026.

Transparency log

Release files / lattice_dsp-0.1.1-cp313-cp313-win_amd64.whl

Download URL lattice_dsp-0.1.1-cp313-cp313-win_amd64.whl
Size 240.0 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
b38cbcac791ead84f9f521426511eabea36ae24bfa5f5dabde5a06f95c6de843
BLAKE2b-256 checksum
How to use checksums
2e54a16d1c0ff7d160969d2a89e1d4895c0eade1554c9d259ca617db33f735a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 30, 2026.

Transparency log

Release files / lattice_dsp-0.1.1-cp313-cp313-win32.whl

Download URL lattice_dsp-0.1.1-cp313-cp313-win32.whl
Size 210.5 kB
Tags CPython 3.13 Windows x86-32
SHA-256 checksum
How to use checksums
ef0394e57a66b91a2306e6e9ae7c1f4000ad27724151cc02ae74ee3589c33c47
BLAKE2b-256 checksum
How to use checksums
ce34f69adf10f7fc3a5ec7554ccc8e9cc1b5c221f54252662cef5530ff93148c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 30, 2026.

Transparency log

Release files / lattice_dsp-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL lattice_dsp-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 396.4 kB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
a09408329f3e7347fc4921d69668d70e4da0c3e1a5c03fcc197ea93317e25488
BLAKE2b-256 checksum
How to use checksums
022faab1c0c58b19a412402454628b31cd13b6d602c21e020b8ce83f48b2fa5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 30, 2026.

Transparency log

Release files / lattice_dsp-0.1.1-cp313-cp313-macosx_11_0_arm64.whl

Download URL lattice_dsp-0.1.1-cp313-cp313-macosx_11_0_arm64.whl
Size 230.9 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fbfa0ff6f4ed738c172423e7a6f620056946c43f3013934e9f5551cfca558c55
BLAKE2b-256 checksum
How to use checksums
3e70adf51d0b7f8b0ad7de2ee507a52f5a2bb100f9712611396d3ec5ba190dcf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 30, 2026.

Transparency log

Release files / lattice_dsp-0.1.1-cp312-cp312-win_amd64.whl

Download URL lattice_dsp-0.1.1-cp312-cp312-win_amd64.whl
Size 240.0 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
2df52f10ee4377b395690155ea2690913be56066063efc068543ce31ce299570
BLAKE2b-256 checksum
How to use checksums
09588c54b7eff3b1a1cea39ed61a7c70f38e53aedcbbdb3640d336c144b0a8b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 30, 2026.

Transparency log

Release files / lattice_dsp-0.1.1-cp312-cp312-win32.whl

Download URL lattice_dsp-0.1.1-cp312-cp312-win32.whl
Size 210.5 kB
Tags CPython 3.12 Windows x86-32
SHA-256 checksum
How to use checksums
79842620eff4124cf78c2b97da75ae4f27cea605d51c6083e2afead22b1e1c07
BLAKE2b-256 checksum
How to use checksums
f0ae0d04184c1f28c3748ee562cdbf12c300064f2894b47cdb43a4ff77978c6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 30, 2026.

Transparency log

Release files / lattice_dsp-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL lattice_dsp-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 396.3 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f9012e7591196a17fa76ab45a3ee2f3157f9cd752c156b0351ed39ef83b12dec
BLAKE2b-256 checksum
How to use checksums
85aab1705bdd6a815119eb3f35d394848dcb980c826ab0559d7f249732540120
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 30, 2026.

Transparency log

Release files / lattice_dsp-0.1.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL lattice_dsp-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
Size 230.8 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4c482156744fdaea2794934b0724e4610da34410ec70b1b0c370f55636414fdb
BLAKE2b-256 checksum
How to use checksums
ccd062c3caf4f6a543d06046af60fa0d463301398e3d93f444f53202ed463864
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

13 release files

0.1.0

13 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page