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.4.tar.gz (67.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.4-cp38-abi3-win_amd64.whl (568.6 kB view details)

Uploaded CPython 3.8+Windows x86-64

pm_remez-0.3.4-cp38-abi3-win32.whl (560.0 kB view details)

Uploaded CPython 3.8+Windows x86

pm_remez-0.3.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (719.0 kB view details)

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

pm_remez-0.3.4-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (749.4 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ s390x

pm_remez-0.3.4-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (860.3 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ppc64le

pm_remez-0.3.4-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (715.3 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARMv7l

pm_remez-0.3.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (713.7 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

pm_remez-0.3.4-cp38-abi3-macosx_11_0_arm64.whl (678.9 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

pm_remez-0.3.4-cp38-abi3-macosx_10_12_x86_64.whl (682.0 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for pm_remez-0.3.4.tar.gz
Algorithm Hash digest
SHA256 83af1a0701d7144e5ff710fb65b4842a1789dc9c730279004182bd78ee6c8f0b
MD5 97b15def6a6f724865f12c90a7a51d91
BLAKE2b-256 ea43719701c68a7e1a7e0c02bed4ecbfcdb7b92937c2e97e9632ba2c2e37771f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pm_remez-0.3.4-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 81521128b810549ea65f38c70318f4e3bdb1d61fa0a3b74dc4d235c6bf6be133
MD5 98f0046424f50b936c9eaaf86ec86268
BLAKE2b-256 1412189293e9b7262064348f1a87aac771c0508f1e7423098e28f972da1ef416

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pm_remez-0.3.4-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 fe7c5031b8531df8bf31cc674555cb5e3d73d01549008e3b1fb8d1acfa86ca00
MD5 9a9d1169cbaf4ae4f4d1bbde381b4a7d
BLAKE2b-256 600eddd9423afda4ab0313a32c5cf02a1a5d5bbf64b7e086d6929c7e8937f3b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 da47c2a9b49ae3c618822da7bcc8c83fb226d00c9f300735c9f681b533d95f0d
MD5 ae8891bb3d658bbf46b88e8400709909
BLAKE2b-256 418e193a6beba551c331b0f830f817165f45816ce37a20ba9be900ce0d219f04

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.4-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 612c8ad0e79d7d46515077d7dd76995298c2eeaa77888fbe4b961006634da19a
MD5 2953b9dd4516ba0ca533eeadb358e23e
BLAKE2b-256 f385df05f81e55c61fcb3b647d8ac29d0869af4bbe41204e581e49651490da0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.4-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 5f288cc17dc07dabffad6df15fa0e7a2a7ccba421398e2ec4c137664e9c1c160
MD5 c61e33040d3ba9a2f6bad5d3b250d775
BLAKE2b-256 4119ee40270c67c26267b9cc3a3a39697b96e981c2082f3b70bde4c87c58fa03

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.4-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 5f689fa7750f675e5807f4aa22e836e246dcd5b0f48672df61fd369761163745
MD5 077fe8348f6f992beea6334f6a6ea83d
BLAKE2b-256 2998c405ef91fcb6f62360499fe9c229092a55138310c938be222a019c43c8af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 512ac69271bd7112d8bf1063dc7c5477a093446b58f8cdd582a9f7914ec82e6c
MD5 162d0b0c4a15bc2625c8b73ecab708c5
BLAKE2b-256 2b8c29d14978059f29d2329463ed414eff3913d92ca14e4dccbd59e48414ad27

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.4-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a7f764aa9d0469b4cd9d747f3b7e9b17a17af6a376083f32873607d1b679f0f9
MD5 99d46de6982c8af7e6f06969dda2acfb
BLAKE2b-256 3e6606283d42a71ee4723947276e393f8536e897f7805a83c58646ab7aff4740

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.4-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ec0361628708fb12d69d0fa714ee6e973f4d21917626c7d844741a23ddfd10c0
MD5 027b0a2b98e5a7ec135df687808d1250
BLAKE2b-256 eddc28d0dacd16ae49e716f5a6ba446351e9b177c84e7ecab258e75e95ffbb5f

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