Brighter stars, second step: point spread 1.5 arcmin, contrast exponent 0.8; the test now asks for a visible lift (20 of 255) at the vertices, not just a drawn star

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-20 21:15:25 +01:00
commit 53910b1e5b
2 changed files with 5 additions and 3 deletions

View file

@ -143,7 +143,9 @@ describe('the stars under the figures', () => {
const a = onScreen(cam, q.azimuth, q.elevation);
if (a.x < 0 || a.x > 1 || a.y < 0 || a.y > 0.8) return;
vertices += 1;
if (nb.stars.some((s) => Math.hypot((s.x - a.x) * 1100, (s.y - a.y) * 619) < 4)) carried += 1;
// Visible: the star's centre is at least 20 of 255 lighter than the sky behind it in some channel.
const lift = (c: string, d: string) => Math.max(...c.match(/\d+/g)!.map((v, i) => Number(v) - Number(d.match(/\d+/g)![i])));
if (nb.stars.some((s) => Math.hypot((s.x - a.x) * 1100, (s.y - a.y) * 619) < 4 && lift(s.fill, s.cover) >= 20)) carried += 1;
})
);
expect(vertices).toBeGreaterThan(20);

View file

@ -18,14 +18,14 @@ export const SUN_LUX = luxOfMagnitude(SUN_V);
/** The look of the night's bodies. EYEBALLED knobs: the operator tunes these by eye. */
export const NIGHT_LOOK = {
/** Radius of the point spread a star's light is spread over, arcminutes: smaller is brighter and more of them saturate. */
starPsfArcmin: 2.5,
starPsfArcmin: 1.5,
/** Atmospheric extinction in magnitudes per air mass (V band, a clean low site is 0.2). */
extinctionPerAirmass: 0.2,
/**
* Display contrast of a star over its sky is the physical contrast to this power (1 = physical): the eye and a camera cannot show a
* mag 0 star at the 1e4:1 it has over a dark sky. Brightest stars still saturate; the faintest keep a little.
*/
starContrastExp: 0.65,
starContrastExp: 0.8,
/** The same for the moon's disc (physical contrast is 1e7 and more). */
moonContrastExp: 0.3,
/** Visible radius of a star, CSS px: `base` for the faintest, plus `perMag` for each magnitude brighter than 5.5. */