Second-order section filtering with multiple filters
Project description
sosfilt
Second-order section filtering with multiple filters.
This library just extracts scipy's sosfiltfilt
(and related)
method. Instead of taking a single SOS filter, with shape
(n_sections, 6)
, it takes one filter for each core slice of the
input array. That is, the SOS filter has shape (n_filters, n_sections, 6)
, and the input array has shape (..., n, ...
), where
the product of the shape of all the elided dimensions is
n_filters
. Notably, it will not do any broadcasting along the
non-core dimensions.
The actual filtering algorithm employed within this library is exactly
the same as that within scipy. In that sense, results should be
identical. However, in order to vectorise the creation of the initial
conditions with sosfilt_zi
, a direct calculation is employed, rather
than deferring to a linear solve. The result should be practically
identical, but it is possible that they aren't reproducible to machine
precision due to this adjustment.
Installation
Install directly from the git repository, install from pypi with pip install sosfilt
, or install from conda with conda install -c angus-g sosfilt
.
Example
import sosfilt
import numpy as np
x = np.random.randn(5, 20, 5)
# 25 random lowpass filters
f = sosfilt.butter(3, np.random.rand(25))
sosfilt.sosfiltfilt(f, x, axis=1)
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
Built Distributions
File details
Details for the file sosfilt-1.3.0.tar.gz
.
File metadata
- Download URL: sosfilt-1.3.0.tar.gz
- Upload date:
- Size: 455.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2732cb9a0d71935f7fdfb40d28c6eacc2889beb689e587f24a2652b133bf21a3 |
|
MD5 | ec19b18d85ae7e8d8f308fff2e915900 |
|
BLAKE2b-256 | b9117218ac22161d815e1613ed3ca2392c453b6555dfc5657db568e7f8a4f2b7 |
File details
Details for the file sosfilt-1.3.0-pp310-pypy310_pp73-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-pp310-pypy310_pp73-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 178.5 kB
- Tags: PyPy, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5a7b33a653b0349ecda26bcab7465642ca5ecc540f10c9820394f8f67bfce98 |
|
MD5 | 4a78bb77aea5cffea70fc3584608614e |
|
BLAKE2b-256 | 61d3029e7a0917cb3e8c7887e89e2e09ff77a7a9edb6cf363a2b82d77c0a217c |
File details
Details for the file sosfilt-1.3.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl
- Upload date:
- Size: 156.2 kB
- Tags: PyPy, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33f765bafe643fe9dc7a5421ac79ec5d59df162ee3c1e9357a31384c99cb6118 |
|
MD5 | fb2bec20c6f315b6c2415fa65bdc8596 |
|
BLAKE2b-256 | 1e039a63f68110100893c872515b7c32896930b9e2f287a7abe51747328f6b97 |
File details
Details for the file sosfilt-1.3.0-pp39-pypy39_pp73-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-pp39-pypy39_pp73-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 178.4 kB
- Tags: PyPy, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 631e979dc473b9e14f157a0f236fb9e55306c8047c01171406897acc1e1c1cad |
|
MD5 | ad37a8a1b5d017617d34479c75de97ec |
|
BLAKE2b-256 | c9484378f1f0d7653a4109ec0147d905cd466f4316c989fcf59494dd1fa5db09 |
File details
Details for the file sosfilt-1.3.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
- Upload date:
- Size: 156.0 kB
- Tags: PyPy, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31a8e510b290b37b8a5c0a77dc07e4cee36edecac36420250d23b69e19560ef5 |
|
MD5 | 8bf0dd7a479c3f9f6961ab5a0d104905 |
|
BLAKE2b-256 | 48411eaf6692d8fdddc525cd3ffe73efb80fcc72ac3f5c3119ef982e6c5f7750 |
File details
Details for the file sosfilt-1.3.0-pp38-pypy38_pp73-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-pp38-pypy38_pp73-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 178.2 kB
- Tags: PyPy, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 930a88a95a3f3d7f5e5aa44922823339664315470813adfb54c7e9546ae284e3 |
|
MD5 | dd8d83e536b80b676b18740fc1d71dfa |
|
BLAKE2b-256 | 6a267240f0718fa10b8d8e57e395e944c8f57eacb10fad7f4fc762dcf0a996d3 |
File details
Details for the file sosfilt-1.3.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
- Upload date:
- Size: 155.5 kB
- Tags: PyPy, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d5f840354134c6688396418abf328fc3dd6d6ee3810ac82b4b04fdb9c410b85 |
|
MD5 | d711253ad9f94aa08eb8a1f0fae5430e |
|
BLAKE2b-256 | 609663907444b46f4eac91d81d495ab7a14ff38cf3b0f6a973091cb5d792b8a8 |
File details
Details for the file sosfilt-1.3.0-pp37-pypy37_pp73-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-pp37-pypy37_pp73-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 178.0 kB
- Tags: PyPy, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0aa5f471a26d0c696b3e7b81ce8beeed34fc5fc5d89108a0fc648a1a7f542b5 |
|
MD5 | 546efcc8f5940516dfbee92b9e71eeff |
|
BLAKE2b-256 | db2cdd856c6a1466000a65fe8ebaf95758acac6f85a075cce01e3410aadbb502 |
File details
Details for the file sosfilt-1.3.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
- Upload date:
- Size: 155.4 kB
- Tags: PyPy, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8261c858384918cc2cb318ad55d165ad7225bc4b5609e68933e154571bb30c4 |
|
MD5 | 4c253e0c80ce22665e3a9fc231fffec6 |
|
BLAKE2b-256 | 2ebac8203b354e9638d5103e915dd46d43df1079d8513df5feaef9111cc250d7 |
File details
Details for the file sosfilt-1.3.0-cp311-cp311-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-cp311-cp311-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.11, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df202ff4d960eb4c3d5415986a58f7da17aab7e6fa0a331f6bb30234ce7ba628 |
|
MD5 | 5b9a4eeddc3812f10c890f1f7aaabf72 |
|
BLAKE2b-256 | 7b783a37bff89bdd73e3d84956af4352d8905709b336d9c170b337a8eb058931 |
File details
Details for the file sosfilt-1.3.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 190.5 kB
- Tags: CPython 3.11, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a97337bcaee6ffb05c676fad5ea1508c1aec3da5eadd3bbc6e89cb6394ff7bd |
|
MD5 | 3f839549e67f10eb5e9f514b0c83e241 |
|
BLAKE2b-256 | 1f1d1ad6eb68ab1fcc3bc40455be2db63e9fafb6298350cadeb5a605c87b0ddf |
File details
Details for the file sosfilt-1.3.0-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 165.9 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc32ef078f05f9028568ef46730be6931299997731ada2a666980f45a872c8bc |
|
MD5 | aa88659f225da1620203ff5869ee7591 |
|
BLAKE2b-256 | b7375f4cc4a5a79c539d3173a69d4eb6d11e73ebc1de798f9eea3fb4281e359d |
File details
Details for the file sosfilt-1.3.0-cp310-cp310-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-cp310-cp310-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.10, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1c55e2a6df9d6c14cea0f97aaa5c918ee7c93ccffcc95720003384f06e80e5a |
|
MD5 | 60e4fccd3ff0a32e40fd323cf5917c5c |
|
BLAKE2b-256 | 57de97e523e4388665e6d650b41332ca11cd2f22404847f2d6d4624f928e7f8e |
File details
Details for the file sosfilt-1.3.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 190.9 kB
- Tags: CPython 3.10, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3441460ef354a4bd10943947111ef3f5d987443e522b3227476b27141cb163be |
|
MD5 | 09d7196e84f673df83423f45a0ea24b4 |
|
BLAKE2b-256 | cd7b051e9269f56192b8ad901ba33004b98a68321945a677165bb0d325cb6bb5 |
File details
Details for the file sosfilt-1.3.0-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 166.4 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2249c8740e8065b6b5ee0515e151ca3067135da34e5e04aa4c3103b156764cfc |
|
MD5 | a32a7b5cd643514031487f991996b8dc |
|
BLAKE2b-256 | 6e600c86d8e3ee6e2a047fea97e01a2d5b14a5cb5679ce68652e78bdc75f4ce0 |
File details
Details for the file sosfilt-1.3.0-cp39-cp39-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-cp39-cp39-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.9, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca42dbf48ef30d13e373b6132b026c15ea46aa30c0a18f5e8f140d41998b6e62 |
|
MD5 | b992908c22251e7e3e837867e2fb1641 |
|
BLAKE2b-256 | 52efc8fd72b5be9f4400967f271100ad3f44888ba545c44e0ce25c72bba071c9 |
File details
Details for the file sosfilt-1.3.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 191.7 kB
- Tags: CPython 3.9, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b76eef0cfed6f659efcd40bec0d364ca6ef29d65b53a94a70d9ab96ffe726542 |
|
MD5 | 463badb7bbdcdd41ca5d0540d77f9939 |
|
BLAKE2b-256 | dab9676c62082238acc2fe9fa4c079ad10f32859f3ff06449ff4f98930e4ace9 |
File details
Details for the file sosfilt-1.3.0-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 167.0 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2b5d003c0ec5feb6dd5aa2fa3a3356a8a9911b9393badf18fb19995c87f7e74 |
|
MD5 | ef57c91e633c9dc4f38d98293f7b6ac4 |
|
BLAKE2b-256 | ad8b285bcfb92a782285c1692a7045bc15fa609bc0ab869c07d4047e762f2ccd |
File details
Details for the file sosfilt-1.3.0-cp38-cp38-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-cp38-cp38-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.8, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f5043cd93acb92717bf0eaf3b6817de532f747082be9d51135f5eb0e0671045 |
|
MD5 | 77895b4e9a9bde1299b0dd6593a8c48a |
|
BLAKE2b-256 | ac8139e3ecafcf6143b30b60fbbd8cd7130b30aac574ec6b022aed2bd92bb1c7 |
File details
Details for the file sosfilt-1.3.0-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 192.6 kB
- Tags: CPython 3.8, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6f000ee4f9496e48e1921db45a12fd55848f0770a57af13e4e15389c72c97e9 |
|
MD5 | e9760dcc0f20e4f11013246866252ab3 |
|
BLAKE2b-256 | 2e98299b3ecbcbe45e1e81c29dbc7f130b4cab06d291f68ef99cb2db5018b255 |
File details
Details for the file sosfilt-1.3.0-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 166.3 kB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e91f89cebcecae435fe814acc9150a761beb2e1ed88d9a29e6bac40d4c4a897b |
|
MD5 | ab131d9e51f7ded847fc82e94fd9d772 |
|
BLAKE2b-256 | d175706b35f1fda70b913fa657fd3c0a0cb03d88ffb4d2487ec8a96459ab8200 |
File details
Details for the file sosfilt-1.3.0-cp37-cp37m-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-cp37-cp37m-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.7m, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48366136005bd9be37ceeab9bec7c6145f7312e58805bef39a9fa347c5faa1c3 |
|
MD5 | cfb5b131946d6ef8158ca3a643f8b02e |
|
BLAKE2b-256 | 520f168fc6eb4074c3162e6845994219285d8b55b8ae314cc608047e2b448471 |
File details
Details for the file sosfilt-1.3.0-cp37-cp37m-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-cp37-cp37m-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 190.4 kB
- Tags: CPython 3.7m, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da95d0fe3e87ccb3e947158f812afe72e9673e7ed8c39c51522e07a09e3a53c6 |
|
MD5 | efb4c2dbb0c4e7cbfad6a63969e1c0e9 |
|
BLAKE2b-256 | 74cd7d5be1db02526a05ccde31074c4d811f354e2ec988fd8bb51e492e68f4ed |
File details
Details for the file sosfilt-1.3.0-cp37-cp37m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: sosfilt-1.3.0-cp37-cp37m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 165.0 kB
- Tags: CPython 3.7m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 175c48019a97fb03a46dd16923b53945e2f99189f21cb42c106fc34a15a3ef2f |
|
MD5 | 1cf4282313dd12e1be6fb0aed50b855e |
|
BLAKE2b-256 | 78c950d66c5b8ed64cf44bc248e95a6b81c509895292d9bd011c82692811262c |