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.

Metadata

Release files for pm-remez 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pm-remez 0.3.5
File Size Uploaded
pm_remez-0.3.5.tar.gz 66.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pm-remez 0.3.5
File
pm_remez-0.3.5-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details
pm_remez-0.3.5-cp38-abi3-win32.whl CPython 3.8 abi3 Windows x86-32 Details
pm_remez-0.3.5-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 abi3 Linux glibc 2.17+ x86-64 Details
pm_remez-0.3.5-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl CPython 3.8 abi3 Linux glibc 2.17+ IBM System/390x Details
pm_remez-0.3.5-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl CPython 3.8 abi3 Linux glibc 2.17+ PowerPC 64-le Details
pm_remez-0.3.5-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl CPython 3.8 abi3 Linux glibc 2.17+ ARMv7l Details
pm_remez-0.3.5-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.8 abi3 Linux glibc 2.17+ ARM64 Details
pm_remez-0.3.5-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details
pm_remez-0.3.5-cp38-abi3-macosx_10_12_x86_64.whl CPython 3.8 abi3 macOS 10.12+ x86-64 Details

Total release size: 6.3 MB

Release files / pm_remez-0.3.5.tar.gz

Download URL pm_remez-0.3.5.tar.gz
Size 66.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bd5f25435b7f6ab3fa82ef9477867048ab67e6203af66fc22147c4cfe61e586b
BLAKE2b-256 checksum
How to use checksums
aa66e62fa6f3a1347fdc88a6b389628214e3e86eb97e7d21aca9b4f01fbeb8f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / pm_remez-0.3.5-cp38-abi3-win_amd64.whl

Download URL pm_remez-0.3.5-cp38-abi3-win_amd64.whl
Size 568.4 kB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
4008787dc4de2a18e5fbb247458e8ac5c3975fd35546420ab72b8af91b4a3f7b
BLAKE2b-256 checksum
How to use checksums
4544cd9b428ccd06f91104813ef31173d308fbb1016993ff6fe31969430f597f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / pm_remez-0.3.5-cp38-abi3-win32.whl

Download URL pm_remez-0.3.5-cp38-abi3-win32.whl
Size 560.1 kB
Tags CPython 3.8 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
1d8d494baa6df3d9ae88f9dbac68ac7c5d60052dde5fbfb1faf6f9d521ea08ac
BLAKE2b-256 checksum
How to use checksums
4a6a35379f30b716998265fae0767f50a248962a82659ff62b8f1120b041933d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / pm_remez-0.3.5-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pm_remez-0.3.5-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 717.2 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
9916236dd89feaea3ebb8eb02f2ab8fbecb7bd43cf0fccfcbdf8a01cf2590916
BLAKE2b-256 checksum
How to use checksums
bc9ee0510d15a49a0bd663a384bd72e6d6034fc20d49bbadb4a91a062c95b749
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / pm_remez-0.3.5-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl

Download URL pm_remez-0.3.5-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Size 749.8 kB
Tags CPython 3.8 Linux glibc 2.17+ IBM System/390x abi3
SHA-256 checksum
How to use checksums
bdf2918b983d134f169e5cb8f299318c1a44de527b47e137ad536d2e584e38ec
BLAKE2b-256 checksum
How to use checksums
0191883c0b41e178145ed35fc82ae92149ac84425c8fb83054a660760d35c03a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / pm_remez-0.3.5-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl

Download URL pm_remez-0.3.5-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Size 861.9 kB
Tags CPython 3.8 Linux glibc 2.17+ PowerPC 64-le abi3
SHA-256 checksum
How to use checksums
d658f6f68b3a098cd9ff5b5203816a21503b871b9935b757a55bb5e87992747d
BLAKE2b-256 checksum
How to use checksums
26a2f6dc77e8012b2ac1e2dea1cbd3763698ef27a3be900e900d36970f217753
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / pm_remez-0.3.5-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl

Download URL pm_remez-0.3.5-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Size 716.2 kB
Tags CPython 3.8 Linux glibc 2.17+ ARMv7l abi3
SHA-256 checksum
How to use checksums
ff53c363d97696a3a601a1b3d04411d18d712a841e2a8f6b716568f8640ea279
BLAKE2b-256 checksum
How to use checksums
6a1213aa7dd5708e1e781143965ac710769ecd99940e63250430dc34c2ae0dfe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / pm_remez-0.3.5-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL pm_remez-0.3.5-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 713.9 kB
Tags CPython 3.8 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
06530f77af5b611c559788dc3845e95762f203b27b80397a6d06101c2d5d192f
BLAKE2b-256 checksum
How to use checksums
199300bcc73ee87202ec153dcd1b42e4e9164ea6a7e2dff9d4fd080067dfd037
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / pm_remez-0.3.5-cp38-abi3-macosx_11_0_arm64.whl

Download URL pm_remez-0.3.5-cp38-abi3-macosx_11_0_arm64.whl
Size 679.1 kB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
289e6626fd6f4ee8f26261d797f9525d5e28fc44793b92bcb4ddb74d1f7e9dc1
BLAKE2b-256 checksum
How to use checksums
d6abb196642224c76f0515d6a3a3b7c126eb2ced2656a28b51f742712862cccf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / pm_remez-0.3.5-cp38-abi3-macosx_10_12_x86_64.whl

Download URL pm_remez-0.3.5-cp38-abi3-macosx_10_12_x86_64.whl
Size 681.6 kB
Tags CPython 3.8 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
aa496adc6b1c65c6ae0b71f9fd1b4efe44051d25ae8e93ec0dc010a0c8879447
BLAKE2b-256 checksum
How to use checksums
2868918778d878e2cb9efdc5dba596f3afa1c8fb74f4368ea23382f6f048c5b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release history Release notifications | RSS feed

This release

0.3.5 This release

10 release files

0.3.4

10 release files

0.3.2

10 release files

0.2.4

10 release files

0.2.3

10 release files

0.2.0

10 release files

0.1.8

10 release files

0.1.7

4 release files

0.1.6

5 release files

0.1.5

5 release files

0.1.4

5 release files

0.1.3

5 release files

0.1.2

5 release files

0.1.1

5 release files

0.1.0

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page