Skip to main content

pyhank - Quasi-discrete Hankel transforms for python

Project description

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

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

pyhank-2.4.0.tar.gz (32.6 kB view details)

Uploaded Source

Built Distribution

pyhank-2.4.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyhank-2.4.0.tar.gz
  • Upload date:
  • Size: 32.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.12

File hashes

Hashes for pyhank-2.4.0.tar.gz
Algorithm Hash digest
SHA256 19cb2fa6f146e1381b9254a3c3f35e7638950dd45adbb26eb7ca4af3fd8e696b
MD5 a4db0cbfc989acdca8acbb1ef086fb99
BLAKE2b-256 ec5faa4462a7e0e5c077570519fc1c42a9dab3e3ee9140c2bf223c1da75a6cd7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhank-2.4.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.12

File hashes

Hashes for pyhank-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cac223df99d99593e2186ff6896963249012a9795bc1f302e4988df3cdf121c
MD5 e53c688e239b136dc9548125ebb1da52
BLAKE2b-256 596d94064f43564fb6a232b173bb26308205680ca835b1f52bf7def38f23c004

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page