Skip to content

fix(milliquas): disable colour K-correction that clamped quasars to blue#282

Merged
rulkens merged 1 commit into
mainfrom
fix/milliquas-colour-kperz-clamp
Jun 7, 2026
Merged

fix(milliquas): disable colour K-correction that clamped quasars to blue#282
rulkens merged 1 commit into
mainfrom
fix/milliquas-colour-kperz-clamp

Conversation

@rulkens
Copy link
Copy Markdown
Owner

@rulkens rulkens commented Jun 7, 2026

Problem

Every Milliquas quasar rendered as the same pure blue (read by the galaxy colormap as "blue star-forming").

Root cause

pickColourIndex applies a redshift K-correction restCI = observedCI − kPerZ·z, clamped to [0, 2], where the blue→white→red ramp spans only 2.0. Milliquas's colourSpec used kPerZ: 0.5, and quasar redshifts run z ≈ 1–7, so the correction subtracted 0.5–3.5 ramp units — more than the observed B−R colour of nearly every quasar. The result clamped the whole catalog to the t=0 blue floor regardless of its real colour.

Empirical check against pickColourIndex (same colour, varying z):

B−R z ramp t
1.07 0.5 0.820
1.07 1.5 0.320
1.07 3.0 0.000
0.50 2.0 0.000

The same galaxy collapses from t=0.82 to t=0.00 purely by moving it to higher z. kPerZ=0.5 was tuned for low-z galaxy surveys (z≲0.1, negligible correction); applied to a quasar catalog it becomes the dominant term.

Fix

Set kPerZ: 0 for Milliquas so observed B−R maps straight to the ramp and the genuine blue→red AGN spread survives. A redshift-aware quasar correction belongs in a dedicated bias-correction subsystem with its own QLF, not bolted onto the galaxy ramp.

Note: the catalog still skews blue after this change — quasars genuinely are blue. A follow-up will look at giving AGN their own colormap rather than reusing the galaxy star-forming↔elliptical ramp (the deeper semantic mismatch).

Verification

  • npm run typecheck clean
  • colourIndex + buildPointInterleavedBuffer tests pass (17)
  • Colour-index is baked at runtime in the browser, so this takes effect on HMR — no .bin rebuild / R2 re-sync needed.

🤖 Generated with Claude Code

The colour-index K-correction subtracts kPerZ·z in ramp-position units,
where the whole blue→white→red ramp spans only 2.0. Milliquas redshifts
run z ≈ 1–7, so kPerZ=0.5 subtracted 0.5–3.5 ramp units — more than the
observed B−R colour of nearly every quasar — pinning the entire catalog
to the t=0 blue floor regardless of its real colour.

Set kPerZ=0 so observed B−R maps straight to the ramp and the genuine
blue→red AGN spread survives. A redshift-aware quasar correction belongs
in a dedicated bias-correction subsystem with its own QLF, not here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rulkens rulkens merged commit 35c4e53 into main Jun 7, 2026
1 of 2 checks passed
@rulkens rulkens deleted the fix/milliquas-colour-kperz-clamp branch June 7, 2026 21:11
rulkens added a commit that referenced this pull request Jun 7, 2026
…ow-up (#283)

The clamp half shipped in #282 (kPerZ=0). What remains is the deeper
semantic mismatch — quasars reuse the galaxy star-forming↔elliptical
ramp where "blue" carries the wrong meaning. Capture the three encoding
directions (AGN ramp / redshift / class byte) for a future brainstorm.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant