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

Uploaded CPython 3.8+Windows x86-64

pm_remez-0.2.3-cp38-abi3-win32.whl (560.6 kB view details)

Uploaded CPython 3.8+Windows x86

pm_remez-0.2.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (722.3 kB view details)

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

pm_remez-0.2.3-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (757.3 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ s390x

pm_remez-0.2.3-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (870.2 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ppc64le

pm_remez-0.2.3-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (720.4 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARMv7l

pm_remez-0.2.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (715.2 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.8+macOS 11.0+ ARM64

pm_remez-0.2.3-cp38-abi3-macosx_10_12_x86_64.whl (690.8 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for pm_remez-0.2.3.tar.gz
Algorithm Hash digest
SHA256 0e94113468a426f8fbb5295539a88a5122b464ebcdb1cfcb2967aaeae98dc26a
MD5 a4301aab177cce8fb76a824fdc694a5c
BLAKE2b-256 0e9a8b5741ce88ec8f2b3165c34cd0550e567178d7462d5f25db2bc252059ca8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pm_remez-0.2.3-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 567.1 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.3-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 fa21378fe7fc8619f909de8357223e51e5f267c50fb59bc516f746f1e29a43ce
MD5 0f5bbe1cf648a75ee31388f95e0e4574
BLAKE2b-256 d93f0ddc0fff0e29aade9d4bbfb0bad55d48a8e8c53fa60dfc7d68e60d0c273d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pm_remez-0.2.3-cp38-abi3-win32.whl
  • Upload date:
  • Size: 560.6 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.3-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 61a7b6b9aaa8382a52308423fe8dbe614555b53dfcc5a8001e9d4f9ac08b3013
MD5 aceee2ee8c7e358e0272654cbc747800
BLAKE2b-256 4160f9786b3bc740852ae50735e6b9956370cab926fb6b644d6c37cc8dad174b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.2.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a10eb3a205843e5d083cde5007b79407a5d3a5c3012564dfbf61ad70868ad306
MD5 98ac1cca528f6827eb275ee77c28f2cf
BLAKE2b-256 8b87a31d83b6980338488696b33183fa7d2b5c58bc353dfab1680a7bdad158cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.2.3-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 a06466a05aeb312fdd5c166dd4c84779f9324214191ea4854bcbf7bb66a75eac
MD5 0eeb7706be7bf9c90e6a38a3eff9b019
BLAKE2b-256 95f6888b3d600312707094972a20b4bcae2f4518fb58d08925dc06ae3bdfe974

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.2.3-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 b1572440ac477d77b3471327add8b9aa88e52f0178c4073420e03e479e3632ab
MD5 e076701b98a27d029b1ae42964430153
BLAKE2b-256 9a857104a3a5e0d44b564a36f8d1c6eb37e37ba62e563c9399b63f2b95760dc7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.2.3-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 b8771bd0a099d8546022dc80ee9281a1f7df1c7dfdfc152c24dcd0746e08f3d0
MD5 af2c30c22ad2e20938650b96cf6f43ba
BLAKE2b-256 f6a0f39f122e655951f9767ed24d4cb296b985c4437e3847c09b85136845aae5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.2.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e928ed77b0cf0b5c68feba5343f7c0647c81a017afbe56726b9fb5b284057326
MD5 7b3eeece21d306288d5e78bdfa47606a
BLAKE2b-256 727c04362a0a9ae34df5cfa82672187418a1b235dae9eb6f858edf9e98762fc2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.2.3-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0c322f6eaa1e3b96459450214224a4ff13b32e9687ba479638ecafa2c0af25e0
MD5 80b61332950fb66d6bea5d00460aba6f
BLAKE2b-256 30d7e953de513110deaf73a8fbb5173b23cce3b8783e43059ea1729b9b879dc1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pm_remez-0.2.3-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 55f76c2ebac05cedfe450e180ac929d6fbc4c2b08aa0d5e0bd46e23f48d64391
MD5 ed116555834928c7313bf3e8580f773a
BLAKE2b-256 3f219eb8f74baf861adb82ab2cb49f191c37e3437280b2c7f248fffad60dac83

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