# Offline observing-cadence replay

Download every scientific file from the tutorial's download list into one folder. Open a terminal in that folder. Python 3.10 or newer and NumPy 2.0.2 reproduce the saved output; no repository account or network connection is needed during replay.

```sh
python3 -W error replay-ogle.py
python3 -W error replay-synthetic.py
```

The commands write `ogle-replay-rerun.json` and `synthetic-replay-rerun.json` beside the downloaded files. `--input <path>` and `--out <path>` override the paths. In a repository checkout, invoking `scripts/astronomy/ac07/replay-ogle.py` instead discovers the owned scientific input and writes the canonical docs output.

The observed replay verifies the 403-row source SHA-256, selects all valid first-season points using the declared 160-day rule (25 actual points over 51.96797 days), fits weighted floating-mean sinusoids, saves the entire 0.2–6/day search grid and window, and repeats with every third actual row. Each timestamp set receives 4096 full-grid Gaussian-null simulations and 1024 independent null validation simulations. Separate standardized permutations test exchangeability; 128 injected magnitude sinusoids measure detections, correct-frequency recoveries, wrong aliases and misses. FAP is conditional on the declared constant, independent-Gaussian model and is not a correct-period probability.

`synthetic-results.json` contains saved seed-707 exposures from the separate two-source camera simulation, including original synthetic flux values and burst values. `replay-synthetic.py` independently refits those values with NumPy's least-squares SVD and recomputes threshold crossings and alert times. It neither regenerates detector noise nor imports the protected Lab engine. The source period remains 0.635 days across schedules. Processing delay is added after exposure end, preserving the saved exposures. No browser FAP is implied by a raw peak.

The measured files, original OGLE README, catalog row, provenance and saved outputs are available anonymously at `/stories/observing-cadence/downloads/` followed by the exact filename displayed in the tutorial. Cite the OGLE collaboration and appropriate catalog papers; preserve `ogle-readme.txt` and `ogle-provenance.json`. No explicit Creative Commons grant is claimed.

Repository-only maintenance: `fetch-source.py` is an optional bounded online refresh of the exact 9672-byte measured source, 6769-byte README and 16384-byte catalog range. It verifies expected hashes before writing and fails on source updates. `freeze-synthetic.ts` regenerates the browser's synthetic acquisition from the source model and is not required for the public independent reanalysis. Normal replay never fetches changing data.
