Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/berndporr/py-iir-filter
Realtime IIR filter (sample in, sample out)
https://github.com/berndporr/py-iir-filter
iir iir-filter python
Last synced: about 2 months ago
JSON representation
Realtime IIR filter (sample in, sample out)
- Host: GitHub
- URL: https://github.com/berndporr/py-iir-filter
- Owner: berndporr
- License: apache-2.0
- Created: 2020-06-06T13:02:40.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-21T14:15:29.000Z (about 2 years ago)
- Last Synced: 2024-09-10T19:03:22.107Z (4 months ago)
- Topics: iir, iir-filter, python
- Language: Python
- Homepage:
- Size: 49.8 KB
- Stars: 12
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
=======================================
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.Installation
============Install form the python package index with::
pip install py-iir-filter
You can also install it locally from the cloned github repo with::
python setup.py install
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)