Commit Graph
20 Commits
Author SHA1 Message Date
wyj 3deebfb2fa Feat: Add --fast-mode supersampled point-source accumulation
Add an optional CPU preview path that deposits each point-source image as a
supersampled delta and resolves the whole frame with one global Moffat
convolution plus an N x N box average, instead of splatting a per-event PSF.

- optics: FastPsfAccumulator builds the pixel-area-integral kernel of the
  target Moffat at the supersampled scale (width N*alpha, same beta).  The
  1/N^2 box average then reproduces the final pixel-area integral, so the
  requested FWHM and beta are preserved without renormalisation.  Deposits are
  per-cell atomic adds; resolve accumulates into the caller's HDR buffer.
- frame: fast branch in frame_splat_catalog with one shared supersampled
  buffer and a single resolve per frame; the accumulator is reused across
  movie frames and built from the map dimensions on lens-map import.
- main: --fast-mode, --fast-supersample N (1..8, default 2) and
  --fast-deposit nearest|bilinear (default nearest).  CPU-only and rejected in
  the HIP/dummy backends; --psf-min-y still applies per event while
  --max-cache-psf-flux does not.
- The deposition scheme was chosen by scripts/fast_mode_deposit_error.py:
  nearest keeps the PSF shape exactly with <= 0.5/N px position quantization;
  bilinear keeps the exact centroid but broadens FWHM and beta.  Recorded in
  benchmarks/fast_mode_deposit_2026-09-18.md.
- tests/test_frame.c covers fast nearest vs the direct evaluator at the snapped
  centre, flux conservation, bilinear centroid, min-Y discard, frame plumbing,
  and HDR accumulation onto a non-zero background.
- benchmarks/fast_mode_cpu_2026-09-18.md records a ~10x speedup on the 2MASS
  galactic-centre field with small tone-mapped differences.
2026-09-24 01:36:25 -04:00
wyj d2a901cab1 Feat: Add CSV CIE 1931 blackbody LUT backend
Replace the in-tree Wyman analytic CIE fit with a repository CIE 1931
2-degree LUT derived from the 360-830 nm, 1 nm-linear CSV reference. The
GRBBLUT3 table stores 1024 uniform log(T) XYZ nodes over
[670.146556, 101408.88] K with four-point cubic Lagrange interpolation, and
the same CSV reference supplies a three-term Rayleigh-Jeans form above the
table and an inverse-temperature/log-XYZ crossover with channel-specific
endpoint forms below it. The loader validates the header and payload
checksum and rejects legacy formats and runtime generation.

Initialize the backend in the renderer, frame test, and PSF capture tool so
the new default is active wherever colors are produced.
2026-09-12 15:29:33 -04:00
wyj 265d7b95d5 Fix: reject invalid inverse lens-map weights
Check spherical area weight sums against a fixed 1e-8 tolerance and normalize accepted weights before interpolation. Skip invalid images in both catalog paths.

Add a thin-triangle regression for both parities, document the measured tolerance margin, and refresh HDR fixtures with strict comparisons restored.
2026-09-06 17:47:09 -04:00
wyj 2a03cbf724 Frame: buffer cached PSF events per worker 2026-09-05 03:06:46 -04:00
wyj 1ee3a8cc26 Feat: add reusable lens map files 2026-09-03 19:46:05 -04:00
wyj e8deb1ff19 Optics: add PSF luminance cutoff 2026-08-30 15:10:14 -04:00
wyj 8662064044 Optics: parameterize PSF relative tail 2026-08-30 15:05:40 -04:00
wyj 09923b9b18 Frame: localize shadow boundary refinement 2026-08-29 22:58:04 -04:00
wyj e47005ea6b Optics: bound cache-only bright PSF splats 2026-08-29 20:02:45 -04:00
wyj d1320fffc4 Revert: remove triangle quality refinement 2026-08-29 03:26:17 -04:00
wyj 451b700b32 Frame: guard sliver-producing refinement splits 2026-08-29 02:06:06 -04:00
wyj b95c6579bd Frame: gate fold refinement by Jacobian 2026-08-29 01:17:47 -04:00
wyj 4c575fa8b5 Frame: refine critical lens regions 2026-08-29 00:44:20 -04:00
wyj 48dcf4e707 Frame: add adaptive mesh refinement 2026-08-28 23:06:53 -04:00
wyj 5fd8e3819d Spacetime: free analytic render worker count 2026-08-28 17:20:00 -04:00
wyj 9b23f3717e Output: Add render progress logging 2026-08-28 16:19:01 -04:00
wyj 80b891d2c8 Optics: cache pixel-area Moffat kernels 2026-08-28 13:53:06 -04:00
wyj 457c0728b4 Catalog: parallelize all-sky tile prefetch 2026-08-27 03:53:45 -04:00
wyj 2a00d7a2d1 Recalibrate default test catalog exposure 2026-08-26 00:00:52 -04:00
wyj d30f9ac56c init 2026-08-25 22:45:43 -04:00