kk_n_from_k_wavenumber_cached#

exo_skryer.kk_schemes.kk_n_from_k_wavenumber_cached(nu: Array, k_nu: Array, nu_ref: Array, n_ref: Array, cache: KKGridCache) Array[source]#

Compute n(ν) from k(ν) via a singly-subtracted Kramers–Kronig relation.

This variant is JIT-friendly: the KKGridCache is passed explicitly, avoiding Python-side cache lookups. Grid-dependent trapezoid weights are reused via the cache.

Parameters:
nundarray, shape (N,)

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

k_nundarray, shape (N,)

Extinction coefficient on the wavenumber grid (clipped to be non-negative).

nu_refndarray

Reference wavenumber used to anchor the subtraction term.

n_refndarray

Real refractive index at nu_ref.

cacheKKGridCache

Precomputed grid quantities for this nu grid (e.g., trapezoid weights).

Returns:
n_nundarray, shape (N,)

Real refractive index on the wavenumber grid.