qnm.nearby¶
Find a nearby root of the coupled radial/angular Teukolsky equations.
TODO Documentation.
Classes
NearbyRootFinder (*args, **kwargs) |
Object to find and store results from simultaneous roots of radial and angular QNM equations, following the Leaver and Cook-Zalutskiy approach. |
-
class
qnm.nearby.
NearbyRootFinder
(*args, **kwargs)[source]¶ Object to find and store results from simultaneous roots of radial and angular QNM equations, following the Leaver and Cook-Zalutskiy approach.
Parameters: - a: float [default: 0.]
Dimensionless spin of black hole, 0 <= a < 1.
- s: int [default: -2]
Spin of field of interest
- m: int [default: 2]
Azimuthal number of mode of interest
- A_closest_to: complex [default: 4.+0.j]
Complex value close to desired separation constant. This is intended for tracking the l-number of a sequence starting from the analytically-known value at a=0
- l_max: int [default: 20]
Maximum value of l to include in the spherical-spheroidal matrix for finding separation constant and mixing coefficients. Must be sufficiently larger than l of interest that angular spectral method can converge. The number of l’s needed for convergence depends on a.
- omega_guess: complex [default: .5-.5j]
Initial guess of omega for root-finding
- tol: float [default: sqrt(double epsilon)]
Tolerance for root-finding omega
- cf_tol: float [defailt: 1e-10]
Tolerance for continued fraction calculation
- n_inv: int [default: 0]
Inversion number of radial infinite continued fraction, which selects overtone number of interest
- Nr: int [default: 300]
Truncation number of radial infinite continued fraction. Must be sufficiently large for convergence.
- Nr_min: int [default: 300]
Floor for Nr (for dynamic control of Nr)
- Nr_max: int [default: 4000]
Ceiling for Nr (for dynamic control of Nr)
- r_N: complex [default: 1.]
Seed value taken for truncation of infinite continued fraction. UNUSED, REMOVE
Methods
__call__
(x)Internal function for usage with optimize.root, for an instance of this class to act like a function for root-finding. clear_results
()Clears the stored results from last call of do_solve()
do_solve
()Try to find a root of the continued fraction equation, using the parameters that have been set in set_params()
.get_cf_err
()Return the continued fraction error and the number of iterations in the last evaluation of the continued fraction. set_params
(*args, **kwargs)Set the parameters for root finding. set_poles
([poles])Set poles to multiply error function. -
__call__
(x)[source]¶ Internal function for usage with optimize.root, for an instance of this class to act like a function for root-finding. optimize.root only works with reals so we pack and unpack complexes into float[2]
-
clear_results
()[source]¶ Clears the stored results from last call of
do_solve()
-
do_solve
()[source]¶ Try to find a root of the continued fraction equation, using the parameters that have been set in
set_params()
.
-
get_cf_err
()[source]¶ Return the continued fraction error and the number of iterations in the last evaluation of the continued fraction.
Returns: - cf_err: float
- n_frac: int
-
set_params
(*args, **kwargs)[source]¶ Set the parameters for root finding. Parameters are described in the class documentation. Finally calls
clear_results()
.