Skip to main content

PyHank - Quasi-Discrete Hankel Transforms for Python

Edward Rogers

Documentation Status

Test Status

Coverage

PyPI version

Code style - flake 8

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 was designed for use primarily in cases where a discrete Hankel transform is required, similar to the FFT for a Fourier transform. It operates on functions stored in NumPy arrays. If you want an Hankel transform that operates on a callable function, you may be interested in hankel by Steven Murray.

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 a more advanced approach that speeds up computation significantly if making multiple transforms on the same grid.

Contributions and comments are welcome using Github at: http://github.com/etfrogers/pyhank

Installation

Installation can simply be done from pip. PyHank requires numpy and scipy, but these will be installed by pip if necessary.

pip install pyhank

For building the docs, the following are required:

  • sphinx-gallery >= 0.7
  • matplotlib >= 3.2

For development, and running the tests, the following are recommended:

  • pytest ~= 5.4.3
  • flake8 ~= 3.8.3
  • pytest-flake8 ~= 1.0.6
  • pytest-cov ~= 2.10.0

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-2.5.1.tar.gz (37.0 kB view details)

Uploaded Source

Built Distribution

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

pyhank-2.5.1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file pyhank-2.5.1.tar.gz.

File metadata

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

File hashes

Hashes for pyhank-2.5.1.tar.gz
Algorithm Hash digest
SHA256 6eb9616e65a536215917a7f05ff161b37fe080448a46c1bd97741384fabff37e
MD5 eb232c8996405efe6dbaecb35e54e9ad
BLAKE2b-256 a5b8ec9e1e2a705ef85494489b8e5b398d1d539872d0434b7af9464c04657e1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhank-2.5.1.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-2.5.1-py3-none-any.whl.

File metadata

  • Download URL: pyhank-2.5.1-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pyhank-2.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d744271684e348b4a51024c2e17c6f1b3dafbbe05d6b29d97e68b62a39388bed
MD5 32c4a9e12e4222ad1d34358c40da1b36
BLAKE2b-256 ca3ca3440fbc5cd34d19945cff5ea8dd00850d12f327c1ba7360b5c8d2d421e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhank-2.5.1-py3-none-any.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

2.5.1 This release

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