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(ν)fromk(ν)via a singly-subtracted Kramers–Kronig relation.This variant is JIT-friendly: the
KKGridCacheis passed explicitly, avoiding Python-side cache lookups. Grid-dependent trapezoid weights are reused via the cache.- Parameters:
- nu
ndarray, shape (N,) Wavenumber grid (strictly increasing), e.g. cm⁻¹.
- k_nu
ndarray, shape (N,) Extinction coefficient on the wavenumber grid (clipped to be non-negative).
- nu_ref
ndarray Reference wavenumber used to anchor the subtraction term.
- n_ref
ndarray Real refractive index at
nu_ref.- cache
KKGridCache Precomputed grid quantities for this
nugrid (e.g., trapezoid weights).
- nu
- Returns:
- n_nu
ndarray, shape (N,) Real refractive index on the wavenumber grid.
- n_nu