Skip to content

fix: better accuracy lanczos fourier-space interp#234

Merged
beckermr merged 3 commits intomainfrom
test-fixes-4
May 9, 2026
Merged

fix: better accuracy lanczos fourier-space interp#234
beckermr merged 3 commits intomainfrom
test-fixes-4

Conversation

@beckermr
Copy link
Copy Markdown
Collaborator

@beckermr beckermr commented May 9, 2026

jax-galsim uses a lower-accuracy akima interpolant instead of a cubic spline when interpolating the k-space table for the fourier transform of the Lanczos interpolant. This causes a loss in accuracy. For jax-galsim, I am increasing the number of points being interpolated by 2.3x. The cost of computing the table comes at compile time, and it is cached on the CPU side, so we should not see big performance losses in most cases.

xref: GalSim-developers/GalSim-for-JAX-GalSim-Testing#9

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 9, 2026

Merging this PR will degrade performance by 33.32%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 1 regressed benchmark
✅ 35 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation test_benchmarks_lanczos_interp[kval-no_conserve_dc-run] 291.2 µs 436.8 µs -33.32%

Comparing test-fixes-4 (0bf5eee) with main (1e20520)

Open in CodSpeed

@beckermr beckermr marked this pull request as ready for review May 9, 2026 12:19
@beckermr beckermr merged commit 1da8021 into main May 9, 2026
6 of 8 checks passed
@beckermr beckermr deleted the test-fixes-4 branch May 9, 2026 12:23
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