Radial Teukolsky module#
Background#
The RadialTeukolsky class solves the homogeneous radial Teukolsky equation
\(s\) : spin-weight of the perturbation
\(j\) : the spheroidal polar mode number
\(m\) : the azimuthal mode number
\(a\) : the dimensionless Kerr spin parameter
\(\omega\) : the frequency
where \(\Delta=r^2-2Mr+a^2\), \(K=(r^2+a^2)\omega-ma\), and \(\lambda_{sjm\omega}\) is the spheroidal eigenvalue (separation constant).
API#
- pybhpt.radial.available_methods()[source]
Returns a list of available solution methods.
- pybhpt.radial.renormalized_angular_momentum(s, j, m, a, omega)[source]
Computes the renormalized angular momentum for the given parameters.
- Parameters:
s (int) – The spin weight of the field.
j (int) – The spheroidal harmonic mode number.
m (int) – The azimuthal harmonic mode number.
a (float) – The black hole spin parameter.
omega (float) – The frequency of the mode.
- Returns:
The renormalized angular momentum.
- Return type:
complex
- pybhpt.radial.renormalized_angular_momentum_monodromy(s, j, m, a, omega, la)[source]
Computes the renormalized angular momentum using the monodromy method for the given parameters.
- Parameters:
s (int) – The spin weight of the field.
j (int) – The spheroidal harmonic mode number.
m (int) – The azimuthal harmonic mode number.
a (float) – The black hole spin parameter.
omega (complex) – The frequency of the mode.
la (complex) – The spheroidal eigenvalue.
- Returns:
The renormalized angular momentum.
- Return type:
complex
- class pybhpt.radial.RadialTeukolsky(s, j, m, a, omega, r)[source]
Bases:
objectA class for solving the homogeneous radial Teukolsky equation.
- Parameters:
s (int) – The spin weight of the field
j (int) – The spheroidal harmonic mode number
m (int) – The azimuthal harmonic mode number
a (float) – The black hole spin parameter
omega (float) – The frequency of the mode
r (numpy.ndarray) – A numpy array of radial points at which to evaluate the solution
- Variables:
radialpoints (numpy.ndarray) – A numpy array of radial points at which the solution is evaluated.
base (RadialTeukolskyCython) – The underlying Cython object that performs the computations.
nsamples (int) – The number of radial points in the radialpoints array.
Properties
----------
blackholespin (float) – The black hole spin parameter.
spinweight (int) – The spin weight of the field.
s (int) – Alias for spinweight.
spheroidalmode (int) – The spheroidal harmonic mode number.
j (int) – Alias for spheroidalmode.
azimuthalmode (int) – The azimuthal harmonic mode number.
m (int) – Alias for azimuthalmode.
frequency (float) – The frequency of the mode.
mode_frequency (float) – Alias for frequency.
omega (float) – Alias for frequency.
eigenvalue (float) – The spheroidal eigenvalue of the radial Teukolsky equation.
- solveboundarycondition(method)[source]
Solves the boundary condition for the radial Teukolsky equation.
- setboundarycondition(bc, R, Rp, r)[source]
Sets the boundary condition for the radial Teukolsky equation.
- solve(method='AUTO', bc=None)[source]
Solves the radial Teukolsky equation.
- flipspinweight()[source]
Flips the spin weight of the field.
- radialpoint(pos)[source]
Returns the radial point at the given position.
- boundarypoint(bc)[source]
Returns the boundary point for the given boundary condition.
- boundarysolution(bc)[source]
Returns the solution at the boundary for the given boundary condition.
- boundaryderivative(bc)[source]
Returns the derivative at the boundary for the given boundary condition.
- radialsolution(bc, pos)[source]
Returns the solution at the radial point for the given boundary condition and position.
- radialderivative(bc, pos)[source]
Returns the derivative at the radial point for the given boundary condition and position.
- radialderivative2(bc, pos)[source]
Returns the second derivative at the radial point for the given boundary condition and position.
- radialsolutions(bc)[source]
Returns the solutions at all radial points for the given boundary condition.
- radialderivatives(bc)[source]
Returns the derivatives at all radial points for the given boundary condition.
- radialderivatives2(bc)[source]
Returns the second derivatives at all radial points for the given boundary condition.
- __call__(bc, deriv=0)[source]
Returns the solutions, first derivatives, or second derivatives at all radial points for the given boundary condition. The deriv parameter specifies which derivative to return: 0 for solutions, 1 for first derivatives, and 2 for second derivatives. If deriv is not 0, 1, or 2, a ValueError is raised.
- property blackholespin
- property spinweight
- property s
- property spheroidalmode
- property j
- property azimuthalmode
- property m
- property frequency
- property mode_frequency
- property omega
- property eigenvalue
- solveboundarycondition(method)[source]
Solves the boundary condition for the radial Teukolsky equation.
- Parameters:
method (str) – The method to use for solving the boundary condition. Default is “AUTO”.
- setboundarycondition(bc, R, Rp, r)[source]
Sets the boundary condition for the radial Teukolsky equation.
- Parameters:
bc (str) – The boundary condition to set. Can be “In” for horizon or “Up” for infinity.
R (float) – The boundary condition function value at the radial point.
Rp (float) – The derivative of the boundary condition function at the radial point.
r (float) – The radial point at which the boundary condition is defined.
- solve(method='AUTO', bc=None)[source]
Solves the radial Teukolsky equation.
- Parameters:
method (str, optional) – The method to use for solving the equation. Default is “AUTO”.
bc (str, optional) – Specifies which homogeneous solutions to compute. If None, both “In” (horizon) and “Up” (infinity) solutions are computed. If “In”, only the horizon solution is computed. If “Up”, only the infinity solution is computed.
- flipspinweight()[source]
Flips the sign of the spin weight of the field.
- radialpoint(pos)[source]
Returns the radial point at the given position. :param pos: The position at which to evaluate the radial point. :type pos: float
- Returns:
The radial point at the given position.
- Return type:
float
- boundarypoint(bc)[source]
Returns the boundary point for the given boundary condition. :param bc: The boundary condition to evaluate. Can be “In” for horizon or “Up” for infinity. :type bc: str
- Returns:
The boundary point corresponding to the specified boundary condition.
- Return type:
float
- boundarysolution(bc)[source]
Returns the solution at the boundary for the given boundary condition. :param bc: The boundary condition to evaluate. Can be “In” for horizon or “Up” for infinity. :type bc: str
- Returns:
The solution at the boundary corresponding to the specified boundary condition.
- Return type:
float
- boundaryderivative(bc)[source]
Returns the derivative at the boundary for the given boundary condition. :param bc: The boundary condition to evaluate. Can be “In” for horizon or “Up” for infinity. :type bc: str
- Returns:
The derivative at the boundary corresponding to the specified boundary condition.
- Return type:
float
- radialsolution(bc, pos)[source]
Returns the solution at the radial point for the given homogeneous solution and position. :param bc: The homogeneous solution to evaluate. Can be “In” for horizon solution or “Up” for infinity solution. :type bc: str :param pos: The position at which to evaluate the solution. :type pos: float
- Returns:
The solution at the radial point corresponding to the specified boundary condition and position.
- Return type:
float
- radialderivative(bc, pos)[source]
Returns the derivative at the radial point for the given homogeneous solution and position. :param bc: The homogeneous solution to evaluate. Can be “In” for horizon solution or “Up” for infinity solution. :type bc: str :param pos: The position at which to evaluate the solution. :type pos: float
- Returns:
The solution at the radial point corresponding to the specified boundary condition and position.
- Return type:
float
- radialderivative2(bc, pos)[source]
Returns the second derivative at the radial point for the given homogeneous solution and position. :param bc: The homogeneous solution to evaluate. Can be “In” for horizon solution or “Up” for infinity solution. :type bc: str :param pos: The position at which to evaluate the solution. :type pos: float
- Returns:
The solution at the radial point corresponding to the specified boundary condition and position.
- Return type:
float
- radialsolutions(bc)[source]
Returns a homogeneous solution at all radial points. :param bc: The homogeneous solution to evaluate. Can be “In” for horizon solution or “Up” for infinity solution. :type bc: str
- Returns:
A numpy array of solutions at all radial points corresponding to the specified boundary condition.
- Return type:
numpy.ndarray
- radialderivatives(bc)[source]
Returns the radial derivative at all radial points. :param bc: The homogeneous solution to evaluate. Can be “In” for horizon solution or “Up” for infinity solution. :type bc: str
- Returns:
A numpy array of solutions at all radial points corresponding to the specified boundary condition.
- Return type:
numpy.ndarray
- radialderivatives2(bc)[source]
Returns the second radial derivative at all radial points. :param bc: The homogeneous solution to evaluate. Can be “In” for horizon solution or “Up” for infinity solution. :type bc: str
- Returns:
A numpy array of solutions at all radial points corresponding to the specified boundary condition.
- Return type:
numpy.ndarray
- __call__(bc, deriv=0)[source]
Returns the solutions, first derivatives, or second derivatives at all radial points for the given boundary condition.
- Parameters:
bc (str) – The homogeneous solution to evaluate. Can be “In” for horizon solution or “Up” for infinity solution.
deriv (int, optional) – Specifies which derivative to return: 0 for solutions, 1 for first derivatives, and 2 for second derivatives. Default is 0 (solutions).
- Returns:
A numpy array of solutions, first derivatives, or second derivatives at all radial points corresponding to the specified boundary condition.
- Return type:
numpy.ndarray
- Raises:
ValueError – If deriv is not 0, 1, or 2.
- pybhpt.radial.hypergeo_2F1(a, b, c, x)[source]
Gauss hypergeometric function 2F1(a, b; c; x). Note that this function is not very stable across the complex domain.
- Parameters:
a (complex) – The first parameter of the hypergeometric function.
b (complex) – The second parameter of the hypergeometric function.
c (complex) – The third parameter of the hypergeometric function.
x (complex) – The argument of the hypergeometric function.
- Returns:
The value of the hypergeometric function 2F1(a, b; c; x).
- Return type:
complex