Say a type estimated from a colour read off the archive's temperature came from the temperature
23547de gave archive hosts measured in no colour a B-V read off the dwarf sequence at their st_teff,
and the card's Colour row says so, but the subtitle then estimated a type from that colour and
said "from colour". 30 of the 54 flagged stars read that way: PSR J1719-1438, a millisecond pulsar
whose only input is st_teff 4 500 K, read "Spectral type ~K5, from colour" beside "B-V 1.13, from
its temperature"; DP Leo ~B7, ZTF J1828+2308 ~B5, ZTF J1230-2655 ~A0.
The subtitle now ends ", from its temperature" for those 30. In the running app the pulsar's card
reads "Spectral type ~K5, from its temperature" above "B-V 1.13, from its temperature". The type
itself is still the dwarf the temperature matches, which a pulsar is not; this only stops it
naming a measurement that does not exist.
Control: ignoring the flag fails "says an estimate came from the temperature where the colour
was read off it" alone.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -130,6 +130,12 @@ describe('starSubtitle', () => {
|
||||
expect(starSubtitle(GAIA_STAR)).toBe('Spectral type ~K5, from colour');
|
||||
});
|
||||
|
||||
it('says an estimate came from the temperature where the colour was read off it', () => {
|
||||
// PSR J1719-1438: no magnitude in any colour, st_teff 4 500 K, B−V 1.13 off the dwarf sequence.
|
||||
const pulsar = { ...GAIA_STAR, source: 'exoplanet-archive', colorIndex: 1.128, colorSystem: 'B-V', colorFromTemperature: true } as const;
|
||||
expect(starSubtitle(pulsar)).toBe('Spectral type ~K5, from its temperature');
|
||||
});
|
||||
|
||||
it('prints nothing rather than "Unknown" when there is neither', () => {
|
||||
expect(starSubtitle({ ...GAIA_STAR, colorIndex: null, colorSystem: undefined })).toBe('');
|
||||
});
|
||||
|
||||
@@ -21,11 +21,14 @@ export function describingCatalogue(star: StarRecord): string {
|
||||
/**
|
||||
* What the readout says a star is: the catalogue's classification, or — for the 83 % of stars
|
||||
* that have none, every Gaia star among them — the dwarf type its colour matches, marked as an
|
||||
* estimate. Empty with neither, rather than the ETL's literal "Unknown".
|
||||
* estimate. Empty with neither, rather than the ETL's literal "Unknown". Where the colour was itself
|
||||
* read off the archive's temperature, the estimate says so: 30 archive hosts measured in no colour
|
||||
* read "~X, from colour", PSR J1719-1438, a pulsar the archive gives 4 500 K, "~K5, from colour".
|
||||
*/
|
||||
export function starSubtitle(star: StarRecord): string {
|
||||
const classification = spectralClassification(star);
|
||||
return !classification ? '' : `Spectral type ${classification}${classification.startsWith('~') ? ', from colour' : ''}`;
|
||||
const basis = star.colorFromTemperature ? ', from its temperature' : ', from colour';
|
||||
return !classification ? '' : `Spectral type ${classification}${classification.startsWith('~') ? basis : ''}`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user