---
title: "Recompute a conditional GD-1 projected-orbit fit"
description: "Run independent stream dynamics, acquire fixed author products, and retain nonconvergence, coverage failures and a poor real-data orbit comparison."
canonical_url: "https://sandboxphysics.com/stories/stellar-streams/recompute-gd1-projected-orbit-fit/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/stories/stellar-streams/recompute-gd1-projected-orbit-fit/"
last_modified: "2026-11-05"
---

[Stellar streams, encounters and observed projections](https://sandboxphysics.com/stories/stellar-streams/)

Stellar streams · L3

# Recompute a conditional GD-1 projected-orbit fit

Sandbox Physics · 2026-11-05

This tutorial produces two different results: an independently testable mechanical ensemble and a conditional comparison with real GD-1 projections. The real comparison is not especially good. Learning to recognise that outcome is part of the exercise.

## Before you begin

Read the projection chapter first. Default replay needs existing Python, NumPy, SciPy and Matplotlib. The optional real exercise also needs an already installed galpy C extension and Astropy; these scripts install nothing.

## Make a new record outside the repository

Download the scientific ZIP, verify the published length and SHA, and extract into a new directory. The output path must not yet exist; do not create it as an empty folder first. Default replay uses no network and imports no application engine.

It generates 192 distinct states from a fixed seed and freshly integrates 25 registered finite cases. Each is checked against a separately written high-order integrator, half-step refinement, work, torque, phase-space volume and direct impulse quadrature. The compact encounter and same-initial-state host reference are saved completely; other successful whole histories leave scalar verification summaries.

```
python -B replay.py --output /absolute/new-output-path
```

Reading: Sandbox Physics standalone stellar-stream scientific reader v1

## Read coordinates before reading a picture

Counts use fixed corotating azimuth bins, with out-of-range stars retained in the accounting. They are equal-weight tracer counts, not continuous density, surface brightness or detection significance. The second diagnostic compares the same star identities with a host-only reference instead of subtracting unrelated random populations.

This is an imposed warm arc, with no tidal release, self-gravity, observational selection or real GD-1 initial conditions. It makes causality and numerical errors accessible. Matching a simulated hole to a sky image would not establish a subhalo detection.

[![Fresh counts and same-identity trajectory offsets](https://sandboxphysics.com/stories/stellar-streams/materials/fresh-encounter-counts.svg)](https://sandboxphysics.com/stories/stellar-streams/materials/fresh-encounter-counts.svg)

Top: counts at encounter, about 83 million years and 483 million years later. Bottom: same-star angular offsets from the host-only reference at about 533 million years. The numerical example contains 192 equal-weight tracers and fixed bins; each plotted time unit is about 66.7 million years.

[Open the scalable figure](https://sandboxphysics.com/stories/stellar-streams/materials/fresh-encounter-counts.svg)

Reading: Sandbox Physics standalone stellar-stream scientific reader v1

## Optionally acquire the actual fixed inputs

The optional command fetches exactly one fixed author ZIP, one official coordinate source and its MIT licence: 737348 response-body bytes in total. It verifies complete lengths and SHA values and stops on failure without a mirror retry. Alternatively, explicitly name an existing verified input directory; that is reuse, not fresh acquisition.

Original files, observed projection rows, fitted tracks and real-data plots remain in the reader’s private output. Public access and archive-level licensing do not automatically replace upstream Gaia conditions, so those rows and figures are excluded from the public package.

```
python -B optional_reader.py --acquire --output /absolute/new-private-path
```

Reading: Valluri et al. (2025), GD-1 Stellar Stream and Cocoon in the DESI Early Data Release, arXiv:2407.06336v2 · Gala v1.12.0: fixed official GD1Koposov10 coordinate source · Sandbox Physics standalone stellar-stream scientific reader v1

## Check the observer, then compute genuine C trajectories

The sequence checks the literal official matrix, map directions, solar velocity and proper-motion units before integrating one hundred million years backward and forward with the actual loaded galpy C path. Positive and negative circular motion, independent Cartesian integration and invariants must pass before saved known-truth recovery.

The fifteen-kiloparsec galpy length scale is an integration unit. The observer transformation separately fixes the Sun–Galactic-centre distance at 8.122 kiloparsecs and uses the source solar velocity explicitly listed in the code. Integration units and observer position serve different conversions.

The fit varies five conditional anchor quantities: stream latitude, distance, two corrected proper motions and heliocentric radial velocity. The spherical logarithmic host is fixed. The maximal monotonic-longitude branch containing the anchor must cover all source longitudes; it cannot splice in another orbital passage or extrapolate.

Earlier native coordinate-consistency checks remain failed. The method uses the verified source-defined map rather than empirically adjusting a rotation. The undocumented upstream differences remain a separate source question; the internal tests cover the explicitly defined transformation.

Reading: Gala v1.12.0: fixed official GD1Koposov10 coordinate source · Sandbox Physics standalone stellar-stream scientific reader v1

## Keep all three starts, not just an attractive curve

All three predetermined starts are retained. The second never supplies complete longitude coverage and has no accepted track; it fails without a restart. The first exhausts 400 objective calls without convergence. The third reports success quickly but has a much worse loss.

The baseline is chosen by training loss alone. Two predetermined relative-weight scenarios start from that same candidate, without consulting held-out scores. Every accepted final track still needs independent whole-state, invariant and doubled saved-sampling checks.

The baseline held-out loss is about 0.608, worse than 0.445 for the same-fold cubic. Its two proper-motion held-out RMS residuals are approximately 0.218 and 0.362 milliarcseconds per year. Changing the positional weight changes the result; total losses under different weight definitions are not directly comparable.

Reading: Sandbox Physics standalone stellar-stream scientific reader v1

## A successful replay can conclude that the model is inadequate

Read external clocks, actual return codes, objective-call counts and refusal reasons. A successful replay means those computations really ran again. It does not make the real orbit fit good enough to infer a Galactic potential or dark matter. There is no complete covariance, membership-selection likelihood or stream-release model here, and no confidence interval is claimed.

A useful next question is whether a release history improves cross-stream proper motion, or whether host changes trade against distance and solar correction. Those require new models and validation. Relaxing a numerical gate or removing inconvenient points is not a substitute.

Reading: Sandbox Physics standalone stellar-stream scientific reader v1 · Valluri et al. (2025), GD-1 Stellar Stream and Cocoon in the DESI Early Data Release, arXiv:2407.06336v2

## Exercises and explanations

1. Is optimizer success more trustworthy than a call-budget stop?

   Read the explanation

   Inspect the actual training predictions, held-out predictions and coverage. Success is an algorithmic stopping flag. Here a rapidly stopping start gives a poor fit; the flag cannot replace model checking.

2. If every stage replays as expected, has the real model passed?

   Read the explanation

   No. Expected outcomes include a no-coverage failure, nonconvergence and an orbit worse than the descriptive cubic. The calculation and failure-retention chain can pass while the astrophysical model remains inadequate.

## Try the prediction

### [Connect saved records to offline analysis](https://sandboxphysics.com/labs/stellar-stream-encounter/)

1. Export the Lab record and identify the corresponding time, position, velocity and balance fields in offline outputs.
2. Use the unperturbed preset to see why matching star identities matters for a reference.
3. After the real exercise compare held-out residuals before deciding whether a plausible-looking stream is an adequate model.

## Standalone scientific materials

[Download the scientific ZIP](https://sandboxphysics.com/stories/stellar-streams/materials/stellar-streams-reader-science-v1.zip) · [Read the setup and calculation scope](https://sandboxphysics.com/stories/stellar-streams/materials/reader-setup.md)

The ZIP freshly integrates 25 finite encounter cases and independent limits without network. Figures consume new saved records. The explicit optional real-data exercise fetches fixed inputs privately and preserves its poor conditional fit.

[Previous: Project a stellar stream before fitting it](https://sandboxphysics.com/stories/stellar-streams/observing-and-fitting-a-stellar-stream/) [Next: Read the 2025 GD-1 thin-stream and cocoon paper](https://sandboxphysics.com/stories/stellar-streams/reading-gd1-stream-and-cocoon-2025/)

## Sources and calculation scope

1. [Valluri et al. (2025), GD-1 Stellar Stream and Cocoon in the DESI Early Data Release, arXiv:2407.06336v2](https://arxiv.org/abs/2407.06336v2)

   Fixed 30 January 2025 v2, 25 pages fully read; original pages 7/12/14/21 actually viewed. Sections 3–5, Figures 2/7–12, Table 3 and Appendix A are distinguished from our conditional orbit exercise. DOI 10.3847/1538-4357/ada690; no original paper, figure or observed row redistributed.

2. [Gala v1.12.0: fixed official GD1Koposov10 coordinate source](https://github.com/adrn/gala/blob/bebac7d728478c5122a568e12175ef894d1c1516/src/gala/coordinates/gd1.py)

   MIT source, fixed commit bebac7d728478c5122a568e12175ef894d1c1516. Literal rounded R and transpose reverse, normalized direction/proper-motion definitions; optional reader fetches and hashes the exact source without installing Gala.

3. [Sandbox Physics standalone stellar-stream scientific reader v1](https://sandboxphysics.com/stories/stellar-streams/materials/stellar-streams-reader-science-v1.zip)

   Own Python integrates 25 finite cases anew, checks an independent high-order reference, half steps, analytic limits and saved-record counts. Default zero network. Optional exact-source galpy exercise retains poor fit/nonconvergence/no-coverage failures. No App/Engine, completed tracks, originals or observed-derived figures in the ZIP.
