Fast realtime IIR filter
Project description
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)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py-iir-filter-1.1.0.tar.gz
(51.8 kB
view details)
File details
Details for the file py-iir-filter-1.1.0.tar.gz
.
File metadata
- Download URL: py-iir-filter-1.1.0.tar.gz
- Upload date:
- Size: 51.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2c245c7fbdfe0945e76cadf0e2f1f80005a9b35a16b92ef4adf02e56fff9acb |
|
MD5 | 41bd3e2766a30a69a8b88e58cbea6b72 |
|
BLAKE2b-256 | ccb5d4290d44840b8943b25bb6a03f552c279373d26f507e752ddeea0febe797 |