Skip to main content

Parks-McClellan Remez FIR design algorithm

Project description

pm-remez: Parks-McClellan Remez FIR design algorithm

Crates.io Rust Rust Docs Python Python Docs License License: MIT

pm-remez is a modern Rust implementation of the Parks-McClellan Remez exchange algorithm. It can be used as a Rust library and as a Python package via its Python bindings.

pm-remez supports the design of FIR filters with even symmetry and odd symmetry, and with an even number of taps and an odd number of taps, by reducing all these cases to the even symmetry odd number of taps case. The desired frequency response in each band, as well as the weights, can be defined as arbitrary functions. The library can use double-precision IEEE 754 floating-point numbers for calculations, as well as other higher precision floating-point implementations, such as num-bigfloat. This can be used to solve numerically challenging problems that are difficult to solve using double-precision arithmetic.

The implementation draws ideas from a paper by S.I. Filip to make the algorithm robust against numerical errors. These ideas include the use of Chebyshev proxy root finding to find the extrema of the weighted error function in the Remez exchange step.

Documentation

The documentation for the Rust crate is hosted in docs.rs/pm-remez.

The documentation for the Python package is hosted in pm-remez.readthedocs.io.

The Python package documentation contains a series of examples that show how to use pm-remez to design commonly used types of FIR filters. These illustrate the capabilities of pm-remez and also serve as a filter design guide. The documentation of the Rust crate contains a few examples of the Rust API. The Python examples can also be written in Rust (and in fact this is done as part of integration testing).

Python package

The pm-remez Python package is published in PyPI. There are pre-built binary packages for common architectures and operating systems. For these, the package can be installed by doing

pip install pm-remez

Building

The pm-remez crate uses ndarray-linalg to solve eigenvalue problems. This in turn depends on LAPACK. The pm-remez crate has several feature flags that are used to select the LAPACK backend. Exactly one of these features needs to be enabled to build pm-remez. The feature flags are openblas-static, openblas-system, netlib-static, netlib-system, intel-mkl-static and intel-mkl-system. The -static versions of each flag build the LAPACK backend and link statically against it. The -system versions link against a system-installed library (linking can be dynamic or static depending on which type of library is installed). For example,

cargo build --release --features openblas-system

will build against a system-installed OpenBLAS library.

The Python package is built using maturin. It can be built with

maturin build --release

or

python -mbuild

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

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

pm_remez-0.3.2.tar.gz (69.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pm_remez-0.3.2-cp38-abi3-win_amd64.whl (569.7 kB view details)

Uploaded CPython 3.8+Windows x86-64

pm_remez-0.3.2-cp38-abi3-win32.whl (563.9 kB view details)

Uploaded CPython 3.8+Windows x86

pm_remez-0.3.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (718.0 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

pm_remez-0.3.2-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (749.1 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ s390x

pm_remez-0.3.2-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (855.4 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ppc64le

pm_remez-0.3.2-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (716.3 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARMv7l

pm_remez-0.3.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (712.0 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

pm_remez-0.3.2-cp38-abi3-macosx_11_0_arm64.whl (675.9 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

pm_remez-0.3.2-cp38-abi3-macosx_10_12_x86_64.whl (684.1 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file pm_remez-0.3.2.tar.gz.

File metadata

  • Download URL: pm_remez-0.3.2.tar.gz
  • Upload date:
  • Size: 69.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.13.1

File hashes

Hashes for pm_remez-0.3.2.tar.gz
Algorithm Hash digest
SHA256 2c10e3434eec3f19725800ec84e25db38c65e34c8bdf4096ace97c1ae8c58bee
MD5 c1377b2962f7adf240f8bb46251ebb13
BLAKE2b-256 7b6a5d0cd0bf828ea5e93fd0c956e386af35eb1108ddd4a9043991bc40363b84

See more details on using hashes here.

File details

Details for the file pm_remez-0.3.2-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: pm_remez-0.3.2-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 569.7 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.13.1

File hashes

Hashes for pm_remez-0.3.2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 33b3714eabc18402033d4485dfe58108b37bab169ed40d2b45c0e173a017cbd5
MD5 aa2d530f9f071cc4f9d04d9f2c48fb1e
BLAKE2b-256 1495f98b440eb4eaed5ee1807b838a8cdcc5e20e0e26ed5cda573791979652cd

See more details on using hashes here.

File details

Details for the file pm_remez-0.3.2-cp38-abi3-win32.whl.

File metadata

  • Download URL: pm_remez-0.3.2-cp38-abi3-win32.whl
  • Upload date:
  • Size: 563.9 kB
  • Tags: CPython 3.8+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.13.1

File hashes

Hashes for pm_remez-0.3.2-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 0e18be0581ee7fc1730808829ec8f09791c38d3bc64c991cec3d0080f73ea4e8
MD5 d1202a89dea8157b5eaf9399ce6d4e09
BLAKE2b-256 3a0c07eb6afc75f777d80cd10eaedf1310f7ddcbd1584a9c183e6b093774f6a7

See more details on using hashes here.

File details

Details for the file pm_remez-0.3.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pm_remez-0.3.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 58a57f8ffa10032aafeec040cd3b8bf718adaacba6b6bca96465e066a8583e24
MD5 beb4a2d7c376b37fc4b0410da03d9234
BLAKE2b-256 af6ccefc2bcfc059e7f9ffce60e4bc55d27ccd1e9c5f8d571857a96eabb14ed9

See more details on using hashes here.

File details

Details for the file pm_remez-0.3.2-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for pm_remez-0.3.2-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 bc30fe9c81c2e3350ba1ea11d1db34a4fc073f8fcbed136355e4624ed7b9b4ba
MD5 75fff9834f6375c4bbbac7abd03cd121
BLAKE2b-256 a2ffe697ca5bb543670537d4901939c0107c80021b354e3ffed59f3f0cc70ead

See more details on using hashes here.

File details

Details for the file pm_remez-0.3.2-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for pm_remez-0.3.2-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 52b2b4076e8bb35e893b5bcf0cbd148242c7c16cd70a3b060047cff8d05eedc1
MD5 466c7e398dbb58457bf717d263d55a33
BLAKE2b-256 3de573fe03700990431a28f4386e19abbd1ad66b665c255b4490a08e4b92c75a

See more details on using hashes here.

File details

Details for the file pm_remez-0.3.2-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for pm_remez-0.3.2-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 8c6123df874c6185f92445c0a91316c886cf80cf8dfa6b5dc9c4d566dca2d670
MD5 07dcff7f2c846dd1e16d9fa7a6d76825
BLAKE2b-256 8f9461dc48c92d3f341e25462e8f925be1e9a8e3f5def8ab86f9cb808773ad3b

See more details on using hashes here.

File details

Details for the file pm_remez-0.3.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pm_remez-0.3.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2479d2185e33fb2148a7971b47be83127fcb7791e63673a9b6148d034afddeae
MD5 78b974c16c404ff25c23743e9a39f2d5
BLAKE2b-256 99493faf185118815db4a6ad6446bfaaf613f2da6decab001269acb04822e019

See more details on using hashes here.

File details

Details for the file pm_remez-0.3.2-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pm_remez-0.3.2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e952346417aab0c0158bf76e9076588703f1bb5391e399a0f7b5d09f0bb9de7c
MD5 50b91779cd998ba3b0fc8e5c85f7ffbb
BLAKE2b-256 e30b11113c951f555e2844080c5fe280cb6c1f88fb2845a6ae655b94f0b2938e

See more details on using hashes here.

File details

Details for the file pm_remez-0.3.2-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pm_remez-0.3.2-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 18202f14dd814c59df740c15b74c47b16f64027610bfe893454e4cee1fa17fe8
MD5 e7f39dc1b4dff394945e55eef5932391
BLAKE2b-256 a89a4a361f60adbd725718dfa4c3ab15f3fb3ccb74d429eea50855c5d244623c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page