Geodesic module#
Bound timelike geodesics are defined in terms of the Keplerian-like parameters:
\(a\) : the dimensionless Kerr spin parameter
\(p\) : the dimensionless semilatus rectum
\(e\) : the orbital eccentricty
\(x\) : cosine of the orbital inclination
API#
- pybhpt.geo.kerrgeo_Vt_radial(a: float, En: float, Lz: float, Q: float, r: float) float[source]
The radial part of the potential Vt for the geodesic evolution of $t_p$.
- Parameters:
a (float) – The black hole spin parameter.
En (float) – The orbital energy of the particle.
Lz (float) – The z-component of the orbital angular momentum of the particle.
Q (float) – The Carter constant of the particle.
r (float) – The radial coordinate.
- Returns:
The value of the radial potential Vt at the given parameters.
- Return type:
float
- pybhpt.geo.kerrgeo_Vt_polar(a: float, En: float, Lz: float, Q: float, theta: float) float[source]
The polar part of the potential Vt for the geodesic evolution of $t_p$.
- Parameters:
a (float) – The black hole spin parameter.
En (float) – The orbital energy of the particle.
Lz (float) – The z-component of the orbital angular momentum of the particle.
Q (float) – The Carter constant of the particle.
theta (float) – The polar angle coordinate.
- Returns:
The value of the polar potential Vt at the given parameters.
- Return type:
float
- pybhpt.geo.kerrgeo_Vr(a: float, En: float, Lz: float, Q: float, r: float) float[source]
The (squared) radial potential Vr for the geodesic evolution of $r_p$.
- Parameters:
a (float) – The black hole spin parameter.
En (float) – The orbital energy of the particle.
Lz (float) – The z-component of the orbital angular momentum of the particle.
Q (float) – The Carter constant of the particle.
r (float) – The radial coordinate.
- Returns:
The value of the radial potential Vr at the given parameters.
- Return type:
float
- pybhpt.geo.kerrgeo_Vtheta(a: float, En: float, Lz: float, Q: float, theta: float) float[source]
The (squared) polar potential Vtheta for the geodesic evolution of $ heta_p$.
- Parameters:
a (float) – The black hole spin parameter.
En (float) – The orbital energy of the particle.
Lz (float) – The z-component of the orbital angular momentum of the particle.
Q (float) – The Carter constant of the particle.
theta (float) – The polar angle coordinate.
- Returns:
The value of the polar potential Vtheta at the given parameters.
- Return type:
float
- pybhpt.geo.kerrgeo_Vphi_radial(a: float, En: float, Lz: float, Q: float, r: float) float[source]
The (squared) radial potential Vphi for the geodesic evolution of $r_p$.
- Parameters:
a (float) – The black hole spin parameter.
En (float) – The orbital energy of the particle.
Lz (float) – The z-component of the orbital angular momentum of the particle.
Q (float) – The Carter constant of the particle.
r (float) – The radial coordinate.
- Returns:
The value of the radial potential Vphi at the given parameters.
- Return type:
float
- pybhpt.geo.kerrgeo_Vphi_polar(a: float, En: float, Lz: float, Q: float, theta: float) float[source]
The (squared) polar potential Vphi for the geodesic evolution of $r_p$.
- Parameters:
a (float) – The black hole spin parameter.
En (float) – The orbital energy of the particle.
Lz (float) – The z-component of the orbital angular momentum of the particle.
Q (float) – The Carter constant of the particle.
theta (float) – The polar angle coordinate.
- Returns:
The value of the polar potential Vphi at the given parameters.
- Return type:
float
- pybhpt.geo.kerr_mino_frequencies(a: float, p: float, e: float, x: float) ndarray[source]
Returns the Mino frequencies of a Kerr geodesic.
- Parameters:
a (float) – The black hole spin parameter.
p (float) – The semilatus rectum of the orbit.
e (float) – The eccentricity of the orbit.
x (float) – The inclination of the orbit.
- Returns:
The Mino time frequencies of the orbit.
- Return type:
numpy.ndarray
- pybhpt.geo.kerr_fundamental_frequencies(a: float, p: float, e: float, x: float) ndarray[Any, dtype[float64]][source]
Returns the fundamental (time) frequencies of a Kerr geodesic.
- Parameters:
a (float) – The black hole spin parameter.
p (float) – The semilatus rectum of the orbit.
e (float) – The eccentricity of the orbit.
x (float) – The inclination of the orbit.
- Returns:
The fundamental frequencies of the orbit.
- Return type:
numpy.ndarray
- pybhpt.geo.kerr_orbital_constants(a: float | ndarray[Any, dtype[float64]], p: float | ndarray[Any, dtype[float64]], e: float | ndarray[Any, dtype[float64]], x: float | ndarray[Any, dtype[float64]]) ndarray[Any, dtype[float64]][source]
Returns the orbital constants of a Kerr geodesic (En, Lz, Qc).
- Parameters:
a (float or numpy.ndarray) – The black hole spin parameter.
p (float or numpy.ndarray) – The semilatus rectum of the orbit.
e (float or numpy.ndarray) – The eccentricity of the orbit.
x (float or numpy.ndarray) – The inclination of the orbit.
- Returns:
The orbital constants (En, Lz, Qc) of the orbit.
- Return type:
numpy.ndarray
- pybhpt.geo.kerr_kepler_parameters(a: float | ndarray[Any, dtype[float64]], En: float | ndarray[Any, dtype[float64]], Lz: float | ndarray[Any, dtype[float64]], Qc: float | ndarray[Any, dtype[float64]]) ndarray[Any, dtype[float64]][source]
Returns the Keplerian parameters of a Kerr geodesic (p, e, x) given the orbital constants (a, En, Lz, Qc).
- Parameters:
a (float or numpy.ndarray) – The black hole spin parameter.
En (float or numpy.ndarray) – The orbital energy of the particle.
Lz (float or numpy.ndarray) – The z-component of the orbital angular momentum of the particle.
Qc (float or numpy.ndarray) – The Carter constant of the particle.
- Returns:
The Keplerian parameters (p, e, x) of the orbit.
- Return type:
numpy.ndarray
- pybhpt.geo.jacobian_ELQ_to_pex(a: float | ndarray[Any, dtype[float64]], p: float | ndarray[Any, dtype[float64]], e: float | ndarray[Any, dtype[float64]], x: float | ndarray[Any, dtype[float64]]) ndarray[Any, dtype[float64]][source]
Returns the Jacobian matrix of the transformation from (E, Lz, Q) to (p, e, x). | dp/dE dp/dLz dp/dQ | | de/dE de/dLz de/dQ | | dx/dE dx/dLz dx/dQ |
- Parameters:
a (float or numpy.ndarray) – The black hole spin parameter.
p (float or numpy.ndarray) – The semilatus rectum of the orbit.
e (float or numpy.ndarray) – The eccentricity of the orbit.
x (float or numpy.ndarray) – The inclination of the orbit.
- Returns:
The Jacobian matrix of the transformation from (E, Lz, Q) to (p, e, x).
- Return type:
numpy.ndarray
- pybhpt.geo.jacobian_pex_to_ELQ(a: float | ndarray[Any, dtype[float64]], p: float | ndarray[Any, dtype[float64]], e: float | ndarray[Any, dtype[float64]], x: float | ndarray[Any, dtype[float64]]) ndarray[Any, dtype[float64]][source]
Returns the Jacobian matrix of the transformation from (p, e, x) to (E, Lz, Q): | dE/dp dE/de dE/dx | | dLz/dp dLz/de dLz/dx | | dQ/dp dQ/de dQ/dx |
- Parameters:
a (float or numpy.ndarray) – The black hole spin parameter.
p (float or numpy.ndarray) – The semilatus rectum of the orbit.
e (float or numpy.ndarray) – The eccentricity of the orbit.
x (float or numpy.ndarray) – The inclination of the orbit.
- Returns:
The Jacobian matrix of the transformation from (p, e, x) to (E, Lz, Q).
- Return type:
numpy.ndarray
- pybhpt.geo.is_power_of_two(n: int) bool[source]
- class pybhpt.geo.KerrGeodesic(a, p, e, x, nsamples=256)[source]
Bases:
objectClass that produces a Kerr geodesic given the parameters of the orbit. This class is a wrapper around the Cython implementation of the Kerr geodesic and provides a Python interface to the underlying C++ code. :param a: The black hole spin parameter. :type a: float :param p: The semilatus rectum of the orbit. :type p: float :param e: The eccentricity of the orbit. :type e: float :param x: The inclination of the orbit. :type x: float :param nsamples: The number of samples to use for the geodesic. Must be a power of two. Default is 256. :type nsamples: int
- Variables:
blackholespin (float) – The black hole spin parameter.
semilatusrectum (float) – The semilatus rectum of the orbit.
eccentricity (float) – The eccentricity of the orbit.
inclination (float) – The inclination of the orbit.
orbitalenergy (float) – The orbital energy En of the orbit.
orbitalangularmomentum (float) – Th z-component of the orbital angular momentum Lz of the orbit.
carterconstant (float) – The Carter constant Qc of the orbit.
orbitalconstants (numpy.ndarray) – The orbital constants (En, Lz, Qc) of the orbit.
radialroots (numpy.ndarray) – The roots of the radial equation.
polarroots (numpy.ndarray) – The roots of the polar equation.
minofrequencies (numpy.ndarray) – The orbital frequencies with respect to Mino time.
timefrequencies (numpy.ndarray) – The orbital frequencies with respect to the time coordinate.
frequencies (numpy.ndarray) – The (coordinate time) frequencies of the orbit.
carterfrequencies (numpy.ndarray) – The frequencies for computing Carter constant fluxes.
timeradialfourier (numpy.ndarray) – The Fourier coefficients of coordinate time with respect to the radial Mino phase.
timepolarfourier (numpy.ndarray) – The Fourier coefficients of coordinate time with respect to the polar Mino phase.
radialfourier (numpy.ndarray) – The Fourier coefficients of radial position with respect to the radial Mino phase.
polarfourier (numpy.ndarray) – The Fourier coefficients of polar position with respect to the polar Mino phase.
azimuthalradialfourier (numpy.ndarray) – The Fourier coefficients of azimuthal position with respect to the radial Mino phase.
azimuthalpolarfourier (numpy.ndarray) – The Fourier coefficients of azimuthal position with respect to the polar Mino phase.
- base
The base class that contains the Cython implementation of the Kerr geodesic.
- property blackholespin
The black hole spin parameter.
- property semilatusrectum
The semilatus rectum of the orbit.
- property eccentricity
The eccentricity of the orbit.
- property inclination
The cosine of the inclination angle of the orbit with respect to the equatorial plane.
- property a
The black hole spin parameter.
- property p
The semilatus rectum of the orbit.
- property e
The eccentricity of the orbit.
- property x
The inclination of the orbit.
- property apex
The parameters of the orbit (a, p, e, x).
- property orbitalparameters
The parameters of the orbit (a, p, e, x).
- property orbitalenergy
The orbital energy En of the orbit.
- property orbitalangularmomentum
The z-component of the orbital angular momentum Lz of the orbit.
- property carterconstant
The Carter constant Qc of the orbit.
- property orbitalconstants
The orbital constants (En, Lz, Qc) of the orbit.
- property radialroots
The roots of the radial equation.
- property polarroots
The roots of the polar equation.
- property minofrequencies
The orbital frequencies with respect to Mino time.
- property timefrequencies
The orbital frequencies with respect to the time coordinate.
- property frequencies
The (coordinate time) frequencies of the orbit.
- property carterfrequencies
The frequencies for computing Carter constant fluxes.
- property timeradialfourier
The Fourier coefficients of coordinate time with respect to the radial Mino phase.
- property timepolarfourier
The Fourier coefficients of coordinate time with respect to the polar Mino phase.
- property radialfourier
The Fourier coefficients of radial position with respect to the radial Mino phase.
- property polarfourier
The Fourier coefficients of polar position with respect to the polar Mino phase.
- property azimuthalradialfourier
The Fourier coefficients of azimuthal position with respect to the radial Mino phase.
- property azimuthalpolarfourier
The Fourier coefficients of azimuthal position with respect to the polar Mino phase.
- mode_frequency(m, k, n)[source]
Returns the frequency of the mode with azimuthal number m, polar number k, and radial number n.
- Parameters:
m (int) – The azimuthal number of the mode.
k (int) – The polar number of the mode.
n (int) – The radial number of the mode.
- Returns:
The frequency of the mode with azimuthal number m, polar number k, and radial number n.
- Return type:
float
- psi_radial(la)[source]
Function that returns the radial true anomaly for a given Mino time value.
- Parameters:
la (float or numpy.ndarray) – The Mino time value(s). If a numpy array is provided, the function will return a numpy array of the same shape.
- Returns:
The radial true anomaly for the given Mino time value(s).
- Return type:
numpy.ndarray
- psi_polar(la)[source]
Function that returns the polar Darwin phase for a given Mino time value.
- Parameters:
la (float or numpy.ndarray) – The Mino time value(s). If a numpy array is provided, the function will return a numpy array of the same shape.
- Returns:
The polar Darwin phase for the given Mino time value(s).
- Return type:
numpy.ndarray
- psi_radial_of_t(t)[source]
Function that returns the radial true anomaly for a given time value.
- Parameters:
t (float or numpy.ndarray) – The time value(s). If a numpy array is provided, the function will return a numpy array of the same shape.
- Returns:
The radial true anomaly for the given time value(s).
- Return type:
numpy.ndarray
- psi_polar_of_t(t)[source]
Function that returns the polar Darwin phase for a given time value.
- Parameters:
t (float or numpy.ndarray) – The time value(s). If a numpy array is provided, the function will return a numpy array of the same shape.
- Returns:
The polar Darwin phase for the given time value(s).
- Return type:
numpy.ndarray
- time_position(la)[source]
Function that returns the time position for a given Mino time value.
- Parameters:
la (float or numpy.ndarray) – The Mino time value(s). If a numpy array is provided, the function will return a numpy array of the same shape.
- Returns:
The time position for the given Mino time value(s).
- Return type:
numpy.ndarray
- radial_position(la)[source]
Function that returns the radial position for a given Mino time value.
- Parameters:
la (float or numpy.ndarray) – The Mino time value(s). If a numpy array is provided, the function will return a numpy array of the same shape.
- Returns:
The radial position for the given Mino time value(s).
- Return type:
numpy.ndarray
- polar_position(la)[source]
Function that returns the polar position for a given Mino time value.
- Parameters:
la (float or numpy.ndarray) – The Mino time value(s). If a numpy array is provided, the function will return a numpy array of the same shape.
- Returns:
The polar position for the given Mino time value(s).
- Return type:
numpy.ndarray
- azimuthal_position(la)[source]
Function that returns the azimuthal position for a given Mino time value.
- Parameters:
la (float or numpy.ndarray) – The Mino time value(s). If a numpy array is provided, the function will return a numpy array of the same shape.
- Returns:
The azimuthal position for the given Mino time value(s).
- Return type:
numpy.ndarray
- radial_position_of_t(t)[source]
Function that returns the radial position for a given Mino time value.
- Parameters:
t (float or numpy.ndarray) – The Mino time value(s). If a numpy array is provided, the function will return a numpy array of the same shape.
- Returns:
The radial position for the given Mino time value(s).
- Return type:
numpy.ndarray
- polar_position_of_t(t)[source]
Function that returns the polar position for a given time value.
- Parameters:
t (float or numpy.ndarray) – The time value(s). If a numpy array is provided, the function will return a numpy array of the same shape.
- Returns:
The polar position for the given time value(s).
- Return type:
numpy.ndarray
- azimuthal_position_of_t(t)[source]
Function that returns the azimuthal position for a given time value.
- Parameters:
t (float or numpy.ndarray) – The time value(s). If a numpy array is provided, the function will return a numpy array of the same shape.
- Returns:
The azimuthal position for the given time value(s).
- Return type:
numpy.ndarray
- mino_of_t(t)[source]
Function that returns the Mino time for a given Boyer-Lindquist time.
- Parameters:
t (float or numpy.ndarray) – The Boyer-Lindquist time value(s). If a numpy array is provided, the function will return a numpy array of the same shape.
- Returns:
The Mino time for the given Boyer-Lindquist time value(s).
- Return type:
numpy.ndarray
- position_of_t(t)[source]
Function that returns the position vector (r, theta, phi) for a given Boyer-Lindquist time value.
- Parameters:
t (float or numpy.ndarray) – The Boyer-Lindquist time value(s). If a numpy array is provided, the function will return a numpy array of the same shape.
- Returns:
The position vector (r, theta, phi) for the given Boyer-Lindquist time value(s).
- Return type:
numpy.ndarray
- position(la)[source]
Function that returns the position vector (t, r, theta, phi) for a given Mino time value. :param la: The Mino time value(s). If a numpy array is provided, the function will return a numpy array of the same shape. :type la: float or numpy.ndarray
- Returns:
The position vector (t, r, theta, phi) for the given Mino time value(s).
- Return type:
numpy.ndarray
- __call__(la)[source]
Call self as a function.