Files
star-map/tools/etl/sources/registry.ts
T
SenrokaiandClaude Opus 5 4eb61ff58e Draw each HYG star at Gaia's distance, and keep the ones Hipparcos misplaced
HYG and Gaia were both cut at 250 pc, each on its own distance. A star
Hipparcos put at 200 pc and Gaia at 300 was kept by the first, never
downloaded from the second, and drawn at 200. That is where 83% of the
9 691 mid-magnitude HYG stars without a Gaia counterpart came from, and at
the median Hipparcos had them a third too close. The mirror case, Hipparcos
outside and Gaia inside, dropped the HYG row and left its Gaia entry
anonymous.

Gaia's own Hipparcos cross-match (hipparcos2_best_neighbour, a fixed DR3
table of 99 525 rows) gives a usable Gaia distance for 97 751 of them.
placementDistancePc keeps a star either survey puts inside the cutoff, and
draws every kept star at the better measurement, inside the cutoff or not.
57 121 HYG stars now sit at Gaia's distance. 6 833 of them are past 250 pc:
Zet Per 230 -> 259 pc, 35 Ori 137 -> 330, 44 Cnc 223 -> 613, and the
farthest, HIP 69445, at 8.7 kpc. 3 666 stars that Hipparcos put outside are
now kept, and 3 656 of them give a Gaia entry its name.

The cross-match is required rather than skipped when unreachable. Without
it, every one of those stars would move back to its Hipparcos distance, and
the published map would flip with the archive's availability. The ESA TAP
answered it with a 500 at first and in 102 s on the next try. So fetches
now retry 5xx and network failures twice, after 30 s and 120 s, in the
fetch every source goes through. The refresh job also carries the Gaia DR3
responses from run to run in the Actions cache: the release is frozen, and
a live re-fetch has already reproduced stars.bin byte for byte.

423 651 stars (+10), 61 168 HYG rows folded into Gaia entries (+3 656),
351 597 unnamed designations (-3 656). 10 886 HYG survivors and 23 unmerged
pairs under an arcsecond, both inside the merge gate's ceilings. The same
1 972 exoplanets have a host; KELT-4 A b and MWC 758 c now sit on their
named star.

The HUD's "Radius" becomes "Survey radius": 250 pc is where Gaia is
surveyed to, and no longer the edge of the map.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016jxMkwA2rbicdGxHosecYi
2026-09-11 19:07:12 +02:00

82 lines
4.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { fetchGaiaStars } from './gaia';
import { StarSource } from './star-sources';
/**
* Every catalogue this pipeline knows about, wired in or not, with an honest note on each.
*
* Kept as data so `npm run etl` can print what it actually used rather than what a README claims
* it uses. The four unimplemented entries are not placeholders for missing work: three of them
* cannot contribute stars to a 3D map at all, for the reason recorded against each.
*/
export const STAR_SOURCES: readonly StarSource[] = [
{
id: 'hyg',
name: 'HYG database (Hipparcos, Yale Bright Star, Gliese)',
role: 'positional',
endpoint: 'https://raw.githubusercontent.com/astronexus/HYG-Database',
contributes:
'A complete, named, spectrally classified bright-star catalogue. Its Hipparcos parallaxes give way to Gaia’s wherever Gaia has a usable one, so its stars sit where the better measurement puts them.',
unimplementedBecause: null
},
{
id: 'gaia',
name: 'Gaia DR3',
role: 'positional',
endpoint: 'https://gea.esac.esa.int/tap-server/tap/sync',
contributes:
'Parallaxes fifty times more precise than Hipparcos, for 1.8 billion sources — the only survey that can add stars to a 3D map, because it is the only one that measures how far away they are.',
unimplementedBecause: null,
fetch: fetchGaiaStars
},
{
id: 'decaps2',
name: 'DECaPS2 (Dark Energy Camera Plane Survey)',
role: 'backdrop',
endpoint: 'https://datalab.noirlab.edu/tap',
contributes:
'The deepest optical census of the southern galactic plane: 3.32 billion objects across 130 degrees, in the dust-obscured region every other catalogue thins out in.',
unimplementedBecause:
'Photometric only — no parallaxes, so not one of its 3.32 billion objects can be placed in depth. Fifty times Gaia’s object count and zero stars this map can position. It would enter as a direction-only backdrop layer, alongside the deep-sky shell.'
},
{
id: 'sdss5-mwm',
name: 'SDSS-V Milky Way Mapper',
role: 'enrichment',
endpoint: 'https://api.sdss.org',
contributes:
'All-sky optical and infrared spectroscopy: effective temperatures, surface gravities, metallicities and radial velocities, which is real spectral classification rather than a colour index standing in for one.',
unimplementedBecause:
'Adds no positions. It is keyed to targets Gaia already places, so it joins onto an existing catalogue rather than extending it — worth having once Gaia is in, and worth nothing before.'
},
{
id: 'euclid-q2-bulge',
name: 'Euclid Galactic Bulge Survey (Q2)',
role: 'backdrop',
endpoint: 'https://easidr.esac.esa.int/sas',
contributes: 'High-resolution imagery and astrometry of the crowded inner bulge, around 8 kpc away.',
unimplementedBecause:
'At 8 kpc a parallax is a few microarcseconds, so this is astrometry without usable distances for a map of this kind. Its natural use here is imagery — a real photograph of the bulge on the galactic view, in place of part of the procedural model.'
},
{
id: 'saga',
name: 'SAGA (Stellar Abundances for Galactic Archaeology)',
role: 'enrichment',
endpoint: 'https://sagadatabase.jp',
contributes: 'Compiled elemental abundances for metal-poor stars — the chemical record of how the Galaxy assembled.',
unimplementedBecause:
'A compilation keyed to stars other catalogues place, covering tens of thousands of objects rather than millions. Like SDSS-V it enriches; it cannot extend the map on its own.'
}
];
export function positionalSources(): readonly StarSource[] {
return STAR_SOURCES.filter((source) => source.role === 'positional' && source.fetch !== undefined);
}
/** A one-line-per-source report of what the pipeline can and cannot draw on. */
export function describeSources(): string {
return STAR_SOURCES.map((source) => {
const status = source.unimplementedBecause === null ? (source.fetch ? 'wired in' : 'wired in (built separately)') : 'declared, not fetched';
return ` [${source.role}] ${source.name} — ${status}`;
}).join('\n');
}