---
title: "Replay debris orbits beside a real X-ray light curve"
description: "Recompute a saved debris record, retrieve pinned hydrodynamic fallback and ASASSN-14li X-ray data, and inspect a failed decline model."
canonical_url: "https://sandboxphysics.com/stories/tidal-disruption-fallback/replaying-debris-and-a-light-curve/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/stories/tidal-disruption-fallback/replaying-debris-and-a-light-curve/"
last_modified: "2026-11-16"
---

L3 · Method guide

# Replay debris orbits beside a real X-ray light curve

Sandbox Physics · 2026-11-16

Download the portable analysis below to rebuild a mass-return curve from saved three-dimensional debris states, then compare two prescribed decline shapes with forty-eight published ASASSN-14li X-ray measurements. The orbital checks pass when the reconstruction is consistent; both simple mappings to the observed X-ray flux fail. Keeping those outcomes separate is the point of the exercise.

## Begin with an empty folder

[Download the Python tutorial and frozen orbital input](https://sandboxphysics.com/astronomy/ac53/tidal-disruption-fallback-tutorial.zip). It uses Python 3.9 or later and the standard library. The first run needs a network connection to retrieve the pinned observation source; the published hydrodynamic tables are included with their MIT licence. The package checks its member hashes before analysing anything.

```
python3 -m zipfile -e tidal-disruption-fallback-tutorial.zip .
cd tidal-disruption-fallback-replay
python3 -B replay.py --out replay-output
```

Open the resulting receipt, then the summary and the three CSV files. A successful execution means that saved-state reconstruction, independent benchmarks and frozen numerical comparisons met their stated tolerances. It does not mean that the observed flare accepted either light-curve model.

The numerical comparison uses relative tolerance $10^{-8}$ and absolute tolerance $10^{-9}$. Floating-point strings can differ between Python versions while the calculations agree within those tolerances. The receipt records the actual Python version and output hashes, allowing a reader to preserve the exact result of their own run.

## Read the orbital record before its output

The input contains 768 weighted debris states from a synthetic impulse model. Each row saves mass in solar masses, position in astronomical units and velocity in astronomical units per day. The central black hole is at the origin, the centre orbit’s pericentre lies on the positive $x$ axis and its angular momentum points along positive $z$, normal to the orbital plane. Time zero is the stellar centre’s first pericentre passage.

The supplied case uses a black hole of $0.6$ million solar masses, penetration factor $1.2$, a uniform-density one-solar-mass, one-solar-radius star, diffusion time twenty-five days and efficiency $0.03$. Release occurs inbound at the tidal radius. All debris initially shares the centre velocity. These saved particle states describe a post-disruption ballistic teaching model; they are not a snapshot extracted from a hydrodynamic calculation.

The replay reads the vectors and reconstructs specific energy, angular momentum, eccentricity and orbital phase. For a negative energy, it finds the short initial time to pericentre, adds one full orbit and expresses the return relative to the centre clock. An unbound fragment receives no return time. The saved return-time field is not used as an independent measurement of the orbit.

Inspect the orbit CSV to locate the first returning bound fragment. In the supplied case its return is about $33.3112$ days. The ideal continuous edge estimate is about $31.7225$ days. Finite sampling and the full finite-size potential explain this difference.

## Check the mass beyond the final bin

Each fallback bin receives the sum of fragment masses whose return times fall inside its edges. Dividing by the bin duration gives a mass rate. Its luminosity columns come from the separate capped-heating reservoir defined in the preceding chapter.

The supplied bound mass is about $0.497396$ solar masses. Of this, $0.394531$ has returned within the saved time window and $0.102865$ remains outside it. Add the latter two before comparing with the bound total. Binning cannot turn a long-period bound fragment into escaped gas.

The benchmark file also checks Kepler motion against an independent numerical orbit integration, the analytic return law for a flat energy distribution, and the response of the reservoir to a known pulse. A separate analytic uniform-sphere curve explains the rise in the preceding chapter. These tests exercise different parts of the calculation; a visually smooth plot alone would miss a misplaced clock or a missing tail.

## Open the hydrodynamic reference as a different calculation

The three included tables come from the authors’ [STARS library](https://github.com/jamielaw-smith/STARS_library/tree/5d7f5cbee86ef2c43ccce9c45e8ab4c44dcc34fc), directory input/m1.0\_t0.0/, at the pinned commit linked here. The original two columns are time in days and fallback rate in solar masses per year. They describe a one-solar-mass zero-age stellar model and a million-solar-mass black hole. Its stellar radius is $0.9012$ solar radii and its density is centrally concentrated. The browser uses a uniform solar-radius sphere.

The selected penetration factors are $1$, $1.5$ and $2$. Their finite-table mass integrals are approximately $0.04864$, $0.29278$ and $0.50361$ solar masses. The first two are partial disruptions in this stellar model; the deepest case represents full disruption. The integral of the tabulated, smoothed fallback curve is preserved as supplied, including its small excess above one half in the last case. We do not renormalize it to make it agree with the impulse toy.

Read [Law-Smith and colleagues, arXiv:2007.10996v3](https://arxiv.org/pdf/2007.10996v3), Table 1 and the library discussion, alongside those inputs. Their gas calculation supplies the disruption reference. Recomputing these table integrals does not rerun their three-dimensional hydrodynamic simulations.

You can also change the browser’s mass or incoming orbit, export its debris JSON and analyse that file with the same package. Replace the example path with your downloaded file:

```
python3 -B replay.py --input /path/to/tidal-disruption-debris.json --out changed-state-output
```

The package still checks its own manifest, the source hash, independent benchmarks and every exported fallback bin against reconstruction from the new states. It skips only the default input’s frozen numerical answer. The receipt identifies the custom input by its hash; changed parameters require their own saved outputs.

## Retrieve the observations and keep their units

The observation source is [Holoien and colleagues, arXiv:1507.01598v2](https://arxiv.org/html/1507.01598v2), Table 4. Its published catalogue counterpart is [CDS J/MNRAS/455/2918](https://vizier.cds.unistra.fr/viz-bin/VizieR?-source=J/MNRAS/455/2918), Table A2. The replay retrieves the pinned article HTML, checks its 697,478-byte length and SHA-256, then extracts the forty-eight X-ray rows. It keeps that downloaded source in the output folder.

The first and last rows have Modified Julian Dates $56991.5$ and $57156.7$. The band is Swift XRT from $0.3$ to $10$ kiloelectronvolts. Tabulated fluxes and errors are in units of $10^{-11}\,\mathrm{erg\,s^{-1}\,cm^{-2}}$. They are not corrected for Galactic extinction. The comparison retains those conventions and does not turn the table into a bolometric luminosity.

For this demonstration, define a conditional rest-frame clock in days:

$$
t=\frac{\mathrm{MJD}-56983.6}{1+0.0206}+40.
$$

The forty-day offset is an assumption about disruption before discovery, not a fitted discovery of the disruption time. Both candidate curves use that same clock. They are normalized separately; only one amplitude is fitted for each.

## Read the residuals before choosing a story

Let $F_i$ be a tabulated flux, $\sigma_i$ its quoted error and $f_i$ a dimensionless model shape. Under independent Gaussian errors, minimizing the weighted residual sum gives the amplitude

$$
A=\frac{\sum_i F_i f_i/\sigma_i^2}
{\sum_i f_i^2/\sigma_i^2}.
$$

There are forty-eight measurements and one fitted parameter, so the residual sum has forty-seven degrees of freedom. The pure five-thirds decline gives reduced chi-squared about $102.25$. The amplitude-scaled capped diffusion toy gives about $36.88$. Both leave residuals much larger than the quoted errors under this conditional model. The more flexible-looking curve still fails.

![Forty-eight observed ASASSN-14li X-ray fluxes with errors and two amplitude-scaled model shapes; their standardized residuals show that both conditional comparisons fail.](https://sandboxphysics.com/astronomy/ac53/figures/observed-comparison.en.svg)

Derived from Holoien and colleagues’ forty-eight Swift XRT measurements, with their quoted errors. One table flux unit is $10^{-11}\,\mathrm{erg\,s^{-1}\,cm^{-2}}$ in the $0.3$–$10$ kiloelectronvolt band, without Galactic-extinction correction. Both model shapes fit only amplitude; time assumes disruption forty rest-frame days before discovery. The lower panel divides each observed-minus-predicted residual by its quoted error. Large residuals remain for both curves.

The failed comparison identifies a concrete gap: a prescribed fallback-to-band-flux mapping with one amplitude is insufficient for these data. It does not reject Kepler’s law, determine a black-hole mass or select a unique radiation mechanism. Changing the time origin, absorption or spectral treatment creates a new inference problem and requires a new uncertainty calculation.

For the next dataset, preserve the original rows and units, define the clock before fitting, list the parameters actually varied, keep the late mass and energy tails, and inspect standardized residuals. A reproducible failure can teach more than a rescaled curve with no errors attached.

## Sources

[Holoien and colleagues, arXiv:1507.01598v2](https://arxiv.org/html/1507.01598v2), X-ray analysis and Table 4; published as MNRAS 455, 2918. The forty-eight-row comparison is recomputed here, conditional on the stated time origin and independent tabulated errors.

[STARS library at the frozen commit](https://github.com/jamielaw-smith/STARS_library/tree/5d7f5cbee86ef2c43ccce9c45e8ab4c44dcc34fc), the three original fallback tables and MIT licence.

[Law-Smith and colleagues, arXiv:2007.10996v3](https://arxiv.org/pdf/2007.10996v3), Equations 1–5, Table 1, Sections 3.5–3.6 and library appendices, for the physical meaning of those tables.

## Try the prediction

### [Compare three kinds of curve](https://sandboxphysics.com/labs/tidal-disruption-fallback/)

1. Predict which inputs belong to orbital dynamics and which belong to a telescope.
2. Export the Lab state, then run the portable analysis and open its source manifest.
3. Identify ballistic fallback, offline hydrodynamic reference and measured band flux by their units and source.

## Keep reading

Follow stellar debris back to a black hole · Reading path

### Follow stellar debris back to a black hole

1. [Article **Why a shredded star can take weeks to brighten**](https://sandboxphysics.com/stories/tidal-disruption-fallback/why-a-shredded-star-brightens-late/)
2. [Article **Give the debris its orbital energies**](https://sandboxphysics.com/stories/tidal-disruption-fallback/tides-and-frozen-orbital-energy/)
3. [Article **Turn orbital energies into a return-rate curve**](https://sandboxphysics.com/stories/tidal-disruption-fallback/orbital-periods-and-fallback/)
4. [Article **Let returning gas become escaping light**](https://sandboxphysics.com/stories/tidal-disruption-fallback/diffusion-and-observed-light/)
5. [You are here **Replay debris orbits beside a real X-ray light curve**](https://sandboxphysics.com/stories/tidal-disruption-fallback/replaying-debris-and-a-light-curve/)
6. [Article **Read the evidence for colliding tidal streams**](https://sandboxphysics.com/stories/tidal-disruption-fallback/reading-stream-collisions-and-polarization/)

### Related reading

1. [Article **Why a shredded star can take weeks to brighten**](https://sandboxphysics.com/stories/tidal-disruption-fallback/why-a-shredded-star-brightens-late/)
