IMLCV.tools.spherical_bessel#

Attributes#

Functions#

jint(n)

spb1(→ jax._src.typing.Array)

Calculate the spherical Bessel functions j_1(z).

_spb1_maclaurin(k, x)

_spb1_maclaurin_jvp(k, primals, tangents)

envj(n, x)

Helper function for msta1 and msta2.

msta1(x, mp)

Calculate the number of terms required for the spherical Bessel function.

msta2(x, n, mp)

Calculate the number of terms required for the spherical Bessel function.

csphjy(n, z)

Spherical Bessel functions of the first and second kind, and their derivatives.

csphjy_jvp(n, primals, tangents)

Module Contents#

IMLCV.tools.spherical_bessel._lax_const#
IMLCV.tools.spherical_bessel.jint(n)#
IMLCV.tools.spherical_bessel.spb1(x: jax._src.typing.ArrayLike, /) jax._src.typing.Array#

Calculate the spherical Bessel functions j_1(z). Follows existing implementation of jnp.sinc for safety around 0, using a Maclaurin series to keep continuous derivatives.

Parameters:

x – The argument of the function.

Returns:

The function j_1(z).

Return type:

csj

IMLCV.tools.spherical_bessel._spb1_maclaurin(k, x)#
IMLCV.tools.spherical_bessel._spb1_maclaurin_jvp(k, primals, tangents)#
IMLCV.tools.spherical_bessel.envj(n, x)#

Helper function for msta1 and msta2.

IMLCV.tools.spherical_bessel.msta1(x, mp)#

Calculate the number of terms required for the spherical Bessel function.

IMLCV.tools.spherical_bessel.msta2(x, n, mp)#

Calculate the number of terms required for the spherical Bessel function.

IMLCV.tools.spherical_bessel.csphjy(n, z)#

Spherical Bessel functions of the first and second kind, and their derivatives. Follows the implementation of emsr/maths_burkhardt, but with the derivatives. :param n: The order of the spherical Bessel function. :param z: The argument of the function.

Returns:

The number of terms used in the calculation. csj: The function j_n(z). cdj: The derivative of the function j_n(z). csy: The function y_n(z). cdy: The derivative of the function y_n(z).

Return type:

nm

IMLCV.tools.spherical_bessel.csphjy_jvp(n, primals, tangents)#