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.2.5.tar.gz (73.6 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.2.5-cp38-abi3-win_amd64.whl (561.5 kB view details)

Uploaded CPython 3.8+Windows x86-64

pm_remez-0.2.5-cp38-abi3-win32.whl (554.3 kB view details)

Uploaded CPython 3.8+Windows x86

pm_remez-0.2.5-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (716.3 kB view details)

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

pm_remez-0.2.5-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (747.6 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ s390x

pm_remez-0.2.5-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (855.5 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ppc64le

pm_remez-0.2.5-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (710.6 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARMv7l

pm_remez-0.2.5-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (707.3 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

pm_remez-0.2.5-cp38-abi3-macosx_11_0_arm64.whl (671.8 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

pm_remez-0.2.5-cp38-abi3-macosx_10_12_x86_64.whl (682.6 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for pm_remez-0.2.5.tar.gz
Algorithm Hash digest
SHA256 e7bcc9f14eaf4a4e9eea851af5c5bece3b455352634ed57b8bc84274f3f1223d
MD5 1145ef07e8d9e0b7aba5c4964c7d6f75
BLAKE2b-256 198f81aa96b41fc16ad8f04cd323b38e3582373919e86ac13dd8d40d4ce0392c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pm_remez-0.2.5-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 52b54e2666782d156f304abc93289998b5bbc915bd40517157c1eb6d782318d4
MD5 3cf162f4e536c623c80dc0c29bd4249d
BLAKE2b-256 1c6bf8d9c15823f28ebc8d4ddac3a15023f029410504a9fe280ca90239052a3f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pm_remez-0.2.5-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 af8d3ed18d25a972a03e539e0b00ab0ef742d01f520045a021e5fcd08430ddc6
MD5 82c55dc0e1512901a4d7a491fe34d22b
BLAKE2b-256 d7e15a2a531737784c206e4ff03ae1ac4171cce108c8c842f1c487db2ca79adc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.2.5-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f4fc42330ff311ea7baf2f92fcc2de363912b5f4a1923997df966715e451b7e9
MD5 9eb684108f4705caaa1f595488da79fa
BLAKE2b-256 9dea05ca6405f9cacab5bb2a397af6b7127318a0446b66c50bb45a06a1bd7373

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.2.5-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 8c3d1b48a36efd83cde75ea81747ca2871211c809855c8fb4493e2a28c0acfa4
MD5 dd568f2ffbd472311d960276b784b0b2
BLAKE2b-256 9ec3ed81ea53f9889e42dfc17bde73866f007c9d5a6396f1751061b1bbe85fd8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.2.5-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 35440a099f1fb728dc87371ab76cde144dabe83b3e91130e116a385178a12d55
MD5 0ed56aa62b48c6614238eb6f53b50131
BLAKE2b-256 2e52b148a45eb8dc7ab574f2ed9e519d3bc36d76c5564c4db11d234a2222d66f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.2.5-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 57a4f870a54112663124e1ab552c85f2820345f69626d97527145f2d09c3ca26
MD5 8b701393fdcd1b94a2b0fa7ef7fc50e8
BLAKE2b-256 5280e926ef45f750d964cca5c75d936efe3fd6cc9a5a862a7dde602d8fdc49ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.2.5-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cd6b78c56eba6ab351cc8179b9609e47b9d5738e6ef457055c7a5a0643fdf438
MD5 9ea792b674542adec7a0d182557b2a07
BLAKE2b-256 830061d9f2e312226ecfdf96e0d99bb8cea5c7d070799b5f5d610ad071f50432

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.2.5-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 df47e90ac2efcce80e436902bfa844120617a186aff5e2ef840616263a4a30fd
MD5 e9f20fee28b493ae1907fc51ae03acdc
BLAKE2b-256 ec130bd3068a1b29a3e07557fb15bab67b64783462fb5f9e8a3721df47b9fd16

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.2.5-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2901b8e547b6add932bf00ded534b68eec55418d5606223d98df61b1257ca03b
MD5 5533427f0bd088eafc32a2cde730a0bd
BLAKE2b-256 a5cea4b8befd301b500f2735c608cfc5a8d8cdc5f8b1c8188c206e342164d9f1

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