compute_kk_grid_cache#

exo_skryer.registry_cloud.compute_kk_grid_cache(nu: Array) KKGridCache[source]#

Precompute grid-dependent quantities for Kramers-Kronig relation.

This caches only O(N) quantities (trapezoid weights) to avoid memory issues. The O(N²) alpha_inv matrix is NOT cached - it’s computed on-the-fly in the KK function, which is still fast with JAX and avoids huge memory usage.

Parameters:
nuarray (N,)

Wavenumber grid, strictly increasing (e.g., cm⁻¹)

Returns:
cacheKKGridCache

Named tuple containing: - nu: original grid (JAX array, float64) - trap_weights: (N,) weights for trapezoid integration (JAX array, float64)