Skip to main content

A Python binding for the eFFT library

Project description

We introduce eFFT, an efficient method for the calculation of the exact Fourier transform of an asynchronous event stream. It is based on keeping the matrices involved in the Radix-2 FFT algorithm in a tree data structure and updating them with the new events, extensively reusing computations, and avoiding unnecessary calculations while preserving exactness. eFFT can operate event-by-event, requiring for each event only a partial recalculation of the tree since most of the stored data are reused. It can also operate with event packets, using the tree structure to detect and avoid unnecessary and repeated calculations when integrating the different events within each packet to further reduce the number of operations.

⚙️ Installation

eFFT is provided as a header-only file for easy integration and relies solely on C++ standard and Eigen3 libraries.

Note: FFTW3 served as the benchmark for testing and evaluation. To enable it, define EFFT_USE_FFTW3 during compilation (e.g., -DEFFT_USE_FFTW3).

📦 Dependencies

For C++ usage, the following dependencies are required:

  • C++ compiler with C++17
  • CMake ≥ 3.20.0
  • Eigen ≥ 3.4.0
  • FFTW3 ≥ 3.3.8 (optional; see EFFT_USE_FFTW3)
  • (dev-only) GTest, Google Benchmark

For Python usage, dependencies are defined in python/pyproject.toml and the build dependencies are fetchable via python/CMakeLists.txt.

🖥️ Usage

Here's a minimal working example:

eFFT<128> efft;           // Instance
efft.initialize();        // Initialization

Stimulus e(1, 1, true);   // Event insertion
efft.update(e);           // Insert event

efft.getFFT();            // Get result as Eigen matrix

And another example handling event packets:

eFFT<128> efft;                   // Instance
efft.initialize();                // Initialization

Stimuli events;
events.emplace_back(1, 1, true);  // Insert event
events.emplace_back(2, 2, true);  // Insert event
events.emplace_back(3, 3, false); // Extract event
efft.update(events);              // Insert event

efft.getFFT();                    // Get result as Eigen matrix

Please refer to the official documentation for more details.

🐍 Python Bindings

The eFFT library also provides Python bindings for seamless integration into Python-based workflows. These bindings are built using nanobind and offer the same functionality as the C++ library. You can build and install the bindings using the following commands:

cd python
pip install .

However, you can also use PyPI to install the package directly:

pip install efft

Here's an example of how to use the Python bindings:

from efft import Stimulus, Stimuli, eFFT

efft = eFFT(128)                  # Create an eFFT instance with a frame size of 128
efft.initialize()

event = Stimulus(1, 1, True)      # Insert a single event
efft.update(event)

fft_result = efft.get_fft()       # Retrieve the FFT result

events = Stimuli()                # Insert multiple events
events.append(Stimulus(2, 2, True))
events.append(Stimulus(3, 3, False))
efft.update(events)

fft_result = efft.get_fft()       # Retrieve the updated FFT result

📜 Citation

If you use this work in an academic context, please cite the following publication:

R. Tapia, J.R. Martínez-de Dios, A. Ollero eFFT: An Event-based Method for the Efficient Computation of Exact Fourier Transforms, IEEE Transactions on Pattern Analysis and Machine Intelligence, 2024.

@article{tapia2024efft,
  author={Tapia, R. and Martínez-de Dios, J.R. and Ollero, A.},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
  title={{eFFT}: An Event-based Method for the Efficient Computation of Exact {Fourier} Transforms},
  year={2024},
  volume={46},
  number={12},
  pages={9630-9647},
  doi={10.1109/TPAMI.2024.3422209}
}

📝 License

Distributed under the GPLv3 License. See LICENSE for more information.

📬 Contact

Raul Tapia - raultapia@us.es

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

efft-1.0.5.tar.gz (22.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

efft-1.0.5-cp312-cp312-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.12Windows x86-64

efft-1.0.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

efft-1.0.5-cp312-cp312-macosx_10_13_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

efft-1.0.5-cp311-cp311-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.11Windows x86-64

efft-1.0.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

efft-1.0.5-cp311-cp311-macosx_10_13_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.11macOS 10.13+ x86-64

efft-1.0.5-cp310-cp310-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.10Windows x86-64

efft-1.0.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

efft-1.0.5-cp310-cp310-macosx_10_13_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.10macOS 10.13+ x86-64

efft-1.0.5-cp39-cp39-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.9Windows x86-64

efft-1.0.5-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

efft-1.0.5-cp39-cp39-macosx_10_13_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.9macOS 10.13+ x86-64

efft-1.0.5-cp38-cp38-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.8Windows x86-64

efft-1.0.5-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

efft-1.0.5-cp38-cp38-macosx_10_13_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.8macOS 10.13+ x86-64

File details

Details for the file efft-1.0.5.tar.gz.

File metadata

  • Download URL: efft-1.0.5.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for efft-1.0.5.tar.gz
Algorithm Hash digest
SHA256 98a2071e3060954859c3bc791f5c210fd2c5fb5df0dd25c298cf477994739379
MD5 aaf8337c404e67b1b818c75196c57f78
BLAKE2b-256 0ef348b78958fef676eff426d986db9b2719b74ead673e22d2baf2bc8629ade2

See more details on using hashes here.

Provenance

The following attestation bundles were made for efft-1.0.5.tar.gz:

Publisher: cd.yaml on raultapia/efft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efft-1.0.5-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: efft-1.0.5-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for efft-1.0.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 866ff59d246ecff38290ff33bfa25ae4af48264dee15f3e5bb682021546533ab
MD5 9e1b099c1c1e35f91388a1d23b01197c
BLAKE2b-256 d071bfbb90417cf877e60405a9b4f47e853ea5569d32cd122627fd95e932aa0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for efft-1.0.5-cp312-cp312-win_amd64.whl:

Publisher: cd.yaml on raultapia/efft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efft-1.0.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for efft-1.0.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 03c6a20da855d704bcb3e909f03c34db1e11db6bb0a1e36855bd903cfe8843c9
MD5 bd34a5c955a8385f7e75a89750705a27
BLAKE2b-256 11725283446b3ff7e2b2f76db7be02d7983d07de5b8f1641a3bfb13a28eda43e

See more details on using hashes here.

Provenance

The following attestation bundles were made for efft-1.0.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: cd.yaml on raultapia/efft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efft-1.0.5-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for efft-1.0.5-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 181e98bb853f74151e58af24dcf2020713e41aef878ef7402bf926a44e6a98d1
MD5 3a0f31f3fa63750d0e5ebf38cc1f469c
BLAKE2b-256 d949e37cbe2b98de1c577c6e86268e4887ff8738c3a4bf67221353f9126a66cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for efft-1.0.5-cp312-cp312-macosx_10_13_x86_64.whl:

Publisher: cd.yaml on raultapia/efft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efft-1.0.5-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: efft-1.0.5-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for efft-1.0.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c0cffbb698ad2f6e319d26561436fd2c96a0ddbed5768fb4757ac4a4b6cccc5b
MD5 e714a937054bac804048222321a69bdc
BLAKE2b-256 a6b78e878866510c4d09ab0da7891cb53272f6d2ca3c8981f3f5aed0d9f7ac61

See more details on using hashes here.

Provenance

The following attestation bundles were made for efft-1.0.5-cp311-cp311-win_amd64.whl:

Publisher: cd.yaml on raultapia/efft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efft-1.0.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for efft-1.0.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 05767277426d171a14baa0dac61932a746eb3c3b147efe4b7569c47d8240ba4b
MD5 4ababb2765f0c4caabefc7505bbbbda5
BLAKE2b-256 8978497f11672685f3b25a9f81c1c05818f9305247f35f99b278aae2d1f4c928

See more details on using hashes here.

Provenance

The following attestation bundles were made for efft-1.0.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: cd.yaml on raultapia/efft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efft-1.0.5-cp311-cp311-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for efft-1.0.5-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 7d94fbb3e9935d521d3dd98efaa5d0302616d042bddf7ce493865a261b60ec66
MD5 cefcffdbd26e16297f02d8caf016c6a7
BLAKE2b-256 6a8abb3f86ee2c0da98d646110e2233b06815ddba4f740432af2b04f49d4eda7

See more details on using hashes here.

Provenance

The following attestation bundles were made for efft-1.0.5-cp311-cp311-macosx_10_13_x86_64.whl:

Publisher: cd.yaml on raultapia/efft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efft-1.0.5-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: efft-1.0.5-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for efft-1.0.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9bde0037cfb3ddba3eb7e5e82b7af98bba33cf3ba57fc4f8c5cc9a08b997c96e
MD5 527b4afac0ec1a855f72c4c1e2bc063d
BLAKE2b-256 dceefec13226ca766898c7aedbba97d6bae420c37a7f3fa724056e97afb89fd3

See more details on using hashes here.

Provenance

The following attestation bundles were made for efft-1.0.5-cp310-cp310-win_amd64.whl:

Publisher: cd.yaml on raultapia/efft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efft-1.0.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for efft-1.0.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c32e341add0ec2106ff6355d662570dab38c60a49caf4174216eacd6c3c47d0f
MD5 cafd912bf94d2fcb604adde799c711f6
BLAKE2b-256 aefd9661b700f3df2a3aab845e04b239d04ed75804b2cd258715b5c415817a79

See more details on using hashes here.

Provenance

The following attestation bundles were made for efft-1.0.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: cd.yaml on raultapia/efft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efft-1.0.5-cp310-cp310-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for efft-1.0.5-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 4a4f65cb63b3617ff747cbd6bc5f9daf3e6e1a4fc04c5743422c0159afce722c
MD5 2e7aeefd1561a3e542c25299c8487665
BLAKE2b-256 169168a93fef2341f01af3ebd12356b94781c82965ea714d97fa32812a658e59

See more details on using hashes here.

Provenance

The following attestation bundles were made for efft-1.0.5-cp310-cp310-macosx_10_13_x86_64.whl:

Publisher: cd.yaml on raultapia/efft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efft-1.0.5-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: efft-1.0.5-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for efft-1.0.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 42e9513b7bec1421a593e7704bd2df19f62c056071e360baf180279ba38dc0de
MD5 797f40ddeedc54a33e2d8e724c699b1c
BLAKE2b-256 ea03e6d629bf6466aa0e989519db1e92b0fb5f046c96323c5fca5ab95458dfc3

See more details on using hashes here.

Provenance

The following attestation bundles were made for efft-1.0.5-cp39-cp39-win_amd64.whl:

Publisher: cd.yaml on raultapia/efft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efft-1.0.5-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for efft-1.0.5-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 71fa089054450895eaf6f63ab590b2dd00c3ac28aacef87c48d63323e80e8b15
MD5 e240293b347c9542612c9d592bdeb248
BLAKE2b-256 38d5a8b7a73b6ad03df402ba674b34b1ee53fead84804a83f286a92347208764

See more details on using hashes here.

Provenance

The following attestation bundles were made for efft-1.0.5-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: cd.yaml on raultapia/efft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efft-1.0.5-cp39-cp39-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for efft-1.0.5-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 cf7affd7aa84a61923c784d63c97b24be73b0358456ad9e3ffe5b029a3ea681c
MD5 da60afb8e5ac38f632b56e192e08a9a1
BLAKE2b-256 a9f2a59a266f824e7bc21765cffdcad23acc2be21f70b6970965ece7e77382b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for efft-1.0.5-cp39-cp39-macosx_10_13_x86_64.whl:

Publisher: cd.yaml on raultapia/efft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efft-1.0.5-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: efft-1.0.5-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for efft-1.0.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 3804c9bd812533787cfed29aeb3958ae8fd76da76d1b73d371c55928a64c081a
MD5 c346ce69b7154cf4173260a1f035367f
BLAKE2b-256 578bfa2505be72fb975e7bf8e7e9277a3a4e795592c1deee475df55f09d753f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for efft-1.0.5-cp38-cp38-win_amd64.whl:

Publisher: cd.yaml on raultapia/efft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efft-1.0.5-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for efft-1.0.5-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 18480d0c9315ddef40b899a3fbbbe4267a2a969d5e545a1abb4b2572e59c5f15
MD5 a7c0524c57c0ae8a1dc52015d27d84ba
BLAKE2b-256 bfa84a0f736ba08fb48adbb0a75dff866a966048dd5a41716deed7d9529938d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for efft-1.0.5-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: cd.yaml on raultapia/efft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file efft-1.0.5-cp38-cp38-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for efft-1.0.5-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 8f4909e5d195a52a49b4f02e90e9855d096b4d303df13a7011e6e227f2ac2615
MD5 a969ec8c09942aa109881e70bcd807c4
BLAKE2b-256 7f159d21a3b3ceee5771e893c4afd6dd779cee66a9f9025f25ebee728eade5e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for efft-1.0.5-cp38-cp38-macosx_10_13_x86_64.whl:

Publisher: cd.yaml on raultapia/efft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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