diff --git a/src/app/shared/astro/host-star-matching.spec.ts b/src/app/shared/astro/host-star-matching.spec.ts index 6891d15..177d80c 100644 --- a/src/app/shared/astro/host-star-matching.spec.ts +++ b/src/app/shared/astro/host-star-matching.spec.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest'; -import { ARCHIVE_ID_BASE, archiveStarId, buildStarNameIndex, normalizeStarName, resolveHostStarId } from './host-star-matching'; +import { ARCHIVE_EPOCH, ARCHIVE_ID_BASE, archiveStarId, buildStarNameIndex, CATALOGUE_EPOCH, normalizeStarName, resolveHostStarId } from './host-star-matching'; import { propagateProperMotion, raDegDecDistanceToXyz } from './coordinates'; import { StarRecord } from '../models/star.model'; @@ -81,13 +81,13 @@ describe('resolveHostStarId', () => { expect(id).toBe(80); }); - // GJ 15 A's archive row sits at J2016, 46″ along its proper motion from Groombridge 34's + // GJ 15 A's archive row sits at J2015.5, 45″ along its proper motion from Groombridge 34's // J2000 place — and only 16″ from an unrelated Gaia entry. Nearest-to-the-published-point - // picks the interloper; carrying the query back the sixteen years must put the planets on - // the star that actually moved there. + // picks the interloper; carrying the query back the fifteen and a half years must put the + // planets on the star that actually moved there. it('picks the star the proper motion says the query is, not the entry nearest the published point', () => { const primary = star(90, 'Groombridge 34', 4.595364, 44.022955, 3.562); - const published = propagateProperMotion(4.595364, 44.022955, 2891.5, 411.9, 16); + const published = propagateProperMotion(4.595364, 44.022955, 2891.5, 411.9, 15.5); const interloper = star(91, 'Gaia DR3 385334196532776576', published.raDeg, published.decDeg + 16 / 3600, 3.563); const id = resolveHostStarId( @@ -215,6 +215,17 @@ describe('resolveHostStarId', () => { }); }); +describe('the archive epoch', () => { + it("carries Barnard's star from the archive's position to where Gaia DR3's goes, to a few milliarcseconds", () => { + // The archive publishes Gaia DR2's J2015.5 position and motion; DR3's is at J2016. + const archive = propagateProperMotion(269.4486144, 4.7379808, -802.803, 10362.5, CATALOGUE_EPOCH - ARCHIVE_EPOCH); + const dr3 = propagateProperMotion(269.44850252543836, 4.739420051112412, -801.5509783684709, 10362.394206546573, CATALOGUE_EPOCH - 2016); + const [a, b] = [archive, dr3].map(({ raDeg, decDeg }) => raDegDecDistanceToXyz(raDeg, decDeg, 1)); + const separationArcsec = (Math.acos(Math.min(1, a.x * b.x + a.y * b.y + a.z * b.z)) * 180 * 3600) / Math.PI; + expect(separationArcsec).toBeLessThan(0.02); + }); +}); + describe('archiveStarId', () => { it('gives a host the same id whatever else the archive holds, inside the range left for it', () => { const kepler186 = archiveStarId('Kepler-186', new Set()); diff --git a/src/app/shared/astro/host-star-matching.ts b/src/app/shared/astro/host-star-matching.ts index 2ffe684..e5283a0 100644 --- a/src/app/shared/astro/host-star-matching.ts +++ b/src/app/shared/astro/host-star-matching.ts @@ -80,15 +80,17 @@ export const HOST_TRANSVERSE_TOLERANCE_PC = 0.01; /** * The archive does not say which epoch a row's position is for, and they are demonstrably * mixed: alf Tau and GJ 273 publish J2000 (the raw position sits under an arcsecond from our - * star, and carrying it back doubles the error), HD 133131 and TOI-2459 publish Gaia's J2016 - * (the carried-back position lands to 0.1″). So every query is tried at both ends — as - * published, and carried back sixteen years with the archive's own proper motion — and a star - * is judged on whichever is closer. Guessing one epoch picks companions: assume J2016 and - * Aldebaran's planet lands on Gl 171.1B, assume J2000 and GJ 15 A's land on a Gaia entry - * 15.9″ out. + * star, and carrying it back doubles the error), HD 133131 and TOI-2459 publish Gaia DR2's J2015.5 + * (the carried-back position lands to 0.1″). DR2's, not DR3's J2016, although the archive names + * the DR3 source: Barnard's star, Teegarden's Star, TRAPPIST-1 and 66 of the 67 archive-placed + * stars moving over 100 mas a year equal their DR2 position to a milliarcsecond and none their + * DR3 one. So every query is tried at both ends — as published, and carried back fifteen and a + * half years with the archive's own proper motion — and a star is judged on whichever is closer. + * Guessing one epoch picks companions: assume the later one and Aldebaran's planet lands on Gl + * 171.1B, assume J2000 and GJ 15 A's land on a Gaia entry 15.9″ out. */ -const CATALOGUE_EPOCH = 2000.0; -const ARCHIVE_LATEST_EPOCH = 2016.0; +export const CATALOGUE_EPOCH = 2000.0; +export const ARCHIVE_EPOCH = 2015.5; function knownMotion(masPerYear: number | undefined): number { return Number.isFinite(masPerYear) ? (masPerYear as number) : 0; @@ -140,7 +142,7 @@ export function resolveHostStarId( // star would pass the direction test and the last one in array order would win. knownMotion(query.pmRaMasPerYear), knownMotion(query.pmDecMasPerYear), - CATALOGUE_EPOCH - ARCHIVE_LATEST_EPOCH + CATALOGUE_EPOCH - ARCHIVE_EPOCH ); const carried = raDegDecDistanceToXyz(carriedBack.raDeg, carriedBack.decDeg, 1); diff --git a/src/assets/data/stars.bin b/src/assets/data/stars.bin index a28de6d..7dad89d 100644 Binary files a/src/assets/data/stars.bin and b/src/assets/data/stars.bin differ diff --git a/tools/etl/fetchExoplanets.ts b/tools/etl/fetchExoplanets.ts index 7b91288..7d1f1c0 100644 --- a/tools/etl/fetchExoplanets.ts +++ b/tools/etl/fetchExoplanets.ts @@ -2,7 +2,7 @@ import { createHash } from 'node:crypto'; import { writeFileSync } from 'node:fs'; import { propagateProperMotion, raDegDecDistanceToXyz } from '../../src/app/shared/astro/coordinates'; -import { archiveStarId, buildStarNameIndex, resolveHostStarId } from '../../src/app/shared/astro/host-star-matching'; +import { ARCHIVE_EPOCH, archiveStarId, buildStarNameIndex, CATALOGUE_EPOCH, resolveHostStarId } from '../../src/app/shared/astro/host-star-matching'; import { temperatureToColorIndex } from '../../src/app/shared/astro/spectral'; import { ExoplanetRecord } from '../../src/app/shared/models/exoplanet.model'; import { isDesignation } from '../../src/app/shared/models/star-catalog'; @@ -87,12 +87,12 @@ const DISTANCE_ERRORS_CACHE_FILE = `exoplanet-archive-disterr-${createHash('sha1 const ARCHIVE_SOURCE = 'exoplanet-archive'; /** - * The archive's positions are at Gaia's epoch, J2016, not the catalogue's J2000: of the 746 - * matched hosts moving over 100 mas a year, 741 sit nearer their star once carried back sixteen - * years (a median 0.11″ from it, against 3.47″ as published). The matcher tries both epochs; a - * star placed from the archive has to pick one. + * The archive's positions are at Gaia DR2's epoch, J2015.5, not the catalogue's J2000 (see + * `ARCHIVE_EPOCH`): of the 746 matched hosts moving over 100 mas a year, 741 sit nearer their star + * once carried back (a median 0.11″ from it, against 3.47″ as published). The matcher tries both + * epochs; a star placed from the archive has to pick one. */ -const ARCHIVE_TO_CATALOGUE_YEARS = 2000 - 2016; +const ARCHIVE_TO_CATALOGUE_YEARS = CATALOGUE_EPOCH - ARCHIVE_EPOCH; /** As in `fetchStars`: faint, for a host the archive gives neither a V nor a G magnitude. */ const UNKNOWN_MAGNITUDE = 15;