Leave the dark nebulae out of the backdrop, whose sprites can only add light

c01d3ec read OpenNGC's addendum, which brought in its only two DrkN rows, C099 the Coalsack and
B033 the Horsehead; NGC.csv has none. classifyOpenNgcType mapped DrkN to 'nebula', so both were
drawn as the backdrop's nebula sprite: ff86b0, additive, at the faintest opacity and the 70 pc
minimum size, about 1.6° across. The review measured it adding up to +59 in red over the Coalsack
beside Crux, where the sky has a dark hole, and darkening no pixel, as an additive sprite cannot.

DrkN is now among the codes dropped, with the reason beside the map. fetchDeepSky from cache keeps
488 objects against 490, still 107 Messier objects and every required id; README's count follows.
On :4302 the served backdrop holds 488 objects and the scene 488 sprites, neither of them C099 or
B033.

Control: DrkN mapped back to 'nebula' fails "leaves out a dark nebula, which a sprite that adds
light cannot draw" (1 of 801).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-29 21:00:31 +02:00
co-authored by Claude Opus 5.5
parent 0e9ab6ffb5
commit 1a8e734651
4 changed files with 11 additions and 5 deletions
+1 -1
View File
@@ -283,7 +283,7 @@ the line of sight is always known precisely, and the objects are drawn as a fixe
backdrop shell where true distance would be unusable anyway. `distancePc` is optional metadata,
derived from parallax for galactic objects or the Hubble law for genuinely distant galaxies,
and left `null` — with its `distanceMethod` — whenever neither is trustworthy. 340 of
the 490 cataloged objects get a distance; the rest honestly report none.
the 488 cataloged objects get a distance; the rest honestly report none.
## Layout
+5 -1
View File
@@ -18,7 +18,7 @@ describe('classifyOpenNgcType', () => {
});
it('groups nebulae, remnants and cluster-with-nebulosity as nebulae', () => {
for (const type of ['PN', 'HII', 'EmN', 'RfN', 'Neb', 'DrkN', 'SNR', 'Cl+N']) {
for (const type of ['PN', 'HII', 'EmN', 'RfN', 'Neb', 'SNR', 'Cl+N']) {
expect(classifyOpenNgcType(type)).toBe('nebula');
}
});
@@ -36,6 +36,10 @@ describe('classifyOpenNgcType', () => {
}
});
it('leaves out a dark nebula, which a sprite that adds light cannot draw', () => {
expect(classifyOpenNgcType('DrkN')).toBeNull();
});
it('rejects missing or unknown types', () => {
for (const type of ['', ' ', 'wat', undefined, null]) {
expect(classifyOpenNgcType(type)).toBeNull();
+4 -2
View File
@@ -38,7 +38,10 @@ const MAX_PARALLAX_DISTANCE_PC = 100000;
/**
* OpenNGC object-type codes grouped into the three kinds the backdrop distinguishes.
* Codes not listed here (`Dup` duplicates, `NonEx` non-existent entries, plain stars `*`,
* doubles `**`, `Nova`, `Other`) are not deep-sky objects and are dropped.
* doubles `**`, `Nova`, `Other`) are not deep-sky objects and are dropped. Nor is `DrkN`, a dark
* nebula, drawn: it is dust in front of the light behind it, and the backdrop's sprites can only
* add light — the Coalsack and the Horsehead, which OpenNGC's addendum brought in, glowed pink
* where the sky has a hole.
*/
const KIND_BY_OPENNGC_TYPE: Readonly<Record<string, DeepSkyKind>> = {
// Galaxies, and multi-galaxy systems.
@@ -52,7 +55,6 @@ const KIND_BY_OPENNGC_TYPE: Readonly<Record<string, DeepSkyKind>> = {
EmN: 'nebula',
RfN: 'nebula',
Neb: 'nebula',
DrkN: 'nebula',
SNR: 'nebula',
'Cl+N': 'nebula',
// Star clusters and associations.
File diff suppressed because one or more lines are too long