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.3.tar.gz (68.5 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.3-cp38-abi3-win_amd64.whl (568.5 kB view details)

Uploaded CPython 3.8+Windows x86-64

pm_remez-0.3.3-cp38-abi3-win32.whl (562.3 kB view details)

Uploaded CPython 3.8+Windows x86

pm_remez-0.3.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (718.3 kB view details)

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

pm_remez-0.3.3-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (749.3 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ s390x

pm_remez-0.3.3-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (858.0 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ppc64le

pm_remez-0.3.3-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (715.9 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARMv7l

pm_remez-0.3.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (712.9 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.8+macOS 11.0+ ARM64

pm_remez-0.3.3-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.3.tar.gz.

File metadata

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

File hashes

Hashes for pm_remez-0.3.3.tar.gz
Algorithm Hash digest
SHA256 1e01fb43b31f56d775509896239a73d980034b1e0df77baa529fd20ecbb7e51d
MD5 99a6232d5f3d00d3bb98ab4d14d72b1e
BLAKE2b-256 26fb1163e97ee44bf284fda400c46b613a2220941d4ee102e7d8cbd652ee3fe7

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pm_remez-0.3.3-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d676226122bbafd67cce0c1bf100efecb71a90231ca588fdebd5153e5f403fc0
MD5 623732a7ab82df05eee9b4acd6e11641
BLAKE2b-256 122fd05f9358681920ee541c74b7cbd310af3791ed11b04c8cbec0148be26b1b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pm_remez-0.3.3-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 9ba665b7f392cd6d509c84a9efd13490ca8c968282d234e7d653df56ccbf3079
MD5 94b22b25d6b59794292b5e496f2885ea
BLAKE2b-256 60b78df3466a62dcb9e0ce5cd3f0384bda7130d29ee697d2dc1ed2eda0319921

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bd8a45a0711a7700e1fee8d505970cbee2197e005fe1f4609e36739d441bef0f
MD5 c9e2fe97d2ad9593f2d523394f3ffa51
BLAKE2b-256 ba24babf567611fbeea77c8016dcc923a258554b3ea158050ee8c73a304329b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.3-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 7962e59d448e23528fb2e38b7a06f65fa236672b3aa0f33b2e2d1d9b81a393ce
MD5 00802126e6cfd909386bb8bb9d04ce3c
BLAKE2b-256 bbb93379e9580b68b5acd3c54c07c4357669bde03b2d067340c0d6a43341a999

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.3-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 e053f87727d080623a6b3558e953798de912c66f1193a0bbbde408fe234e7c3d
MD5 b26f208673952b24840f5497b365859b
BLAKE2b-256 770da644fe79a6370c166962c06342350f420c607d53c658f6f29170b292405f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.3-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 27deed887f1a3ac613b12c6266f2bd35fcb5a2fece23b22fc2529c90da380d67
MD5 ddc669e0adace731341bea02a0333e4c
BLAKE2b-256 1bcee2f6be25f3c1767685d360c6084829295f90a5f2476d8f1fe540984489f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5645b4080f6402be72faa33fd90c62a6c85e36d920939f908e6866ce2c7742be
MD5 5915f0aa4d84fd5686810142501ba607
BLAKE2b-256 455627de3b75eb1fe1ff13fd52e0084045a882483cd4776f1975cb67f39d7e1a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.3-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 97e0180df113c421484ec088b9655f4e53c8aeb0404a42d9ca17a6716cbc7902
MD5 3d8b858c431e852a80b20a39b4cbdd28
BLAKE2b-256 dcbbb8d7a67106e41e59cd7275e6acaf4014e05027366f4d0e3ef92b0e3aa29f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.3-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 05325c87abc9a19e4ae0b16f8547f1b5a9219134c0d3e49c55a1dd37ad4a17ff
MD5 443ca444ac522aa2a26902eb8fb77874
BLAKE2b-256 21b12cebee16c662f7a350f03950b14775cab150a7e7fe5ec3f8dedfb18f64dc

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