From 15b8f2dff33f610d543b2cd677556e6662981cbe Mon Sep 17 00:00:00 2001 From: Senrokai Date: Wed, 30 Sep 2026 00:10:58 +0200 Subject: [PATCH] Say which stars sit at the Gliese catalogue's distances, about half of them no parallax at all MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit f8af0ec rewrote the neighbourhood note to say where positions come from, and it still said "measured parallaxes" for everything but the archive's hosts. 313 HYG stars besides the Sun have neither a Hipparcos nor a Gaia distance and sit at HYG's own, which for these rows is the Gliese catalogue's resulting parallax: fetchStars says as much ("as often photometric as measured"), and the review's cross-match with CNS3 (Gliese & Jahreiss 1991, VizieR V/70A; not repeated here) found about 154 of them with a photometric or spectroscopic parallax, 130 within 25 pc — GJ 3522 drawn at 4.46 pc, 1000/224 mas, with no trigonometric parallax behind it. positionsNote now counts the HYG stars without a distance error, the Sun aside, and names them. In the app on :4302 the note reads "Positions from measured parallaxes; for the 313 stars only the Gliese catalogue places, from its distances, about half of them photometric; for the 3,277 planet hosts only the NASA Exoplanet Archive places, from its distances." and still fits the readout panel in four lines. Test: a new star-readouts case counts a Gliese row and leaves the Sun out; the archive-only case now expects the semicolon. Controls: dropping the Gliese clause, and counting the Sun among the Gliese stars, each fail it. Co-Authored-By: Claude Opus 5.5 (1M context) --- .../galaxy-system/star-readouts.spec.ts | 12 +++++++++++- .../features/galaxy-system/star-readouts.ts | 19 ++++++++++++------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/app/features/galaxy-system/star-readouts.spec.ts b/src/app/features/galaxy-system/star-readouts.spec.ts index 1176833..e2f60ba 100644 --- a/src/app/features/galaxy-system/star-readouts.spec.ts +++ b/src/app/features/galaxy-system/star-readouts.spec.ts @@ -105,7 +105,17 @@ describe('positionsNote', () => { it("says which positions are the archive's distances rather than parallaxes, and how many", () => { expect(positionsNote([HYG_STAR, GAIA_STAR])).toBe('Positions from measured parallaxes. Grid marks the galactic plane through the Sun.'); expect(positionsNote([HYG_STAR, { ...GAIA_STAR, source: 'exoplanet-archive' }])).toBe( - 'Positions from measured parallaxes, and for the 1 planet hosts only the NASA Exoplanet Archive places, from its distances. Grid marks the galactic plane through the Sun.' + 'Positions from measured parallaxes; for the 1 planet hosts only the NASA Exoplanet Archive places, from its distances. Grid marks the galactic plane through the Sun.' + ); + }); + + it("says which stars sit at the Gliese catalogue's distances, many of them no parallax, and leaves the Sun out", () => { + // A HYG row with neither a Hipparcos nor a Gaia error: GJ 3522, at the 4.46 pc of a parallax CNS3 estimates. + const gliese: StarRecord = { ...HYG_STAR, id: 900, name: 'GJ 3522', distanceError: undefined }; + const sun: StarRecord = { ...HYG_STAR, id: 0, name: 'Sol', distanceError: undefined }; + expect(positionsNote([sun, HYG_STAR, gliese, { ...GAIA_STAR, source: 'exoplanet-archive' }])).toBe( + 'Positions from measured parallaxes; for the 1 stars only the Gliese catalogue places, from its distances, about half of them photometric; ' + + 'for the 1 planet hosts only the NASA Exoplanet Archive places, from its distances. Grid marks the galactic plane through the Sun.' ); }); }); diff --git a/src/app/features/galaxy-system/star-readouts.ts b/src/app/features/galaxy-system/star-readouts.ts index dd18ae6..0b39acb 100644 --- a/src/app/features/galaxy-system/star-readouts.ts +++ b/src/app/features/galaxy-system/star-readouts.ts @@ -1,6 +1,6 @@ import { spectralClassification } from '../../shared/astro/spectral'; import { formatDistance, formatLuminosity } from '../../shared/format/quantity'; -import { StarRecord } from '../../shared/models/star.model'; +import { StarRecord, SUN_STAR_ID } from '../../shared/models/star.model'; import { StarSurface } from '../body-detail/body-view-model'; import { HudReadout } from '../hud/hud-dock.component'; @@ -72,15 +72,20 @@ function radiusReadout(radiusSolar: number, derived: boolean): HudReadout { /** * Where the neighbourhood's positions come from: parallaxes, except for the stars only the * Exoplanet Archive places, which sit at its own distances — a lensing model's for the - * microlensing hosts among them, OGLE-2005-BLG-390L's 6.6 kpc for one, with no parallax behind it. + * microlensing hosts among them, OGLE-2005-BLG-390L's 6.6 kpc for one, with no parallax behind it — + * and the HYG stars neither Hipparcos nor Gaia measured, which sit at the Gliese catalogue's. Those + * have no published error, and of the 313 on the map about 154 have a photometric or spectroscopic + * parallax in CNS3 (Gliese & Jahreiss 1991), none measured: GJ 3522 at 4.46 pc is 1000/224 mas. */ export function positionsNote(stars: readonly StarRecord[]): string { const archive = stars.filter((star) => star.source === 'exoplanet-archive').length; - const where = - archive === 0 - ? 'Positions from measured parallaxes.' - : `Positions from measured parallaxes, and for the ${archive.toLocaleString('en-GB')} planet hosts only the NASA Exoplanet Archive places, from its distances.`; - return `${where} Grid marks the galactic plane through the Sun.`; + const gliese = stars.filter((star) => star.source === 'hyg' && star.distanceError === undefined && star.id !== SUN_STAR_ID).length; + const where = [ + 'Positions from measured parallaxes', + ...(gliese === 0 ? [] : [`for the ${gliese.toLocaleString('en-GB')} stars only the Gliese catalogue places, from its distances, about half of them photometric`]), + ...(archive === 0 ? [] : [`for the ${archive.toLocaleString('en-GB')} planet hosts only the NASA Exoplanet Archive places, from its distances`]) + ].join('; '); + return `${where}. Grid marks the galactic plane through the Sun.`; } /** What the catalogue holds, counted by the catalogue describing each star, largest first. */