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.0.tar.gz (69.0 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.0-cp38-abi3-win_amd64.whl (570.8 kB view details)

Uploaded CPython 3.8+Windows x86-64

pm_remez-0.3.0-cp38-abi3-win32.whl (563.7 kB view details)

Uploaded CPython 3.8+Windows x86

pm_remez-0.3.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (725.4 kB view details)

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

pm_remez-0.3.0-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (756.8 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ s390x

pm_remez-0.3.0-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (865.4 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ppc64le

pm_remez-0.3.0-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (719.5 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARMv7l

pm_remez-0.3.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (716.5 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

pm_remez-0.3.0-cp38-abi3-macosx_11_0_arm64.whl (680.5 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

pm_remez-0.3.0-cp38-abi3-macosx_10_12_x86_64.whl (691.5 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for pm_remez-0.3.0.tar.gz
Algorithm Hash digest
SHA256 762748ebb54b5b46bd5b48247809c75dab214214808fcda97305fe8b785a29c0
MD5 c43d927f8d089e617854e6bcfa800bfa
BLAKE2b-256 77a7bab158d88f76916a4680a4184fb8f15b414a6b992aa11140b554f7878d1d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pm_remez-0.3.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 570.8 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.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 f374c05ebd040c9d0f806f8950eea04ded2b06127352e1c3f5837f91ec855297
MD5 544a7c1681dd6241562bc76cf56149b6
BLAKE2b-256 7b7c7fb225ce8d4a5573b6c262fb7f359075a46ba85a45f27b3a36804be0b581

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pm_remez-0.3.0-cp38-abi3-win32.whl
  • Upload date:
  • Size: 563.7 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.0-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 c7d8698946dd68aaa52af5f97f4b79df7c00ac2eebd6c40f3dd4d551556c3c48
MD5 4457342fb20fa1e054bd3266653a3f42
BLAKE2b-256 5261347e8be3af3be35faf429c1ad511c1f806d26e4c1565cb78b318d834f0d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a34f04abc32742262a6bea71bf8c78f011b43b30896d4a4ef2589b1a4c9de50d
MD5 91c3b68fd83278de5a0b9b443610c8f5
BLAKE2b-256 13c602467e868f980e14ac1c3fcc929e30657232d3c175f4bb421bea169dcb5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.0-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 85ba20e71c37cf777906840740654d4ef208f0fd987204f0b0bda8af10728ba3
MD5 f67a8e9651a1abe1b9ed3d62b28fa9b4
BLAKE2b-256 739a40ce47c2ece02eca686692938eb88ea79847c8015364f14d15fcf0b0cd50

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.0-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 06f8157a5e7f9fb945c925b8a0485d64c4de944eed6137315d96144be5506de9
MD5 749f7a280d011550bc0e55add7de844b
BLAKE2b-256 254ea28b180a6f2123e84bd1ed4014c998faa14fc11e5b430438c74db4087b5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.0-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 c4ca1f59a39191f652437a16875e3ba43469427afef42f01eba29ef0393446f9
MD5 07563d5dfb876c94ca928025d3a5a132
BLAKE2b-256 870d77224c9bdb6f6271888fa581633232a67ea782a2e9037c847edc42687b9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d84fcd6c8e6d621bac5fe886cf020b95e849c6685257e69ff334a781f00871e1
MD5 dc9cd98f6a85074b3e7b83432645308d
BLAKE2b-256 b34f40ac4e93be0deefbff484f44e52f90e73098f8cc0c1d8d78c842e43aee48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 86753284db8fc8a3d78fa3b43e055c1948ccc0d1123e67f7ebe1a8cc11a7f9f1
MD5 c74e985e8f265570c8cc570c1b7f71ab
BLAKE2b-256 2102631adb53896156b9491e9fca38cd97360337006972b558f45dbb526ff38f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.3.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 47f7f0c4cc265d8eb0d316883b85d5dd9e8c036165e92900161d02aec2966bb5
MD5 c083b4be5262f1266e194a316e9139e8
BLAKE2b-256 b654511f3bdbed9f8f2825371e05499d41cb8b1cc9ea4bc893255d2a48ebefa9

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