Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

PyHank - Quasi-Discrete Hankel Transforms for Python

Edward Rogers

Documentation Status CI Coverage PyPI version Ruff

PyHank is a python implementation of the quasi-discrete Hankel transform as developed by Manuel Guizar-Sicairos and Julio C. Guitierrez-Vega:

"Computation of quasi-discrete Hankel transforms of the integer order for propagating optical wave fields" Manuel Guizar-Sicairos and Julio C. Guitierrez-Vega J. Opt. Soc. Am. A 21 (1) 53-58 (2004)

It operates on functions stored in NumPy arrays. If you want a Hankel transform that operates on a callable function, you may be interested in hankel by Steven Murray.

PyHank 3.0 includes a high-performance compiled Rust backend (powered by hankrs), delivering 10x–50x speedups for transform setup and computation across multi-dimensional arrays, with automatic fallback to pure Python where a compiler is unavailable.

I have used this code extensively for beam-propagation-method calculations of radially-symmetric beams. In the radially symmetric case, the 2D FFT over x and y that would be used in a non-symmetric system is replaced by a 1D QDHT over r, making the computational load much lighter and allowing bigger simulations.

PyHank was inspired by Adam Wyatt's Matlab version which I used for many years, before moving to Python and needing my own implementation. It aims to simplify the interface (using Python's object-oriented approach) and utilise existing NumPy/SciPy functions wherever possible.

It has both a simple single-shot interface, and an object-oriented approach that precomputes transform matrices to speed up computation significantly when making multiple transforms on the same grid.

Contributions and comments are welcome using GitHub at: https://github.com/etfrogers/pyhank

Installation

Pre-compiled binary wheels (with compiled native Rust acceleration) are provided on PyPI for 64-bit Linux, macOS (Apple Silicon and Intel), and 64-bit Windows:

pip install pyhank

For development and running tests:

pip install -e .[dev]

For building documentation:

pip install -e .[docs]

Bugs & Contribution

Please use Github to report bugs, feature requests and submit your code: http://github.com/etfrogers/pyhank

Documentation

The documentation for PyHank can be found at Read the docs

Usage

See the Usage examples at ReadTheDocs

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyhank-3.0.0rc1.tar.gz (49.4 kB view details)

Uploaded Source

Built Distributions

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

pyhank-3.0.0rc1-cp313-cp313-win_amd64.whl (415.1 kB view details)

Uploaded CPython 3.13Windows x86-64

pyhank-3.0.0rc1-cp313-cp313-manylinux_2_28_x86_64.whl (553.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

pyhank-3.0.0rc1-cp313-cp313-macosx_11_0_arm64.whl (456.4 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pyhank-3.0.0rc1-cp313-cp313-macosx_10_13_x86_64.whl (512.7 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

pyhank-3.0.0rc1-cp312-cp312-win_amd64.whl (415.1 kB view details)

Uploaded CPython 3.12Windows x86-64

pyhank-3.0.0rc1-cp312-cp312-manylinux_2_28_x86_64.whl (553.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pyhank-3.0.0rc1-cp312-cp312-macosx_11_0_arm64.whl (456.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pyhank-3.0.0rc1-cp312-cp312-macosx_10_13_x86_64.whl (512.7 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

pyhank-3.0.0rc1-cp311-cp311-win_amd64.whl (411.4 kB view details)

Uploaded CPython 3.11Windows x86-64

pyhank-3.0.0rc1-cp311-cp311-manylinux_2_28_x86_64.whl (549.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

pyhank-3.0.0rc1-cp311-cp311-macosx_11_0_arm64.whl (458.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pyhank-3.0.0rc1-cp311-cp311-macosx_10_12_x86_64.whl (512.1 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

pyhank-3.0.0rc1-cp310-cp310-win_amd64.whl (412.1 kB view details)

Uploaded CPython 3.10Windows x86-64

pyhank-3.0.0rc1-cp310-cp310-manylinux_2_28_x86_64.whl (550.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

pyhank-3.0.0rc1-cp310-cp310-macosx_11_0_arm64.whl (458.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

pyhank-3.0.0rc1-cp310-cp310-macosx_10_12_x86_64.whl (512.3 kB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

Details for the file pyhank-3.0.0rc1.tar.gz.

File metadata

  • Download URL: pyhank-3.0.0rc1.tar.gz
  • Upload date:
  • Size: 49.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pyhank-3.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 4d1cdc4ed03e03f33c5d82057e73611da5cd01bc10578aa2c98b2c24f25936bb
MD5 5c61534062dda1c33ccee9ac457c7fee
BLAKE2b-256 a2592a23ac265c8e44808bcf4e5db1bfe1025d0ce334c4e2315a42248547cb84

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhank-3.0.0rc1.tar.gz:

Publisher: ci.yml on etfrogers/pyhank

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

File details

Details for the file pyhank-3.0.0rc1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pyhank-3.0.0rc1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 415.1 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pyhank-3.0.0rc1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 1f5a8696899fb54e76a248a4db2b076e4420b6a574a5848be339fd3dd9a163aa
MD5 372db800d56ab80cdb3ca1bb08bb357a
BLAKE2b-256 03350f2e7e43a81c78fe906624089410dc228049c98696b16ee670e0a15c7cb7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhank-3.0.0rc1-cp313-cp313-win_amd64.whl:

Publisher: ci.yml on etfrogers/pyhank

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

File details

Details for the file pyhank-3.0.0rc1-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyhank-3.0.0rc1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ef2c4b807d3b117b2389cb632c046d733fe10fe3ac3366d040fccc1e1a6037e9
MD5 c8bcacde120f0e30f54726a96e7124f5
BLAKE2b-256 d81835b5636abda16284bec288c6c6b07146444e84efbc5acd1741c29869fbf9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhank-3.0.0rc1-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: ci.yml on etfrogers/pyhank

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

File details

Details for the file pyhank-3.0.0rc1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyhank-3.0.0rc1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c7eee10c8dd755995a7f3e93e015d96810b89c73a0ec76d1e79fd1cac2697b07
MD5 510d4a1042cae6fa3aef307e2c8d3392
BLAKE2b-256 c507c4e953f6ecd5ba73be1f300276ec55cf71030bb5fd57deb4644f81c6d320

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhank-3.0.0rc1-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: ci.yml on etfrogers/pyhank

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

File details

Details for the file pyhank-3.0.0rc1-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for pyhank-3.0.0rc1-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 1304a0b38a6af866284044a72dcb1bcb7ce34ae51c5ed95e56c8c783b8c3622b
MD5 962d6f8f611ff8f4a20914495d509f05
BLAKE2b-256 ce3816a7c9c44a4d7aef3534e8b8e122ede68eb45e6932c47c8e3cd130e4c7b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhank-3.0.0rc1-cp313-cp313-macosx_10_13_x86_64.whl:

Publisher: ci.yml on etfrogers/pyhank

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

File details

Details for the file pyhank-3.0.0rc1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pyhank-3.0.0rc1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 415.1 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pyhank-3.0.0rc1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 649a707edc9ef2e13d268f8558e3be582e0dadb3febdf081f4a17016a1e3b2dc
MD5 aff10bf3d79e4ec3168a0e5755864603
BLAKE2b-256 663f49bcbc082bbddd082551de2497581dc7065db4cd208be8515bdddff8ea7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhank-3.0.0rc1-cp312-cp312-win_amd64.whl:

Publisher: ci.yml on etfrogers/pyhank

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

File details

Details for the file pyhank-3.0.0rc1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyhank-3.0.0rc1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c4f0cb5cab5537d77dca29886d955f62605b4eb6824344220d6f84e9b5ff8bb7
MD5 4bad0eadeb9ad238cec6435ac86d5d75
BLAKE2b-256 8c8b996fc51dce5d1e19bcda4b27046dd1571b6573b1e9f6cf2bfadff2e2f3f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhank-3.0.0rc1-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: ci.yml on etfrogers/pyhank

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

File details

Details for the file pyhank-3.0.0rc1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyhank-3.0.0rc1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6d3439488cfee203ff84d9fd7f529080bc2fb72ae9a876aec2a9969598974954
MD5 05b51983dccf9a2dd0cb5af54c9a9a3e
BLAKE2b-256 2f6793d94bd99059f723ccd8fbdb9a09cc3611c794696a1eaf1c77ac0aaa0f9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhank-3.0.0rc1-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: ci.yml on etfrogers/pyhank

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

File details

Details for the file pyhank-3.0.0rc1-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for pyhank-3.0.0rc1-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 d79c541bf9f09a0830808db43d12f4674bb837fb9bcff23bd4c3cf9e54519d59
MD5 c0cc7ed24a94a49e7ef0f98868b1d238
BLAKE2b-256 6491daff3f83390797549297a0990c97b0bc58b91489fd67b95836c57b013f5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhank-3.0.0rc1-cp312-cp312-macosx_10_13_x86_64.whl:

Publisher: ci.yml on etfrogers/pyhank

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

File details

Details for the file pyhank-3.0.0rc1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pyhank-3.0.0rc1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 411.4 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pyhank-3.0.0rc1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 cfeb51c6c9a31b4f03f19b6e0fc58e9fa2bb368210db63076bc659326d2ef74c
MD5 81e67c61d14981d625858ceaf17764dd
BLAKE2b-256 2c892329a94d8ad0e6f8862a14fdd88da3db1c62da8e64489d398b267713dd6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhank-3.0.0rc1-cp311-cp311-win_amd64.whl:

Publisher: ci.yml on etfrogers/pyhank

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

File details

Details for the file pyhank-3.0.0rc1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyhank-3.0.0rc1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8dda27c4e7bd369e05e89775e9504fe464304d42a326bc56e955b9609c175dad
MD5 013729b904b635bf1f6ce80bbab75bb0
BLAKE2b-256 a5be2a72b03dcc14d32b6cf10ba027ff5c2b75b60efae03f9878b77de07a7672

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhank-3.0.0rc1-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: ci.yml on etfrogers/pyhank

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

File details

Details for the file pyhank-3.0.0rc1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyhank-3.0.0rc1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b5dc1863702e2109820d2969216341f6ae6cbee77f1537b3a5628ac3ca5c8a87
MD5 8e7d2005a8ffc5a1776a3f7732629902
BLAKE2b-256 0be22b6ec84dff3a4a7d8ce4e127618b0f78d7d669f1cd516be4f9f693940c8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhank-3.0.0rc1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: ci.yml on etfrogers/pyhank

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

File details

Details for the file pyhank-3.0.0rc1-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pyhank-3.0.0rc1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9dbb08d8d9f80501499f96b8d27bde21e72e7982021669ca8e94cc399683cdba
MD5 8d65533f465ef16aed37fd1884ced6de
BLAKE2b-256 c83edf820fdafb4de7b8cb200e5dd2916ad85f47e6314c293ff84b550a934c20

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhank-3.0.0rc1-cp311-cp311-macosx_10_12_x86_64.whl:

Publisher: ci.yml on etfrogers/pyhank

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

File details

Details for the file pyhank-3.0.0rc1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pyhank-3.0.0rc1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 412.1 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pyhank-3.0.0rc1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 deeb3a4ce41061da1014cb9a9d9f316d1c03832918970b26d20bb9f0bc713a65
MD5 4b29e6bd9e7d57c1654d26f0bf533c78
BLAKE2b-256 2bef1851eb0be808f91ccb47adf72f8602c81f527a692489c2760331eca1abc6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhank-3.0.0rc1-cp310-cp310-win_amd64.whl:

Publisher: ci.yml on etfrogers/pyhank

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

File details

Details for the file pyhank-3.0.0rc1-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyhank-3.0.0rc1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dcda10c5e24abcc338183715695d4ab5a29b5025f7c19ab18c9503b30b083168
MD5 fef7c4d1ca3d86c3ef4118c6e69e3d00
BLAKE2b-256 887112ba2dd290d30e14f28764f2408b1c01322dfefece945dd3f6def42c0cd6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhank-3.0.0rc1-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: ci.yml on etfrogers/pyhank

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

File details

Details for the file pyhank-3.0.0rc1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyhank-3.0.0rc1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8d2ed089d2c234c137d29ebdc8e35f841d1b27a73e95ffd68e01b675cd07c4d0
MD5 e9cd73430530adcd356a587797d57c18
BLAKE2b-256 ba5b5a789025060f2ffbf165edb4b0788d6e0c89466d867a96c754174a9c514d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhank-3.0.0rc1-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: ci.yml on etfrogers/pyhank

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

File details

Details for the file pyhank-3.0.0rc1-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pyhank-3.0.0rc1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a56d9164eb6e6bc8cd279810a80a663fd2bcc0af00471cb20b1fd456c668cc5b
MD5 8058af995fc428edba1a2ac1fc5a32da
BLAKE2b-256 090d8e8e19c5d949f854c93baf5a6195fa58054c5ba7c295b5d67a5a02081a9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhank-3.0.0rc1-cp310-cp310-macosx_10_12_x86_64.whl:

Publisher: ci.yml on etfrogers/pyhank

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

Release history Release notifications | RSS feed

This release

3.0.0rc1 This release

17 files

2.5.1

2 files

2.5.0

2 files

2.4.0

2 files

2.3.0

2 files

2.2.1

2 files

2.2.0

1 file

2.1.0

1 file

2.0.0

1 file

1.2.0

1 file

1.1.0

1 file

1.0.0

2 files

0.2.0

1 file

0.1.2

1 file

0.1.0

2 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