Commit Graph
33 Commits
Author SHA1 Message Date
wyj 2a0197229a Feat: Write mesh overlay as a separate <stem>_mesh image
--draw-mesh no longer modifies the primary render.  The clean HDR FITS and
tone-mapped image are written first, then the final image-plane mesh is
overlaid in place on the already-consumed HDR buffer and saved as a
<stem>_mesh sibling.  This applies uniformly to single-frame, movie-frame,
and imported lens-map renders, with derived paths validated before catalog,
spacetime, and render initialization.

Dummy PSF backends still write nothing and report ignoring --draw-mesh.  The
reference-image target now uses the configured image extension so the
ENABLE_PNG=0 test path passes, and the CLI tests cover clean-main identity,
sibling naming, PATH_MAX overflow, and zero-tolerance HDR comparison.

README, README.zh-CN, and usage.md describe the new naming; the mesh reference
asset is renamed to match.
2026-09-26 17:01:25 -04:00
wyj e4d093a9fe Doc: Record 4K fast-mode accuracy limits and error distribution
Add the production-density 4K Galactic-center comparison to the 2026-09-25 benchmark record, including the per-image error decomposition, and refine the fast-mode positioning in usage.md, the design document, and README.

- Document that nearest/bilinear deposit accuracy is set by the deposit mode and N rather than output resolution, and that the still-frame error is dominated by a small number of resolved bright cores while the flux-dominant faint texture is much better than the global relative L2.
- Add the temporal-coherence caveat: nearest deposition jumps by 1/N output pixel per axis across supersampled-cell boundaries, so fast mode is not qualified as a temporally coherent movie path; bilinear removes the centroid jump but broadens the profile.
- Add scripts/fast_mode_error_decomposition.py, which ranks the largest |fast-base| RGB samples and partitions the error by a disjoint base-value range.
2026-09-26 01:02:41 -04:00
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 5eccc31c99 Doc: refresh Galactic-center reference image and benchmark links
Replace the artifact-affected Schwarzschild image with the corrected 4K render. Link both READMEs to the paired CPU/HIP benchmark and clarify that this run had no PSF wing clipping or direct fallbacks.
2026-09-06 22:02:39 -04:00
wyj e1ec480669 HIP: accelerate PSF accumulation and restore parallel producers
Cooperate across 32 lanes per PSF and use two completion-protected staging slots with complete batch timing. Restore coarse OpenMP event production while serializing shared GPU submissions and direct fallback boundaries.

Add bounded benchmarks, streaming and renderer regressions, and preserve validation evidence and ownership documentation.
2026-09-06 21:38:53 -04:00
wyj b69c9cfd45 Feat: generate freely falling Schwarzschild camera tracks
Integrate timelike geodesics and Fermi-Walker tetrads in ingoing Kerr-Schild coordinates, sampled at a configurable proper-time cadence.

Add movie-track-samples to preserve CSV events as frames. Document usage and singularity guards, and cover analytic orbits, transport convergence, sampling, and CSV rendering.
2026-09-06 05:56:51 -04:00
wyj 6ae223a642 Feat: support general single-frame cameras and add a near-horizon example 2026-09-06 04:00:21 -04:00
wyj 94149d75e4 Doc: reorganize bilingual READMEs and build guide with reference renders 2026-09-06 02:03:50 -04:00
wyj a18ebfbf1a HIP: record direct atomic PSF timings 2026-09-05 22:13:14 -04:00
wyj 7a80086f63 Feat: add initial HIP PSF backend 2026-09-05 04:23:57 -04:00
wyj ab56e23fc9 Doc: document reusable lens maps 2026-09-03 20:58:20 -04:00
wyj b2ac642de7 Fix: correct ICRS camera orientation 2026-08-31 00:13:37 -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 ff2ba43333 Output: simplify HDR output naming 2026-08-30 02:35:09 -04:00
wyj 19f3a91b7f Makefile: build all backends with optional HDR output 2026-08-30 02:29:41 -04:00
wyj e47005ea6b Optics: bound cache-only bright PSF splats 2026-08-29 20:02:45 -04:00
wyj 6cb4184b54 Output: expand verbose render progress 2026-08-29 16:26:44 -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 d5d21c7659 Output: write HDR FITS with camera metadata 2026-08-28 19:56:07 -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 b0fdf1faca Output: default to PNG with PPM fallback 2026-08-27 04:25:45 -04:00
wyj 83dc05fd52 Observer: parameterize Schwarzschild camera view 2026-08-27 04:12:17 -04:00
wyj d3522886f0 Aggregate movie rays through time slabs 2026-08-26 00:14:26 -04:00
wyj 2a00d7a2d1 Recalibrate default test catalog exposure 2026-08-26 00:00:52 -04:00
wyj 5e8286675d Use lower default exposure for movie tests 2026-08-25 23:58:20 -04:00
wyj c8b321a62a Add observer track PNG movie mode 2026-08-25 22:56:10 -04:00
wyj d30f9ac56c init 2026-08-25 22:45:43 -04:00