# Scattering from released SXS horizon trajectories

This example independently extracts scattering angles from **SXS:BBH:4292v3.0**
and **SXS:BBH:3999v3.0**, at three numerical resolutions each. It compares the
extracted angles with the first- and second-post-Minkowskian (PM) approximations
at the actual initial parameters of each release. It does not rerun numerical
relativity, fit an EOB model, or borrow the nearest row of a published table.

## Reproduce the calculation

Keep `extract-scattering.py` and `inputs.json` together. With Python 3.12:

```sh
python3 -m venv .venv
.venv/bin/python -m pip install numpy==2.5.3 h5py==3.16.0
.venv/bin/python extract-scattering.py --fetch --cache ./sxs-cache --output ./my-results.json
```

On Windows, use `.venv\Scripts\python.exe` in place of `.venv/bin/python`.
The first run downloads about 3.1 MB: six untouched `Horizons.h5` files and six
original metadata files. The manifest specifies versioned DOIs, file URLs,
sizes, the catalog MD5 checksums, and independently computed SHA256 checksums.
Every run verifies every input. An existing file with a wrong checksum is
rejected, not silently replaced. Subsequent runs need no network:

```sh
.venv/bin/python extract-scattering.py --cache ./sxs-cache --output ./my-results.json
```

The script uses standard-library HTTPS. If a public repository redirect rejects
that client, it tries the same public URL using an installed `curl`; no account
or credentials are used. Add `--full-fits` to retain each incoming/outgoing
fit's residual, condition number, and sample count. The ordinary output already
contains every model/window scattering angle, the resolution comparison,
window-grid and sample-density checks, and the analytic comparisons.

`results.json` was generated with the dependency versions recorded inside it.
Floating-point last digits can vary between numerical-library implementations;
the extraction sensitivities below are much larger than that variation.

## What is computed

We use geometric units, with the length scale set by the **sum of the initial
Christodoulou masses** in the original metadata. The separation `D` is the
distance between the two inertial horizon centers. For each hole, we unwrap
`atan2(y,x)` and determine the angular intercepts as `D` tends to infinity.
The deflection is the outgoing intercept minus the incoming intercept minus
π. The final observable is the average of the two individual deflections in
the supplied nominal initial center-of-mass coordinates.

The extraction follows the two models of [Long et al. 2025, §II.D,
Eqs. (8)–(12)](https://arxiv.org/html/2507.08071v2): a cubic polynomial in inverse
separation, and a Keplerian orbit written as
`1/D = A cos(phi) + B sin(phi) + C`. We solve the latter equation directly at
zero inverse separation. Its phase is `atan2(B,A)`; using the printed
`arctan(A/B)` in Eq. (12c) would not solve Eq. (11). A rotated analytic
hyperbola checks both root branches and the unwrapping convention.

The fixed incoming windows are `[d_in,200]`, with `d_in=50,55,...,80`; the
outgoing windows are `[d_out,350]`, with `d_out=80,90,...,230`. All distances
are in units of the initial mass sum. Each model is used on both legs and the
224 resulting model/window combinations receive equal weight. These particular
grid increments and averaging weights are specified here; they are not claimed
to duplicate an undocumented choice in the source analysis. Fits use the
stored time samples, and are repeated at half and quarter sampling density.

For the analytic comparison, write `M=m1+m2`, `nu=m1*m2/M^2`,
`Gamma=E_ADM/M`, and `gamma=1+(Gamma^2-1)/(2nu)`. The orbital angular momentum
is `j=(J_ADM,z-m1^2*chi1,z-m2^2*chi2,z)/(m1*m2)`. This subtracts the tiny
residual spin angular momenta; the angle model itself is nonspinning. The
**full** angle in radians is

```text
chi_1PM = 2(2 gamma^2 - 1) / [j sqrt(gamma^2 - 1)]
chi_through_2PM = chi_1PM + 3 pi (5 gamma^2 - 1) / (4 Gamma j^2).
```

These expressions follow [Damour 2020, Eqs. (1.4), (1.9)–(1.11),
(2.45)–(2.46)](https://arxiv.org/abs/1912.02139v3); that source expands the
half-angle. The script also checks the equivalent impact-parameter formulas.

## Reading the results

| Release | Lev1 average | Lev2 average | Lev3 average | Lev3 model/window range |
| --- | ---: | ---: | ---: | ---: |
| SXS:BBH:4292v3.0 | 179.793754° | 179.798525° | 179.798517° | 179.790707°–179.805446° |
| SXS:BBH:3999v3.0 | 88.823840° | 88.827834° | 88.827840° | 88.817092°–88.837097° |

| Release, at its Lev3 inputs | 1PM | Through 2PM |
| --- | ---: | ---: |
| SXS:BBH:4292v3.0 | 75.440309° | 103.846283° |
| SXS:BBH:3999v3.0 | 56.580201° | 72.558559° |

The last resolution change is much smaller than the extraction range. It does
**not** establish an equally small total error. The ranges measure sensitivity
to finite-separation extrapolation models and windows; they are neither rigorous
bounds nor statistical confidence intervals. The coarse-window and reduced-
sampling comparisons in the JSON test two additional choices independently.
The AMR resolution labels do not specify uniform grid spacings, so no Richardson
order is assigned. The script verifies the common trajectory prefix before
the resolution branches separate.

The low-order PM angles substantially underestimate these strong deflections.
They are analytic truncations, not competitive calibrated models. We impose no
bound on omitted PM orders. Radiation first modifies scattering at 3PM
([Damour 2020, §V, Eqs. (25)–(31)](https://arxiv.org/abs/2010.01641)). The mean
individual angle and the relative angle defined using the final center-of-mass
frame are distinct in general ([Long et al. 2025, Eqs. (26)–(27)](https://arxiv.org/html/2507.08071v2)).
Small initial ADM momentum and out-of-plane coordinate variation are reported,
so the supplied coordinates are not described as an exact zero-momentum frame.
Radiated energy and angular momentum at infinity are **not recomputed** here;
the downloaded horizon files and initial metadata do not provide those fluxes.

## Source data and acknowledgment

- [SXS:BBH:4292v3.0](https://doi.org/10.26138/SXS:BBH:4292v3.0).
- [SXS:BBH:3999v3.0](https://doi.org/10.26138/SXS:BBH:3999v3.0).
- O. Long et al., “Highly accurate simulations of asymmetric black-hole
  scattering and cross validation of effective-one-body models,”
  [arXiv:2507.08071v2](https://arxiv.org/abs/2507.08071v2) (2025).
- T. Damour, “Classical and quantum scattering in post-Minkowskian gravity,”
  *Physical Review D* **102**, 024060 (2020),
  [doi:10.1103/PhysRevD.102.024060](https://doi.org/10.1103/PhysRevD.102.024060).

The [SXS catalog](https://data.black-holes.org/waveforms/) makes the data free
to use and requests acknowledgment of the original simulation publication.
Please cite the release DOIs and Long et al. when using this example. This
package downloads original data from the catalog on request; it does not
redistribute them or assign them a Creative Commons license. The initial
metadata records SpEC revision `f143b8397a4591ecff977cb3e64b1771d10ff4a3`.
Original file hashes and the complete method provenance are in `inputs.json`.
