Say which stars sit at the Gliese catalogue's distances, about half of them no parallax at all

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) <noreply@anthropic.com>
This commit is contained in:
2026-09-30 00:10:58 +02:00
co-authored by Claude Opus 5.5
parent 5ab4c5df89
commit 15b8f2dff3
2 changed files with 23 additions and 8 deletions
@@ -105,7 +105,17 @@ describe('positionsNote', () => {
it("says which positions are the archive's distances rather than parallaxes, and how many", () => { 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])).toBe('Positions from measured parallaxes. Grid marks the galactic plane through the Sun.');
expect(positionsNote([HYG_STAR, { ...GAIA_STAR, source: 'exoplanet-archive' }])).toBe( 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.'
); );
}); });
}); });
@@ -1,6 +1,6 @@
import { spectralClassification } from '../../shared/astro/spectral'; import { spectralClassification } from '../../shared/astro/spectral';
import { formatDistance, formatLuminosity } from '../../shared/format/quantity'; 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 { StarSurface } from '../body-detail/body-view-model';
import { HudReadout } from '../hud/hud-dock.component'; 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 * 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 * 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 { export function positionsNote(stars: readonly StarRecord[]): string {
const archive = stars.filter((star) => star.source === 'exoplanet-archive').length; const archive = stars.filter((star) => star.source === 'exoplanet-archive').length;
const where = const gliese = stars.filter((star) => star.source === 'hyg' && star.distanceError === undefined && star.id !== SUN_STAR_ID).length;
archive === 0 const where = [
? 'Positions from measured parallaxes.' '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.`; ...(gliese === 0 ? [] : [`for the ${gliese.toLocaleString('en-GB')} stars only the Gliese catalogue places, from its distances, about half of them photometric`]),
return `${where} Grid marks the galactic plane through the Sun.`; ...(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. */ /** What the catalogue holds, counted by the catalogue describing each star, largest first. */