Find the hosts the catalogue already holds, and name them after their planets' star
The archive's default-parameter rows leave sy_dist blank for 100 planets, TRAPPIST-1's seven among them, so the matcher could not place a host the catalogue had drawn since the Gaia nearby query (Gaia DR3 2635476908753563008, 12.47 pc). fetchExoplanets now also reads the Planetary Systems Composite table (pscomppars) and fills a default row's blank host cells from it. Only host columns: a composite row takes each column from its own reference, so orbits still come from the default row alone, one fit per planet. Where both tables give a distance or a position they agree on all 6 225 and 6 352 rows. Three hosts the catalogue holds by name failed the distance ratio test because the archive's sy_dist, from TICv8, contradicts its own parallax: Lalande 21185 (GJ 411) 5.68 pc against 392 mas, Luyten's Star (GJ 273) 5.92 against 263 mas, Struve 2398 B (Gl 725 B) 6.84 against 285 mas. resolveHostStarId now takes the archive's parallax (sy_plx) as a second distance the ratio test accepts. It is a second chance, not a replacement: 47 of 5 959 systems disagree past the tolerance, and for faint far hosts the inverse parallax is the worse figure (K2-238: 538 pc by sy_dist, 6 779 by parallax). Planets on a catalogue star: 2 071 -> 2 090 of 6 354. The 19 gained are TRAPPIST-1 (7), GJ 273 (2), GJ 411 (2), Gl 725 B, HD 62509 (Pollux), K2-65, TOI-2267 A and B, and two brown-dwarf hosts, 2MASS J02192210-3925225 and DENIS-P J082303.1-491201. No planet lost or changed its host. A matched host whose catalogue name is a bare Gaia designation now takes the archive's host name, so search finds TRAPPIST-1, Teegarden's Star, TOI-700, LP 791-18 and K2-18: 575 stars renamed. validateExoplanets refuses a host that is still only a designation, and the star assets are rewritten after the exoplanets for that reason; stars.bin and stars-meta.bin are unchanged. TOI-2267 A and B both land on one Gaia entry, which takes the name TOI-2267 A. Each planet also carries its host's radius, effective temperature and luminosity (10^st_lum), and a mass for 6 344 planets instead of 5 474, from the default row where it gives one and the composite table otherwise, for the star-physics step. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -109,6 +109,17 @@ describe('resolveHostStarId', () => {
|
||||
expect(id).toBeNull();
|
||||
});
|
||||
|
||||
// The archive's 5.92 pc is TICv8's; its own parallax, 263.26 mas, says 3.80 pc, which is the
|
||||
// star's. With the parallax given, the same query is Luyten's Star — and a parallax that
|
||||
// contradicts the star as well rescues nothing.
|
||||
it("accepts the archive's parallax where its sy_dist contradicts the star", () => {
|
||||
const luytens = star(100, "Luyten's Star", 111.8496, 5.2258, 3.79);
|
||||
const query = { hostname: 'GJ 273', raDeg: 111.8496, decDeg: 5.2258, distancePc: 5.921535 };
|
||||
|
||||
expect(resolveHostStarId({ ...query, parallaxMas: 263.26 }, [luytens])).toBe(100);
|
||||
expect(resolveHostStarId({ ...query, parallaxMas: 168.9 }, [luytens])).toBeNull();
|
||||
});
|
||||
|
||||
// The tolerance is transverse — parsecs on the sky, not an angle — so the same 15″ offset
|
||||
// is a match at 50 pc and a stranger at 200 pc.
|
||||
it('scales the angular tolerance with the host distance', () => {
|
||||
|
||||
@@ -15,6 +15,21 @@ export interface HostStarQuery {
|
||||
/** μα·cos δ in mas/yr, as the archive publishes it (`sy_pmra`); missing means unknown. */
|
||||
pmRaMasPerYear?: number;
|
||||
pmDecMasPerYear?: number;
|
||||
/**
|
||||
* The archive's parallax in mas (`sy_plx`), a second distance the ratio test accepts. Its
|
||||
* `sy_dist` comes from TICv8 and contradicts its own parallax past the tolerance for 47 of the
|
||||
* 5 959 systems that publish both — Lalande 21185 at 5.68 pc for 392 mas (2.55 pc), Luyten's
|
||||
* Star at 5.92 for 263 mas, Struve 2398 B at 6.84 for 285 — and those three are in the
|
||||
* catalogue, 0.1″ to 9″ from the archive's direction. A second chance rather than a
|
||||
* replacement: past a few hundred parsecs the inverse of a low-S/N parallax is the worse
|
||||
* estimate (K2-238, 538 pc by `sy_dist`, would be 6 779).
|
||||
*/
|
||||
parallaxMas?: number;
|
||||
}
|
||||
|
||||
function distancesAgree(a: number, b: number): boolean {
|
||||
const [near, far] = a < b ? [a, b] : [b, a];
|
||||
return (far - near) / near <= MERGE_DISTANCE_RATIO_TOLERANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -129,6 +144,7 @@ export function resolveHostStarId(
|
||||
);
|
||||
const carried = raDegDecDistanceToXyz(carriedBack.raDeg, carriedBack.decDeg, 1);
|
||||
|
||||
const parallaxPc = query.parallaxMas !== undefined && query.parallaxMas > 0 ? 1000 / query.parallaxMas : Number.NaN;
|
||||
const minCosine = Math.cos(Math.min(Math.PI, HOST_TRANSVERSE_TOLERANCE_PC / query.distancePc));
|
||||
let best: StarRecord | null = null;
|
||||
let bestCosine = -2;
|
||||
@@ -146,8 +162,7 @@ export function resolveHostStarId(
|
||||
if (cosine < minCosine || cosine <= bestCosine) {
|
||||
continue;
|
||||
}
|
||||
const [near, far] = query.distancePc < starDistance ? [query.distancePc, starDistance] : [starDistance, query.distancePc];
|
||||
if ((far - near) / near > MERGE_DISTANCE_RATIO_TOLERANCE) {
|
||||
if (!distancesAgree(query.distancePc, starDistance) && !(parallaxPc > 0 && distancesAgree(parallaxPc, starDistance))) {
|
||||
continue;
|
||||
}
|
||||
best = star;
|
||||
|
||||
@@ -2,11 +2,14 @@ import { OrbitalElements } from './body.model';
|
||||
|
||||
/**
|
||||
* A confirmed exoplanet from the NASA Exoplanet Archive (`Planetary Systems` TAP table),
|
||||
* cross-referenced to its host star in the HYG index where possible.
|
||||
* cross-referenced to its host star in the star catalogue.
|
||||
*/
|
||||
export interface ExoplanetRecord {
|
||||
id: string;
|
||||
hostStarId: number | null; // null if the host star could not be cross-referenced to HYG
|
||||
/**
|
||||
* The host's star-catalogue id, the HYG or Gaia star it was matched to; null when none is.
|
||||
*/
|
||||
hostStarId: number | null;
|
||||
hostStarName: string;
|
||||
name: string;
|
||||
radiusEarth?: number;
|
||||
@@ -20,6 +23,15 @@ export interface ExoplanetRecord {
|
||||
periodDays?: number;
|
||||
/** Host star mass in solar masses (`st_mass`); the fallback when no period is published. */
|
||||
hostStarMassSolar?: number;
|
||||
/**
|
||||
* The host's radius in solar radii (`st_rad`), effective temperature in kelvin (`st_teff`) and
|
||||
* luminosity in solar luminosities (10^`st_lum`), where the archive gives them: the planet's
|
||||
* default row first, then the composite table, whose columns may each come from a different
|
||||
* reference. Measured, where `stellar.ts` otherwise derives a luminosity from V and distance.
|
||||
*/
|
||||
hostStarRadiusSolar?: number;
|
||||
hostStarTemperatureK?: number;
|
||||
hostStarLuminositySolar?: number;
|
||||
/**
|
||||
* The host star's own published astrometry (`ra`, `dec`, `sy_dist`, `sy_pmra`, `sy_pmdec`) —
|
||||
* everything the cross-reference above was resolved from.
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user