List stars in search and routes by the type their colour gives them, and say where archive positions come from
5333be6gave the star card an estimated type for the 383 695 stars the ETL files as "Unknown", but search rows, the route search index and the current-star route option still printed that literal: TRAPPIST-1 read "STAR · UNKNOWN" in search beside "Spectral type ~M8, from colour" on its card, audit #17's own symptom. spectralClassification (spectral.ts) now gives the catalogue's type, else the colour's marked "~", else nothing, and all three and the card's subtitle use it; a search row with nothing to add prints its kind alone rather than a trailing " · ". The neighbourhood note still read "Positions from measured parallaxes" after4c8e4a0placed 3 277 stars at the Exoplanet Archive's sy_dist, 343 of them without a usable parallax and 281 of those past 1 kpc — microlensing hosts such as OGLE-2005-BLG-390L at 6.6 kpc, from a lensing model. positionsNote now says so, with the count. Neither the note nor the census subtitle (audit #16) had a test: putting back "Hipparcos · Yale Bright Star · Gliese" passed all 775. In the app on :4302: the note reads "Positions from measured parallaxes, and for the 3,277 planet hosts only the NASA Exoplanet Archive places, from its distances. Grid marks the galactic plane through the Sun."; search reads "TRAPPIST-1 STAR · ~M8", "OGLE-2005-BLG-390L STAR", "Sirius STAR · A0M"; TRAPPIST-1's route option has subtitle "~M8". The scene spec gains an archive-placed fixture star. Controls, each failing its named test: the search row printing the raw type, keeping the separator with nothing after it, the route index and the current-star option printing the raw type, the note back to parallaxes only, the subtitle back to the old catalogue list (1 of 797 each), the note never counting the archive (2 of 797), and the classification without its estimate (3 of 797). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,7 @@ import {
|
||||
galacticCentrePositionPc,
|
||||
galacticToEquatorial,
|
||||
} from '../../shared/astro/galaxy';
|
||||
import { spectralClassification } from '../../shared/astro/spectral';
|
||||
import { blackbodyColor } from '../../shared/astro/stellar';
|
||||
import { DataLoaderService } from '../../core/data/data-loader.service';
|
||||
import { EngineService, SceneCamera } from '../../core/engine/engine.service';
|
||||
@@ -84,7 +85,7 @@ import { JumpLinkRenderer } from './jump-link-renderer';
|
||||
import { ReservedBox, ringPlacement } from './label-ring';
|
||||
import { LabeledPoint, LabelSide, StarLabelOverlay } from './star-label-overlay';
|
||||
import { SystemOrbitsRenderer } from './system-orbits-renderer';
|
||||
import { catalogueCensus, starReadouts, starSubtitle } from './star-readouts';
|
||||
import { catalogueCensus, positionsNote, starReadouts, starSubtitle } from './star-readouts';
|
||||
|
||||
/** Radius, in CSS pixels, below which a body in the system view is scaled up to be seen at all. */
|
||||
const MIN_MARKER_PIXELS = 3;
|
||||
@@ -572,6 +573,7 @@ export class GalaxySystemSceneComponent implements AfterViewInit, OnDestroy {
|
||||
private stars: readonly StarRecord[] = [];
|
||||
/** The neighbourhood's subtitle: what the catalogue holds, by the catalogue describing it. */
|
||||
private catalogueCensus = '';
|
||||
private positionsNote = '';
|
||||
private starsById = new Map<number, StarRecord>();
|
||||
private bodies: readonly BodyRecord[] = [];
|
||||
private exoplanets: readonly ExoplanetRecord[] = [];
|
||||
@@ -721,6 +723,7 @@ export class GalaxySystemSceneComponent implements AfterViewInit, OnDestroy {
|
||||
]);
|
||||
this.stars = stars;
|
||||
this.catalogueCensus = catalogueCensus(stars);
|
||||
this.positionsNote = positionsNote(stars);
|
||||
this.starsById = new Map(stars.map((star) => [star.id, star]));
|
||||
this.neighbourhood = new StarNeighbourhood(stars);
|
||||
this.routing = new RoutingClient(stars, positions, this.neighbourhood);
|
||||
@@ -730,7 +733,7 @@ export class GalaxySystemSceneComponent implements AfterViewInit, OnDestroy {
|
||||
stars.map((star) => ({
|
||||
kind: 'star' as const,
|
||||
name: star.name,
|
||||
subtitle: star.spectralType,
|
||||
subtitle: spectralClassification(star),
|
||||
starId: star.id,
|
||||
})),
|
||||
),
|
||||
@@ -1848,9 +1851,7 @@ export class GalaxySystemSceneComponent implements AfterViewInit, OnDestroy {
|
||||
// The one thing the field itself cannot show: which of those points can be flown into.
|
||||
{ label: 'Systems', value: `${this.enterableSystems}` },
|
||||
]);
|
||||
this.hudNote.set(
|
||||
'Positions from measured parallaxes. Grid marks the galactic plane through the Sun.',
|
||||
);
|
||||
this.hudNote.set(this.positionsNote);
|
||||
}
|
||||
|
||||
/** Where the current press started, so a drag can be told apart from a click. */
|
||||
@@ -1959,7 +1960,7 @@ export class GalaxySystemSceneComponent implements AfterViewInit, OnDestroy {
|
||||
readonly currentStarOption = computed<RouteStarOption | null>(() => {
|
||||
const starId = this.navigationStore.selectedStarId();
|
||||
const star = starId === null ? undefined : this.starsById.get(starId);
|
||||
return star ? { id: star.id, name: star.name, subtitle: star.spectralType } : null;
|
||||
return star ? { id: star.id, name: star.name, subtitle: spectralClassification(star) } : null;
|
||||
});
|
||||
|
||||
onRouteQuery(query: string): void {
|
||||
|
||||
Reference in New Issue
Block a user