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.0.tar.gz (37.3 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.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyhank-2.5.0.tar.gz
  • Upload date:
  • Size: 37.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.14

File hashes

Hashes for pyhank-2.5.0.tar.gz
Algorithm Hash digest
SHA256 b3fa72af5028fdd94e56dead2da1c736bcbbea4c3e22236b2eca888d317405a3
MD5 98d872e81211aeffadc9f283fc0c75ea
BLAKE2b-256 7fad541def9daf828eda3099d95a59e96f47888143a132a4ff1608c86c396f28

See more details on using hashes here.

File details

Details for the file pyhank-2.5.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for pyhank-2.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c78f2371a2f69a188b65df23fa304a59cf7f2b607c5755492cd45469055ee9b
MD5 64b0b6bfe54fd369b5bef66089accf7d
BLAKE2b-256 a1fe763b675aa96f719c6fb639e1d2df8a6411605f9890d5627509479986e822

See more details on using hashes here.

Release history Release notifications | RSS feed

2.5.1

2 files

This release

2.5.0 This release

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