Hold st_lum's conversion to two hosts' luminosities, and mu2 Sco b to its host

8d59c72 checked only that every host luminosity was positive, which catches st_lum stored
unconverted and nothing else: converted as 10^-x, Proxima Cen b came out 662 L☉ and TRAPPIST-1 e
1 808, and as e^x Proxima 0.0595, 39 times too bright, and in both runs the ETL completed with
every check passing. The value is printed as measured on host cards and warms their planets.
validateExoplanets now asks two hosts for the luminosity their st_lum gives, within 10 %: Proxima
Cen b's, st_lum -2.821, 1.51e-3 L☉ (Ribas et al. 2017 measure 0.00151), and HD 97048 b's, st_lum
+1.602, 40.0, so a sign slip fails on both sides of the Sun. The published file has 1.5100e-3 and
40.000.

5fb0d45 placed mu2 Sco b's host by its parallax, the archive giving no sy_dist, and only the helper
was tested: with the parallax dropped at the call site the ETL still passed, 6 327 of 6 354 hosted
against a floor of 99.5 %. mu2 Sco b must now have a host.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-30 19:54:48 +02:00
co-authored by Claude Opus 5.5
parent ef2099177a
commit c8d1bbb879
+28
View File
@@ -332,6 +332,23 @@ function validateBodies(bodies: BodyRecord[]): void {
* for a few more of those, not for the matching or the additions to stop working. * for a few more of those, not for the matching or the additions to stop working.
*/ */
const MIN_HOSTED_SHARE = 0.995; const MIN_HOSTED_SHARE = 0.995;
/**
* Planets whose host only one path places, which the share above has room to lose: mu2 Sco b's
* archive rows give a parallax and no distance, and without the parallax it had no star — 6 327
* hosted instead of 6 328, and every check passed.
*/
const REQUIRED_HOSTED_PLANETS = ['mu2 Sco b'];
/**
* Two hosts' luminosities as the archive gives them, one either side of the Sun's: st_lum −2.821
* for Proxima (Ribas et al. 2017 measure 1.51×10⁻³ L☉) and +1.602 for HD 97048. That every
* luminosity is positive catches st_lum stored unconverted and nothing else: read as 10^−x or e^x,
* Proxima came out 662 or 0.0595 L☉ and every check passed.
*/
const LUMINOSITY_ANCHORS = [
{ planet: 'Proxima Cen b', luminositySolar: 1.51e-3 },
{ planet: 'HD 97048 b', luminositySolar: 40 }
];
const LUMINOSITY_ANCHOR_TOLERANCE = 0.1;
/** /**
* The share of planets whose host's radius and temperature the archive gives, which is what * The share of planets whose host's radius and temperature the archive gives, which is what
@@ -385,6 +402,10 @@ function validateExoplanets(exoplanets: ExoplanetRecord[], stars: StarRecord[]):
crossReferenced >= exoplanets.length * MIN_HOSTED_SHARE, crossReferenced >= exoplanets.length * MIN_HOSTED_SHARE,
`Only ${crossReferenced} of ${exoplanets.length} exoplanets have a host star (at least ${MIN_HOSTED_SHARE * 100} % expected) — hosts are no longer being matched or added.` `Only ${crossReferenced} of ${exoplanets.length} exoplanets have a host star (at least ${MIN_HOSTED_SHARE * 100} % expected) — hosts are no longer being matched or added.`
); );
for (const name of REQUIRED_HOSTED_PLANETS) {
const planet = exoplanets.find((candidate) => candidate.name === name);
assertCondition(planet?.hostStarId != null, `${name} has no host star — a host the archive places by its parallax alone is no longer placed.`);
}
const withRadius = exoplanets.filter((exoplanet) => exoplanet.hostStarRadiusSolar !== undefined).length; const withRadius = exoplanets.filter((exoplanet) => exoplanet.hostStarRadiusSolar !== undefined).length;
const withTemperature = exoplanets.filter((exoplanet) => exoplanet.hostStarTemperatureK !== undefined).length; const withTemperature = exoplanets.filter((exoplanet) => exoplanet.hostStarTemperatureK !== undefined).length;
@@ -404,6 +425,13 @@ function validateExoplanets(exoplanets: ExoplanetRecord[], stars: StarRecord[]):
luminosities.every((luminosity) => Number.isFinite(luminosity) && luminosity! > 0), luminosities.every((luminosity) => Number.isFinite(luminosity) && luminosity! > 0),
'A host luminosity is not a positive number — st_lum is no longer converted from its logarithm.' 'A host luminosity is not a positive number — st_lum is no longer converted from its logarithm.'
); );
for (const anchor of LUMINOSITY_ANCHORS) {
const luminosity = exoplanets.find((exoplanet) => exoplanet.name === anchor.planet)?.hostStarLuminositySolar;
assertCondition(
luminosity !== undefined && Math.abs(luminosity / anchor.luminositySolar - 1) <= LUMINOSITY_ANCHOR_TOLERANCE,
`${anchor.planet}'s host is ${luminosity} L☉, not the ${anchor.luminositySolar} its st_lum gives — st_lum is not being read as the base-10 logarithm it is.`
);
}
console.log(` ${withRadius}/${exoplanets.length} carry their host's radius, ${withTemperature} its temperature, ${luminosities.length} its luminosity.`); console.log(` ${withRadius}/${exoplanets.length} carry their host's radius, ${withTemperature} its temperature, ${luminosities.length} its luminosity.`);
let worstOffsetMas = 0; let worstOffsetMas = 0;