Skip to main content

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.

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.5.tar.gz (66.3 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.5-cp38-abi3-win_amd64.whl (568.4 kB view details)

Uploaded CPython 3.8+Windows x86-64

pm_remez-0.3.5-cp38-abi3-win32.whl (560.1 kB view details)

Uploaded CPython 3.8+Windows x86

pm_remez-0.3.5-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (717.2 kB view details)

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

pm_remez-0.3.5-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (749.8 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ s390x

pm_remez-0.3.5-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (861.9 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ppc64le

pm_remez-0.3.5-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (716.2 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARMv7l

pm_remez-0.3.5-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (713.9 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

pm_remez-0.3.5-cp38-abi3-macosx_11_0_arm64.whl (679.1 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

pm_remez-0.3.5-cp38-abi3-macosx_10_12_x86_64.whl (681.6 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for pm_remez-0.3.5.tar.gz
Algorithm Hash digest
SHA256 bd5f25435b7f6ab3fa82ef9477867048ab67e6203af66fc22147c4cfe61e586b
MD5 7f0c8f76896be6285e3f2366447c0b3d
BLAKE2b-256 aa66e62fa6f3a1347fdc88a6b389628214e3e86eb97e7d21aca9b4f01fbeb8f9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pm_remez-0.3.5-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4008787dc4de2a18e5fbb247458e8ac5c3975fd35546420ab72b8af91b4a3f7b
MD5 29e224a090a4dff2941c916b7ed862a4
BLAKE2b-256 4544cd9b428ccd06f91104813ef31173d308fbb1016993ff6fe31969430f597f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pm_remez-0.3.5-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 1d8d494baa6df3d9ae88f9dbac68ac7c5d60052dde5fbfb1faf6f9d521ea08ac
MD5 8e99d165324b5130043088fe379e0c9f
BLAKE2b-256 4a6a35379f30b716998265fae0767f50a248962a82659ff62b8f1120b041933d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.5-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9916236dd89feaea3ebb8eb02f2ab8fbecb7bd43cf0fccfcbdf8a01cf2590916
MD5 12414aeb3258e16fee4d3bf064d74683
BLAKE2b-256 bc9ee0510d15a49a0bd663a384bd72e6d6034fc20d49bbadb4a91a062c95b749

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.5-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 bdf2918b983d134f169e5cb8f299318c1a44de527b47e137ad536d2e584e38ec
MD5 eef1672e6f1a87f746ae8d09a8c69e4d
BLAKE2b-256 0191883c0b41e178145ed35fc82ae92149ac84425c8fb83054a660760d35c03a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.5-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 d658f6f68b3a098cd9ff5b5203816a21503b871b9935b757a55bb5e87992747d
MD5 59a2833c20707aae74f93281e0867c4f
BLAKE2b-256 26a2f6dc77e8012b2ac1e2dea1cbd3763698ef27a3be900e900d36970f217753

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.5-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 ff53c363d97696a3a601a1b3d04411d18d712a841e2a8f6b716568f8640ea279
MD5 091de79b5a00c44f6467842ebb67ac67
BLAKE2b-256 6a1213aa7dd5708e1e781143965ac710769ecd99940e63250430dc34c2ae0dfe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.5-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 06530f77af5b611c559788dc3845e95762f203b27b80397a6d06101c2d5d192f
MD5 e77ae14b84abd2b3d016d85f6aade3b5
BLAKE2b-256 199300bcc73ee87202ec153dcd1b42e4e9164ea6a7e2dff9d4fd080067dfd037

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.5-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 289e6626fd6f4ee8f26261d797f9525d5e28fc44793b92bcb4ddb74d1f7e9dc1
MD5 5fbc4f9617dc472d1f5cc64eccb3e000
BLAKE2b-256 d6abb196642224c76f0515d6a3a3b7c126eb2ced2656a28b51f742712862cccf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.5-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 aa496adc6b1c65c6ae0b71f9fd1b4efe44051d25ae8e93ec0dc010a0c8879447
MD5 b5a6da8c41e17301f2e64239336eb412
BLAKE2b-256 2868918778d878e2cb9efdc5dba596f3afa1c8fb74f4368ea23382f6f048c5b2

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