qnm.radial

Solve the radial Teukolsky equation via Leaver’s method.

Functions

D_coeffs(omega, a, s, m, A) The D_0 through D_4 coefficients that enter into the radial infinite continued fraction, Eqs.
leaver_cf_inv_lentz(omega, a, s, m, A, n_inv) Compute the n_inv inversion of the infinite continued fraction for solving the radial Teukolsky equation, using modified Lentz’s method.
leaver_cf_inv_lentz_old(omega, a, s, m, A, n_inv) Legacy function.
leaver_cf_trunc_inversion(omega, a, s, m, A, …) Legacy function.
sing_pt_char_exps(omega, a, s, m) Compute the three characteristic exponents of the singular points of the radial Teukolsky equation.
qnm.radial.D_coeffs(omega, a, s, m, A)[source]

The D_0 through D_4 coefficients that enter into the radial infinite continued fraction, Eqs. (31) of [1] .

Parameters:
omega: complex

The complex frequency in the ansatz for the solution of the radial Teukolsky equation.

a: double

Spin parameter of the black hole, 0. <= a < 1 .

s: int

Spin weight of the field (i.e. -2 for gravitational).

m: int

Azimuthal number for the perturbation.

A: complex

Separation constant between angular and radial ODEs.

Returns:
array[5] of complex

D_0 through D_4 .

References

[1]GB Cook, M Zalutskiy, “Gravitational perturbations of the Kerr geometry: High-accuracy study,” Phys. Rev. D 90, 124021 (2014), https://arxiv.org/abs/1410.7698 .
qnm.radial.leaver_cf_inv_lentz(omega, a, s, m, A, n_inv, tol=1e-10, N_min=0, N_max=inf)[source]

Compute the n_inv inversion of the infinite continued fraction for solving the radial Teukolsky equation, using modified Lentz’s method. The value returned is Eq. (44) of [1].

Same as leaver_cf_inv_lentz_old(), but with Lentz’s method inlined so that numba can speed things up.

Parameters:
omega: complex

The complex frequency for evaluating the infinite continued fraction.

a: float

Spin parameter of the black hole, 0. <= a < 1 .

s: int

Spin weight of the field (i.e. -2 for gravitational).

m: int

Azimuthal number for the perturbation.

A: complex

Separation constant between angular and radial ODEs.

n_inv: int

Inversion number for the infinite continued fraction. Finding the nth overtone is typically most stable when n_inv = n .

tol: float, optional [default: 1.e-10]

Tolerance for termination of Lentz’s method.

N_min: int, optional [default: 0]

Minimum number of iterations through Lentz’s method.

N_max: int or comparable, optional [default: np.Inf]

Maximum number of iterations for Lentz’s method.

Returns:
(complex, float, int)

The first value (complex) is the nth inversion of the infinite continued fraction evaluated with these arguments. The second value (float) is the estimated error from Lentz’s method. The third value (int) is the number of iterations of Lentz’s method.

References

[1]GB Cook, M Zalutskiy, “Gravitational perturbations of the Kerr geometry: High-accuracy study,” Phys. Rev. D 90, 124021 (2014), https://arxiv.org/abs/1410.7698 .

Examples

>>> from qnm.radial import leaver_cf_inv_lentz
>>> print(leaver_cf_inv_lentz(omega=.4 - 0.2j, a=0.02, s=-2, m=2, A=4.+0.j, n_inv=0))
((-3.5662773770495972-1.538871079338485j), 9.702532283649582e-11, 76)
qnm.radial.leaver_cf_inv_lentz_old(omega, a, s, m, A, n_inv, tol=1e-10, N_min=0, N_max=inf)[source]

Legacy function. Same as leaver_cf_inv_lentz() except calling qnm.contfrac.lentz(). We do not jit this function since lentz is not jitted. It remains here for testing purposes. See documentation for leaver_cf_inv_lentz() for parameters and return value.

Examples

>>> from qnm.radial import leaver_cf_inv_lentz_old, leaver_cf_inv_lentz
>>> print(leaver_cf_inv_lentz_old(omega=.4 - 0.2j, a=0.02, s=-2, m=2, A=4.+0.j, n_inv=0))
((-3.5662773770495972-1.538871079338485j), 9.702532283649582e-11, 76)

Compare the two versions of the function:

>>> old = leaver_cf_inv_lentz_old(omega=.4 - 0.2j, a=0.02, s=-2, m=2, A=4.+0.j, n_inv=0)
>>> new = leaver_cf_inv_lentz(omega=.4 - 0.2j, a=0.02, s=-2, m=2, A=4.+0.j, n_inv=0)
>>> [ old[i]-new[i] for i in range(3)]
[0j, 0.0, 0]
qnm.radial.leaver_cf_trunc_inversion(omega, a, s, m, A, n_inv, N=300, r_N=1.0)[source]

Legacy function.

Approximate the n_inv inversion of the infinite continued fraction for solving the radial Teukolsky equation, using N terms total for the approximation. This uses “bottom up” evaluation, and you can pass a seed value r_N to assume for the rest of the infinite fraction which has been truncated. The value returned is Eq. (44) of [1].

Parameters:
omega: complex

The complex frequency for evaluating the infinite continued fraction.

a: float

Spin parameter of the black hole, 0. <= a < 1 .

s: int

Spin weight of the field (i.e. -2 for gravitational).

m: int

Azimuthal number for the perturbation.

A: complex

Separation constant between angular and radial ODEs.

n_inv: int

Inversion number for the infinite continued fraction. Finding the nth overtone is typically most stable when n_inv = n .

N: int, optional [default: 300]

The depth where the infinite continued fraction is truncated.

r_N: float, optional [default: 1.]

Value to assume for the rest of the infinite continued fraction past the point of truncation.

Returns:
complex

The nth inversion of the infinite continued fraction evaluated with these arguments.

References

[1]GB Cook, M Zalutskiy, “Gravitational perturbations of the Kerr geometry: High-accuracy study,” Phys. Rev. D 90, 124021 (2014), https://arxiv.org/abs/1410.7698 .
qnm.radial.rad_a(i, n_inv, D)[source]
qnm.radial.rad_b(i, n_inv, D)[source]
qnm.radial.sing_pt_char_exps(omega, a, s, m)[source]

Compute the three characteristic exponents of the singular points of the radial Teukolsky equation.

We want ingoing at the outer horizon and outgoing at infinity. The choice of one of two possible characteristic exponents at the inner horizon doesn’t affect the minimal solution in Leaver’s method, so we just pick one. Thus our choices are, in the nomenclature of [1], \((\zeta_+, \xi_-, \eta_+)\).

Parameters:
omega: complex

The complex frequency in the ansatz for the solution of the radial Teukolsky equation.

a: double

Spin parameter of the black hole, 0. <= a < 1 .

s: int

Spin weight of the field (i.e. -2 for gravitational).

m: int

Azimuthal number for the perturbation.

Returns:
(complex, complex, complex)

\((\zeta_+, \xi_-, \eta_+)\)

References

[1]GB Cook, M Zalutskiy, “Gravitational perturbations of the Kerr geometry: High-accuracy study,” Phys. Rev. D 90, 124021 (2014), https://arxiv.org/abs/1410.7698 .