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:
@@ -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,
|
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,
|
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
|
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
|
## Layout
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ describe('classifyOpenNgcType', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('groups nebulae, remnants and cluster-with-nebulosity as nebulae', () => {
|
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');
|
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', () => {
|
it('rejects missing or unknown types', () => {
|
||||||
for (const type of ['', ' ', 'wat', undefined, null]) {
|
for (const type of ['', ' ', 'wat', undefined, null]) {
|
||||||
expect(classifyOpenNgcType(type)).toBeNull();
|
expect(classifyOpenNgcType(type)).toBeNull();
|
||||||
|
|||||||
@@ -38,7 +38,10 @@ const MAX_PARALLAX_DISTANCE_PC = 100000;
|
|||||||
/**
|
/**
|
||||||
* OpenNGC object-type codes grouped into the three kinds the backdrop distinguishes.
|
* OpenNGC object-type codes grouped into the three kinds the backdrop distinguishes.
|
||||||
* Codes not listed here (`Dup` duplicates, `NonEx` non-existent entries, plain stars `*`,
|
* 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>> = {
|
const KIND_BY_OPENNGC_TYPE: Readonly<Record<string, DeepSkyKind>> = {
|
||||||
// Galaxies, and multi-galaxy systems.
|
// Galaxies, and multi-galaxy systems.
|
||||||
@@ -52,7 +55,6 @@ const KIND_BY_OPENNGC_TYPE: Readonly<Record<string, DeepSkyKind>> = {
|
|||||||
EmN: 'nebula',
|
EmN: 'nebula',
|
||||||
RfN: 'nebula',
|
RfN: 'nebula',
|
||||||
Neb: 'nebula',
|
Neb: 'nebula',
|
||||||
DrkN: 'nebula',
|
|
||||||
SNR: 'nebula',
|
SNR: 'nebula',
|
||||||
'Cl+N': 'nebula',
|
'Cl+N': 'nebula',
|
||||||
// Star clusters and associations.
|
// Star clusters and associations.
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user