Skip to main content

Efficient realtime IIR filter in Python

This is an IIR filter class which performs sample by sample realtime processing of data. It’s very efficient because it’s not using any indexing operations internally. The class instance acts as the memory of the filter so that it remembers its past.

Import

Use the standard python command to import it:

import iir_filter

Calculate the coefficients

Use your favourite scipy IIR design command and export the coefficients as an SOS:

sos = signal.butter(order, [cutoff(s)], '[filter type]', output='sos')

Create an instance

The constructor takes the sos chain as an argument:

f = iir_filter.IIR_filter(sos)

Perform filtering sample by sample

Filtering is sample by sample by processing the samples as they arrive, for example from an ADC:

sample = f.filter(sample)

Metadata

Release files for py-iir-filter 1.1.0

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

Source distribution (sdist)

Source distribution for py-iir-filter 1.1.0
File Size Uploaded Provenance
py-iir-filter-1.1.0.tar.gz 51.8 kB Without provenance Details

Release files / py-iir-filter-1.1.0.tar.gz

Download URL py-iir-filter-1.1.0.tar.gz
Size 51.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f2c245c7fbdfe0945e76cadf0e2f1f80005a9b35a16b92ef4adf02e56fff9acb
BLAKE2b-256 checksum
How to use checksums
ccb5d4290d44840b8943b25bb6a03f552c279373d26f507e752ddeea0febe797
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.8

Security for py-iir-filter 1.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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