prepare_chemistry_kernel#

exo_skryer.build_chem.prepare_chemistry_kernel(cfg, chemistry_kernel, opacity_schemes: dict)[source]#

Prepare and validate chemistry kernel with inferred species.

This function infers the required trace species from the opacity configuration, validates that necessary parameters are present, and returns an optimized chemistry kernel ready for use in the forward model.

Parameters:
cfgconfig object

Configuration object containing params and opac settings.

chemistry_kernelcallable

The base chemistry kernel function from vert_chem (e.g., constant_vmr, CE_fastchem_jax, CE_rate_jax).

opacity_schemesdict

Dictionary containing opacity scheme strings with keys: ‘line_opac’, ‘ray_opac’, ‘cia_opac’, ‘special_opac’.

Returns:
chemistry_kernelcallable

The prepared chemistry kernel, potentially optimized for JIT compilation.

trace_speciestuple of str

Tuple of trace species names inferred from the opacity configuration.