Skip to main content
https://github.com/steven-murray/hankel/actions/workflows/test_suite.yaml/badge.svg https://codecov.io/gh/steven-murray/hankel/branch/master/graph/badge.svg?token=GQY2Glwr0U http://joss.theoj.org/papers/10.21105/joss.01397/status.svg https://img.shields.io/pypi/v/hankel.svg https://img.shields.io/badge/code%20style-black-000000.svg

Perform simple and accurate Hankel transformations using the method of Ogata 2005.

Hankel transforms and integrals are commonplace in any area in which Fourier Transforms are required over fields that are radially symmetric (see Wikipedia for a thorough description). They involve integrating an arbitrary function multiplied by a Bessel function of arbitrary order (of the first kind). Typical integration schemes often fail because of the highly oscillatory nature of the transform. Ogata’s quadrature method used in this package provides a fast and accurate way of performing the integration based on locating the zeros of the Bessel function.

Features

  • Accurate and fast solutions to many Hankel integrals

  • Easy to use and re-use

  • Arbitrary order transforms

  • Built-in support for radially symmetric Fourier Transforms

  • Thoroughly tested.

  • only Python 3 compatible.

Installation

Either clone the repository and install locally (best for developer installs):

$ git clone https://github.com/steven-murray/hankel.git
$ cd hankel/
$ pip install -U .

Or install from PyPI:

$ pip install hankel

Or install with conda:

$ conda install -c conda-forge hankel

The only dependencies are numpy, scipy and mpmath. These will be installed automatically if they are not already installed.

Dependencies required purely for development (testing and linting etc.) can be installed via the optional extra pip install hankel[dev]. If using conda, they can still be installed via pip: pip install -r requirements_dev.txt.

For instructions on testing hankel or any other development- or contribution-related issues, see the contributing guide.

Acknowledging

If you find hankel useful in your research, please cite

S. G. Murray and F. J. Poulin, “hankel: A Python library for performing simple and accurate Hankel transformations”, Journal of Open Source Software, 4(37), 1397, https://doi.org/10.21105/joss.01397

Also consider starring this repository!

References

Based on the algorithm provided in

H. Ogata, A Numerical Integration Formula Based on the Bessel Functions, Publications of the Research Institute for Mathematical Sciences, vol. 41, no. 4, pp. 949-970, 2005. DOI: 10.2977/prims/1145474602

Also draws inspiration from

Fast Edge-corrected Measurement of the Two-Point Correlation Function and the Power Spectrum Szapudi, Istvan; Pan, Jun; Prunet, Simon; Budavari, Tamas (2005) The Astrophysical Journal vol. 631 (1) DOI: 10.1086/496971

Release files for hankel 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hankel 1.2.2
File Size Uploaded
hankel-1.2.2.tar.gz 6.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for hankel 1.2.2
File Interpreter ABI Platform
hankel-1.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 6.5 MB

Release files / hankel-1.2.2.tar.gz

Download URL hankel-1.2.2.tar.gz
Size 6.5 MB
Tags Source
SHA-256 checksum
How to use checksums
ce1d1cd1f5a621a23c5fb49d66d67c10659e844b0c4191dbfdd0de6515766045
BLAKE2b-256 checksum
How to use checksums
c81e499e211d69eeb165677ecaf853daae7d38d0a29b0ce0c274e5d664516d7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / hankel-1.2.2-py3-none-any.whl

Download URL hankel-1.2.2-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f4d40e0f4ce01f1013288edeba542ac455bf07bf40a79ec6278b980bdc3efb2
BLAKE2b-256 checksum
How to use checksums
07a781c1fd58eb86c34c3c9613414f98080f8b5aaf575c7d7b463e59635e0631
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

1.2.2 This release

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.0

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

3 release files

0.3.0

3 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release 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