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.1.tar.gz (69.1 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.1-cp38-abi3-win_amd64.whl (569.6 kB view details)

Uploaded CPython 3.8+Windows x86-64

pm_remez-0.3.1-cp38-abi3-win32.whl (563.5 kB view details)

Uploaded CPython 3.8+Windows x86

pm_remez-0.3.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (725.0 kB view details)

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

pm_remez-0.3.1-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (755.1 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ s390x

pm_remez-0.3.1-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (862.2 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ppc64le

pm_remez-0.3.1-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (719.3 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARMv7l

pm_remez-0.3.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (715.9 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

pm_remez-0.3.1-cp38-abi3-macosx_11_0_arm64.whl (680.0 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

pm_remez-0.3.1-cp38-abi3-macosx_10_12_x86_64.whl (690.7 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for pm_remez-0.3.1.tar.gz
Algorithm Hash digest
SHA256 261c15fba887e6a3b89c51d2ac505f740fe1a1416154abc7802a068044dd1701
MD5 216449650419ae50904c0c80b9e19890
BLAKE2b-256 433ec26ae63d8621b6bb9656734589e0b5e039949372eb9c1b8ee07ee4f17867

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pm_remez-0.3.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 bcc4053ed7f8b41fd4d4b15bf7b524420f463c304f8166e2ceb2cd4cfabdf5df
MD5 99da2280ecb7cba223c2bf144d7ff325
BLAKE2b-256 2ddbffbc64e127ece4b4940640c4d301d27a7e7db4778cc470bdcca80b7d419c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pm_remez-0.3.1-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 dbfee9d9050be5257dd0617bc7e28f8633e10a27cf9e7fba82c82a4c8d9f253f
MD5 ddbf5d72aa0016b51a88beda54927313
BLAKE2b-256 bc7658f9136fd1c6d361461ec46e32fd3d2d5b6faf7c040dd320f07082bd91cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4cfa47b381b1c5ad15c4ca993e35498a59cd5dff5cf087bfa35b7ecfea15aa63
MD5 bce289cf3392999d4506adf73a393d8f
BLAKE2b-256 a23656350f83807ad252691a3077cfac14c9d8c21e9946ed49d17102c2269e65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.1-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 a04cf70ddcd8561a20f55e2e61d9fb44d5141d43d3da064586c95a55c1a38b3e
MD5 5584ea315aabbdde4eaba879012e15f9
BLAKE2b-256 9ec395af32bd01175e5d9b3f827f1f17f8a576f276af2de6edac6002a5c95725

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.1-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 0344c6a4e48fcfee177c4e8660f5786edb575d9cad60e494e952ae50273bcc8a
MD5 446e032f521329d3d80f1c33208d1fd6
BLAKE2b-256 9e81b2cbddf4054126d8b9398942cee49c9ea3216110ed80f3783487a1ffc068

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.1-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 245e1cce802efa3f710fdc5e327d9a623838d782c987b3acc9ee83f9e2323050
MD5 147539581c3420fdf5d03f21048b3c33
BLAKE2b-256 d406ab47f56cd1d66059c66cfb7f024a4a71fb91f88acae56a3595f2f409fcd7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f555547dd3f2100d21c4db8e92812625ce8813b78e595035cbf6fc661c59a7a4
MD5 d9e36aa3af8b53ded26f729eb91c480a
BLAKE2b-256 fdb0c10263df397272ac35dd896f7ab5a7bf47638d39a7a02033aa61faa6b282

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a54639eda979c964e77474cf6af84c0a87c6faeb14781318eb887ccaf8e39f10
MD5 e385098832dec407e6956a09c80b2748
BLAKE2b-256 97f8e5f2b42c78cd4b316f47f0198a1938f6c2507866bee291cbd940c61bba4e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.1-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2f0fa1bfd454e130b2745fab917edb271cad694ba3d8e55e8df943943a04fd17
MD5 1eda94cdd67976f79f47c8da819ea746
BLAKE2b-256 b41ae4da393da9f6b4534751dd5826b04487555e0acbd7dc8525ab40a25d74eb

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