Papers
Topics
Authors
Recent
Search
2000 character limit reached

pybhpt: Python Library for Kerr Perturbations

Updated 6 July 2026
  • pybhpt is an open-source Python library for first-order black-hole perturbation theory that computes waveforms and invariant quantities for generic eccentric and precessing Kerr orbits.
  • It employs a frequency-domain framework to solve the Teukolsky equation using spectral source integration, MST series, and Hertz potential–based metric reconstruction.
  • The library links self-force calculations with conservative Hamiltonian data, enabling cross-framework comparisons among effective-one-body and post-Newtonian descriptions.

Searching arXiv for papers on pybhpt and related black-hole perturbation theory. pybhpt is an open, frequency-domain Python library that implements first-order, in the small mass ratio ϵ=m2/m1\epsilon = m_2/m_1, black-hole perturbation theory for a point particle on generic eccentric, precessing bound orbits in Kerr spacetime. It solves the Teukolsky equation for the maximal-spin Newman–Penrose curvature scalars ψ0\psi_0 and ψ4\psi_4, reconstructs the metric perturbation in multiple radiation-gauge variants, computes the generalized redshift invariant, and, through a recent Hamiltonian formulation, supplies the conservative first-order Hamiltonian needed for first post-adiabatic waveform generation. In later work, pybhpt also serves as a benchmark and integration target for alternative frequency-domain Kerr solvers based on a unified confluent-Heun framework (Nasipak, 10 Jul 2025, Chen et al., 10 May 2026).

1. Problem domain and physical content

pybhpt is designed for first-order self-force and waveform calculations in the small-mass-ratio limit for a point particle on generic eccentric, precessing, bound Kerr geodesics. The library computes frequency-domain solutions for the Weyl scalars ψ0\psi_0 with spin weight s=+2s=+2 and ψ4\psi_4 with spin weight s=2s=-2, assembles both horizon-side and infinity-side extended homogeneous solutions, reconstructs radiation-gauge metric perturbations hμνh_{\mu\nu}, and evaluates the generalized redshift invariant along eccentric, precessing Kerr orbits. Through the identification of the interaction Hamiltonian with the time-averaged first-order redshift correction, it provides conservative Hamiltonian data for 1PA1\mathrm{PA} waveforms with conservative self-force effects. The code reaches near-extremal spins, with a/Ma/M up to ψ0\psi_00, eccentricities up to ψ0\psi_01, and inclinations up to ψ0\psi_02 (Nasipak, 10 Jul 2025).

The implemented quantities sit at the interface of several relativistic-perturbation problems. On the dissipative side, pybhpt computes fluxes at infinity and at the horizon from ψ0\psi_03 modes. On the conservative side, it computes ψ0\psi_04, which directly determines the first-order conservative Hamiltonian. This places the library in a position to connect self-force calculations with effective-one-body and post-Newtonian descriptions. A plausible implication is that pybhpt is useful not only for flux production but also for invariant-based calibration problems across approximation schemes.

2. Frequency-domain Kerr perturbation framework

pybhpt adopts a null tetrad aligned with Kerr’s principal null directions and, in the Geroch–Held–Penrose formalism, uses the Kinnersley tetrad. At linear order, the gauge-invariant curvature information is encoded by the maximal spin-weight scalars ψ0\psi_05 and ψ0\psi_06, related to the metric perturbation by linear differential operators. The rescaled scalars satisfy the Teukolsky equations with spin ψ0\psi_07, sourced by the point-particle stress-energy tensor.

For bound motion, the frequency spectrum is discrete:

ψ0\psi_08

with integers ψ0\psi_09, ψ4\psi_40, and ψ4\psi_41. For equatorial motion, ψ4\psi_42; for circular or spherical motion, ψ4\psi_43. The radial Teukolsky equation is

ψ4\psi_44

with

ψ4\psi_45

Retarded boundary conditions are imposed at the horizon and at null infinity using homogeneous solutions ψ4\psi_46 and ψ4\psi_47 normalized by their asymptotics. The amplitudes are computed through Green’s-function integrals,

ψ4\psi_48

with

ψ4\psi_49

and

ψ0\psi_00

Extended homogeneous solutions are then assembled as

ψ0\psi_01

These formulas define the core frequency-domain structure on which the remainder of the library is built (Nasipak, 10 Jul 2025).

The orbital sector is parameterized either by ψ0\psi_02 or by orbital elements ψ0\psi_03. Introducing Mino time ψ0\psi_04 via ψ0\psi_05, the motion separates into librations in ψ0\psi_06 and ψ0\psi_07 and linear drifts in ψ0\psi_08 and ψ0\psi_09, with fundamental coordinate-time frequencies

s=+2s=+20

This structure is the basis for the spectral source integration used later in the code.

3. Metric reconstruction and gauge structure

In vacuum regions, pybhpt reconstructs the metric perturbation from Hertz potentials using Wald’s adjoint-operator identity. The library implements four reconstruction formalisms. Two are the Chrzanowski–Cohen–Kegeles–Wald reconstructions from either s=+2s=+21 or s=+2s=+22, leading to ingoing radiation gauge and outgoing radiation gauge. Two build on Aksteiner–Andersson–Bäckdahl identities and use both s=+2s=+23 and s=+2s=+24; the paper labels these symmetric radiation gauge and antisymmetric radiation gauge.

The reconstructed fields are

s=+2s=+25

s=+2s=+26

s=+2s=+27

s=+2s=+28

IRG satisfies s=+2s=+29 and ψ4\psi_40; ORG satisfies ψ4\psi_41 and ψ4\psi_42. SRG and ARG are traceless combinations rather than standard gauges. The Aksteiner–Andersson–Bäckdahl identity gives

ψ4\psi_43

with ψ4\psi_44 in Boyer–Lindquist coordinates. ARG requires time derivatives of Hertz potentials, and static modes with ψ4\psi_45 are excluded from ARG in this work (Nasipak, 10 Jul 2025).

For point particles, the spacetime is divided into two vacuum domains separated by the worldline. Reconstruction is performed on each side, and radiation-gauge reconstructions are glued into a no-string solution. Physical solutions also require stationary-axisymmetric completion terms,

ψ4\psi_46

For bound geodesics,

ψ4\psi_47

The completed solution in each domain and in a target gauge ψ4\psi_48 is

ψ4\psi_49

This organization is central to pybhpt’s redshift extraction, because continuity of s=2s=-20 across the worldline is the key practical condition for obtaining the regularized invariant.

4. Generalized redshift invariant and Hamiltonian interpretation

The generalized redshift invariant is defined in the effective metric s=2s=-21 by s=2s=-22. Expanding,

s=2s=-23

The generalized redshift is the infinite coordinate-time average at fixed frequencies s=2s=-24, primary mass s=2s=-25, secondary mass s=2s=-26, and spin s=2s=-27:

s=2s=-28

For bound biperiodic motion, the averaging is written as phase-space integrals in s=2s=-29:

hμνh_{\mu\nu}0

hμνh_{\mu\nu}1

The resulting quantity is described as a quasi-invariant across physically reasonable gauges (Nasipak, 10 Jul 2025).

Regularization uses a mode-sum compatible with locally Lorenz singular structure:

hμνh_{\mu\nu}2

In practice, the leading locally Lorenz parameter hμνh_{\mu\nu}3 suffices to render the sum convergent, while pybhpt accelerates convergence by fitting the large-hμνh_{\mu\nu}4 tail to determine effective higher-order hμνh_{\mu\nu}5. For generic Kerr orbits,

hμνh_{\mu\nu}6

with hμνh_{\mu\nu}7 and hμνh_{\mu\nu}8 given in terms of Kerr metric functions and constants of motion, and hμνh_{\mu\nu}9 the complete elliptic integral.

The Hamiltonian connection is

1PA1\mathrm{PA}0

with actions 1PA1\mathrm{PA}1, and

1PA1\mathrm{PA}2

Thus pybhpt provides 1PA1\mathrm{PA}3, from which conservative equations of motion follow through Hamilton’s equations. This is the library’s main link to waveform generation with conservative 1PA1\mathrm{PA}4 effects and to cross-framework comparisons involving self-force, EOB, and PN descriptions.

5. Software organization and computational workflow

pybhpt is organized into domain-specific modules that follow the perturbative pipeline from geodesic motion to radiative and conservative observables (Nasipak, 10 Jul 2025).

Module Role
geo Geodesic functions, turning points, and fundamental frequencies; spectral evaluation of 1PA1\mathrm{PA}5 and 1PA1\mathrm{PA}6
swsh Spin-weighted spheroidal harmonics via spherical expansions; coupling coefficients 1PA1\mathrm{PA}7 and eigenvalues 1PA1\mathrm{PA}8
radial Homogeneous Teukolsky ODEs with Zenginoğlu stabilization; Teukolsky–Starobinsky mappings between 1PA1\mathrm{PA}9 and a/Ma/M0; monodromy-based a/Ma/M1 optional
teuk Inhomogeneous amplitudes a/Ma/M2 via SSI; robust error tracking and thresholds
hertz Mode functions a/Ma/M3 using identities; angular and radial derivatives for reconstruction
metric Analytic reconstruction coefficients for applying GHP operators to Hertz modes; assembling a/Ma/M4
redshift Coefficients to form a/Ma/M5, worldline projection, mode-sum assembly, and regularization/fitting to extract a/Ma/M6
flux GW fluxes at infinity and horizon built from a/Ma/M7 modes

The library’s typical workflow is geodesics a/Ma/M8 a/Ma/M9 modes ψ0\psi_000 Hertz potentials ψ0\psi_001 metric reconstruction ψ0\psi_002 ψ0\psi_003 ψ0\psi_004 ψ0\psi_005 ψ0\psi_006 ψ0\psi_007. In the angular sector, spin-weighted spheroidal harmonics are expanded in spin-weighted spherical harmonics,

ψ0\psi_008

with the coupling coefficients obtained from a five-term recurrence recast as an eigenvalue problem. In the radial sector, homogeneous solutions are integrated using Zenginoğlu’s transformation and a Prince–Dormand ψ0\psi_009 method with adaptive stepping from the GNU Scientific Library. Coulomb or Heun boundary series supply initial data, and the complementary spin sector is rebuilt through reduced Teukolsky–Starobinsky identities.

The source amplitudes are evaluated by spectral source integration. The source takes a distributional form with up to two ψ0\psi_010-derivatives,

ψ0\psi_011

where

ψ0\psi_012

Hertz potentials are then built in mode-sum form, reconstruction operators are applied in a spherical-harmonic basis, and the worldline quantity ψ0\psi_013 is regularized and averaged.

6. Convergence, validation, and limitations

Away from the worldline, convergence is exponential. Near the worldline, the radiation gauges have the expected singular structure. IRG, ORG, and SRG have the expected ψ0\psi_014 singularity near the particle, producing ψ0\psi_015 as ψ0\psi_016. ARG modes are more singular, with ψ0\psi_017–ψ0\psi_018 behavior in half-string form, reflecting an ψ0\psi_019–ψ0\psi_020 divergence, and ARG excludes static modes with ψ0\psi_021. SRG inherits the “worst” asymptotic behavior of IRG and ORG at boundaries but remains ψ0\psi_022 near the particle (Nasipak, 10 Jul 2025).

The main numerical limitation identified in the paper comes from spectral source integration at very high mode numbers. For large ψ0\psi_023, ψ0\psi_024, and ψ0\psi_025, especially at high eccentricity and small ψ0\psi_026, oscillatory cancellation limits accuracy; pybhpt drops modes when the relative error exceeds a threshold. This limits accuracy for ψ0\psi_027 near the innermost stable orbit. The paper reports that eccentric equatorial redshift values agree with van de Meent–Shah (2015) at the ψ0\psi_028–ψ0\psi_029 level across gauges. It also reports new precessing results with spins up to ψ0\psi_030 and, for near-extremal Kerr, the first observation of negative ψ0\psi_031 near the ISCO, implying a surface in ψ0\psi_032 where the interaction Hamiltonian vanishes.

These features are important for interpretation. The gauge-dependent local fields remain singular in the expected ways, but the regularized redshift invariant and Hamiltonian data retain their utility. A plausible implication is that pybhpt’s most robust outputs are invariant or quasi-invariant quantities assembled after reconstruction and regularization, rather than raw local metric components near the particle.

7. Relation to later HeunC-based solvers

A later study on generic Kerr-orbit fluxes describes pybhpt as implementing a hybrid semi-analytical/semi-numerical pipeline: MST series for the radial Teukolsky equation, spectral methods for spin-weighted spheroidal harmonics, and Frobenius expansions of HeunC for boundary data, together with adaptive Runge–Kutta integration and spectral source techniques. That work identifies three typical challenges for pybhpt-style frequency-domain calculations: computational overhead in determining auxiliary parameters such as MST’s renormalized angular momentum ψ0\psi_033 and high-accuracy angular eigenvalues, stiffness and loss of accuracy for strong-field or high-frequency modes, and sensitivity of oscillatory source integrals to grid resolution (Chen et al., 10 May 2026).

The unified confluent-Heun framework reformulates both the angular and radial Teukolsky equations directly as confluent Heun equations and computes global solutions via Motygin’s hybrid analytic-continuation algorithm. In the benchmarks reported there, for the total radiative flux summed over ψ0\psi_034 low-order modes, the HeunC framework achieves relative errors of order ψ0\psi_035, with HeunC runtime ψ0\psi_036–ψ0\psi_037 s versus pybhpt ψ0\psi_038–ψ0\psi_039 s, corresponding to a ψ0\psi_040–ψ0\psi_041 speedup. For a highly oscillatory single-mode case, HeunC converges in ψ0\psi_042 ms, while pybhpt’s uniform trapezoidal rule over ψ0\psi_043 took ψ0\psi_044 ms with larger error. The same study describes integration into existing pipelines, including pybhpt, as straightforward: reuse orbit and frequency infrastructure, replace MST or Runge–Kutta radial propagation with HeunC plus connection coefficients, and adopt adaptive bi-power mapping quadrature.

This comparison places pybhpt in a broader methodological lineage. It remains a complete frequency-domain Python pipeline for Kerr perturbation theory, metric reconstruction, redshift regularization, and conservative Hamiltonian data, while later HeunC-based work suggests a path toward faster and more stable flux backends for strong-field and highly oscillatory regimes.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to pybhpt.