:py:mod:`profiley.helpers.hankel` ================================= .. py:module:: profiley.helpers.hankel .. autoapi-nested-parse:: 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 ~~~~~~~ .. autoapisummary:: profiley.helpers.hankel.HankelTransform profiley.helpers.hankel.SphericalHankelTransform .. py:class:: HankelTransform(nu=0, N=200, h=0.05) Bases: :py:obj:`object` The basis of the Hankel Transformation algorithm by Ogata 2005. This algorithm is used to solve the equation :math:`\int_0^\infty f(x) J_\nu(x) dx` where :math:`J_\nu(x)` is a Bessel function of the first kind of order :math:`nu`, and :math:`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 ---------- nu : int or 0.5, optional, default = 0 The order of the bessel function (of the first kind) J_nu(x) N : int, optional, default = 100 The number of nodes in the calculation. Generally this must increase for a smaller value of the step-size h. h : float, optional, default = 0.1 The step-size of the integration. .. py:method:: _psi(t) .. py:method:: _d_psi(t) .. py:method:: _weight() .. py:method:: _roots(N) .. py:method:: _j(x) .. py:method:: _j1(x) .. py:method:: _x(h) .. py:method:: _f(f, x) .. py:method:: transform(f, ret_err=True, ret_cumsum=False) Perform the transform of the function f Parameters ---------- f : callable A function of one variable, representing :math:`f(x)` ret_err : boolean, optional, default = True Whether to return the estimated error ret_cumsum : boolean, optional, default = False Whether to return the cumulative sum .. py:class:: SphericalHankelTransform(nu=0, *args, **kwargs) Bases: :py:obj:`HankelTransform` Perform spherical hankel transforms. Defined as :math:`\int_0^\infty f(x) j_\nu(x) dx` Note: Only does 0th-order transforms currently. .. py:method:: _f(f, x) .. py:method:: _roots(N)