profiley.helpers.hankel
General quadrature method for Hankel transformations. 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.
Module Contents
Classes
The basis of the Hankel Transformation algorithm by Ogata 2005. |
|
Perform spherical hankel transforms. |
- class profiley.helpers.hankel.HankelTransform(nu=0, N=200, h=0.05)
Bases:
objectThe basis of the Hankel Transformation algorithm by Ogata 2005.
This algorithm is used to solve the equation \(\int_0^\infty f(x) J_\nu(x) dx\) where \(J_\nu(x)\) is a Bessel function of the first kind of order \(nu\), and \(f(x)\) is an arbitrary (slowly-decaying) function.
The algorithm is presented 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.
Parameters
- nuint or 0.5, optional, default = 0
The order of the bessel function (of the first kind) J_nu(x)
- Nint, optional, default = 100
The number of nodes in the calculation. Generally this must increase for a smaller value of the step-size h.
- hfloat, optional, default = 0.1
The step-size of the integration.
- _psi(t)
- _d_psi(t)
- _weight()
- _roots(N)
- _j(x)
- _j1(x)
- _x(h)
- _f(f, x)
- transform(f, ret_err=True, ret_cumsum=False)
Perform the transform of the function f
Parameters
- fcallable
A function of one variable, representing \(f(x)\)
- ret_errboolean, optional, default = True
Whether to return the estimated error
- ret_cumsumboolean, optional, default = False
Whether to return the cumulative sum
- class profiley.helpers.hankel.SphericalHankelTransform(nu=0, *args, **kwargs)
Bases:
HankelTransformPerform spherical hankel transforms.
Defined as \(\int_0^\infty f(x) j_\nu(x) dx\)
Note: Only does 0th-order transforms currently.
- _f(f, x)
- _roots(N)