Place a star at whichever of its two distances is the more precise, not at Gaia's regardless

placementDistancePc took Gaia's distance wherever the cross-match gave a usable one, and its
docstring and c64eea0 called that "the better measurement", adding that Gaia saturates on the
brightest stars "so those sit at their Hipparcos distance". For 273 of the 88 781 HYG stars with
both, Gaia's relative error is the larger, 257 of them naked-eye and 38 by more than twice: Eta Leo
was drawn at Gaia's 556.6 pc ±17 % against Hipparcos's 389 pc ±6.2 %, Schedar and Tarazed at
Gaia's though both have Gaia G of about 2.

placementDistancePc now takes both relative errors and picks the smaller, Gaia's as before when
either is missing; fetchStars gives the placed star the error and the Gaia-distance flag of the
distance it took. The merge's combine keeps the Gaia entry's direction, and now takes the other
entry's distance with its error where that is the more precise, so a bright star Gaia's main query
also holds lands at its Hipparcos distance too. Gaia still wins for the rest, whose parallaxes are
some fifty times more precise.

From cache: 424 stars move, 386 of them naked-eye; HYG rows at Gaia's distance 58 379 -> 58 109 and
HYG stars flagged so 8 129 -> 8 095. Eta Leo 556.6 -> 389.1 pc, Tarazed 178.9 -> 121.1, Imai 139.5 ->
105.8, Schedar 71.0 -> 70.0, Alphecca 23.7 -> 23.0, each now "±" its Hipparcos error. Where the two
disagree by more than 5 σ (21 stars, Iot Gem 11 σ), one of the formal errors is wrong, and this
takes the smaller one at its word. The validators pass unchanged.

Controls, each failing its named test: the placement ignoring the errors, the merge keeping Gaia's
distance whatever the errors, and taking the distance but not its error (1 of 805 each).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-29 21:37:35 +02:00
co-authored by Claude Opus 5.5
parent 23547defe0
commit 8c3a86097c
6 changed files with 57 additions and 22 deletions
+3 -2
View File
@@ -295,8 +295,9 @@ export async function fetchGaiaDistancesByHip(): Promise<Map<number, { distanceP
const MIN_HIPPARCOS_ERRORS = 110_000;
/**
* The relative error of every Hipparcos parallax, keyed by HIP number, for the stars that keep
* their Hipparcos distance: 3 067 of them, Rigel and Deneb among them, where Gaia saturates.
* The relative error of every Hipparcos parallax, keyed by HIP number: to choose between it and
* Gaia's, and for the stars that keep their Hipparcos distance — Rigel and Deneb, which Gaia has
* no usable parallax for, and the few hundred bright stars where Gaia's is the less precise.
*
* From van Leeuwen's 2007 reduction, which the ESA archive hosts beside Gaia and HYG's distances
* are the inverse of. HYG publishes the distance and not its error.