API#
This is the full API documentation for Exo_Skryer.
Reference/API#
exo_skryer.aux_functions Module#
aux_functions.py#
Functions#
|
Piecewise Cubic Hermite Interpolating Polynomial (PCHIP). |
|
Generate Latin hypercube samples in the unit hypercube [0, 1)^n_dim. |
|
JAX-compatible composite Simpson integrator, similar to scipy.integrate.simpson. |
|
Composite Simpson integration for padded arrays with non-uniform spacing. |
exo_skryer.build_chem Module#
build_chem.py#
Functions#
|
|
|
|
|
Return CLR parameter keys for each trace species. |
|
|
|
Validate that abundance parameters are present for CLR mode. |
|
Convert CLR posterior samples to physical VMR (and log10 VMR) columns. |
|
Prepare and validate chemistry kernel with inferred species. |
|
Load NASA-9 thermo coefficients if RateJAX chemistry requires it. |
|
Initialise and cache the FastChem 5D grid chemistry backend if required. |
|
Initialise and cache the element-potentials chemistry backend if required. |
|
Initialise the global atmodeller |
|
Initialise the FastChem 5D grid and quench species list for quench_approx. |
exo_skryer.build_model Module#
build_model.py#
Functions#
|
Build a JIT-compiled forward model for atmospheric retrieval. |
exo_skryer.build_opacities Module#
build_opacities.py#
Functions#
|
|
|
|
|
|
|
|
|
|
|
|
Return True if cloud n,k arrays have been cached. |
|
Classes#
|
|
|
|
|
|
|
exo_skryer.data_constants Module#
data_constants.py#
exo_skryer.ck_mix_PRAS Module#
ck_mix_PRAS.py#
Functions#
|
exo_skryer.ck_mix_RORR Module#
ck_mix_RORR.py#
Functions#
|
Mix correlated-k tables across species using RORR. |
exo_skryer.help_io Module#
help_io.py#
Functions#
|
Convert {param: array} mapping into ArviZ InferenceData. |
|
Save an InferenceData object to NetCDF (and optionally summary CSV + evidence JSON). |
|
Save observed data as CSV with columns: lam,dlam,y,dy,response_mode,offset_group Values are written with full float precision; NaNs are allowed. |
exo_skryer.help_print Module#
help_print.py#
Functions#
|
Format a duration in seconds into a human-readable string. |
|
Pretty-print the entire configuration (SimpleNamespace tree) in a compact, table-like format. |
exo_skryer.help_runtime Module#
help_runtime.py#
Functions#
Apply optional rc.runtime settings before importing JAX / NumPyro. |
exo_skryer.instru_convolve Module#
instru_convolve.py#
Functions#
|
Apply instrument response functions to convolve spectrum onto observational bins. |
Materialize bandpass registry arrays into a single PyTree cache (outside jit). |
|
|
Convolve spectrum using a provided bandpass cache (jit-friendly). |
exo_skryer.kernel_registry Module#
kernel_registry.py#
Central registry mapping YAML physics-scheme names to their Python kernel functions.
Adding a new module is a two-step process:
Implement the function in the appropriate
vert_*.pyoropacity_*.pyfile and make sure it is exported in that module’s__all__.Import it below and add one entry to the relevant registry dict.
Use the new key string in your YAML config — done!
Aliases (multiple keys that map to the same function) are marked with # alias.
Registry layout#
VERT_TP : temperature-pressure profile kernels
VERT_ALT : altitude / hydrostatic-structure kernels
VERT_CHEM : chemistry / VMR-profile kernels
VERT_MU : mean-molecular-weight kernels
VERT_CLOUD : cloud vertical-profile kernels
OPAC_CLOUD : cloud opacity kernels (None entry = disabled)
Functions#
|
Return the kernel for name from registry, raising a clear error on failure. |
exo_skryer.kk_schemes Module#
kk_schemes.py#
Kramers-Kronig transform functions for computing real refractive index from imaginary part using causality relations.
Functions#
|
Compute |
|
Optimized KK relation using precomputed grid quantities. |
|
Compute |
|
Compute |
exo_skryer.lxmie_mod Module#
lxmie_mod.py#
LX-MIE Mie code refactored into JAX (Kitzmann et al. 2018).
Functions#
|
JIT-safe LX-MIE Mie solver. |
|
Batched wrapper around lxmie_jax with static args bound. |
exo_skryer.mie_schemes Module#
mie_schemes.py#
Modular implementations of Mie scattering approximations and exact solutions. All schemes take the same inputs: real refractive index n, imaginary refractive index k, and size parameter x.
Functions#
|
Compute extinction and scattering efficiencies using Rayleigh approximation. |
|
Compute extinction and scattering efficiencies using Modified Anomalous Diffraction Theory (MADT. |
|
Compute extinction and scattering efficiencies using exact Mie theory. |
exo_skryer.opacity_cia Module#
opacity_cia.py#
Functions#
|
Compute collision-induced absorption (CIA) mass opacity for all molecular pairs. |
|
Return a zero CIA opacity array. |
exo_skryer.opacity_ck Module#
opacity_ck.py#
Functions#
|
Return a zero correlated-k opacity array. |
|
Compute correlated-k opacity with multi-species mixing. |
|
Compute per-species correlated-k opacities WITHOUT mixing. |
exo_skryer.opacity_cloud Module#
opacity_cloud.py#
Functions#
|
Second-stage landing function for (Q_ext, Q_sca, g). |
|
Main landing function for cloud opacity calculation. |
|
Return zero-valued cloud optical properties. |
|
Compute a globally constant grey cloud opacity. |
|
Compute grey cloud opacity masked by the vertical cloud profile. |
|
|
|
Fisher & Heng (2018) extinction-efficiency model (optics only). |
|
Compute cloud optical properties from retrieved refractive-index nodes. |
|
Additive combination of direct_nk and F18 cloud opacity. |
|
F18 continuum plus a skew-normal spectral feature with a Rayleigh size window. |
exo_skryer.opacity_line Module#
opacity_line.py#
Functions#
|
Return a zero opacity-sampling opacity array. |
|
Compute opacity-sampling mass opacity for all molecular/atomic absorbers. |
exo_skryer.opacity_ray Module#
opacity_ray.py#
Functions#
|
Return a zero Rayleigh scattering opacity array. |
|
Compute Rayleigh scattering mass opacity for the configured scatterers. |
exo_skryer.opacity_special Module#
opacity_special.py#
Functions#
|
Return a zero special-opacity array. |
|
Compute H⁻ bound-free continuum mass opacity from the special registry. |
|
Compute H⁻ free-free continuum mass opacity from the special registry. |
|
Compute the summed special-opacity contribution. |
exo_skryer.rate_jax Module#
rate_jax.py#
Functions#
|
Load NASA-9 polynomial coefficient files into the global NASA-9 cache. |
Return the cached NASA-9 thermo table. |
|
Clear the cached NASA-9 thermo table. |
|
Return |
Classes#
|
JAX-friendly NASA-9 thermo evaluator. |
|
RATE-style thermochemical equilibrium solver implemented in JAX. |
exo_skryer.read_obs Module#
read_obs.py#
Functions#
|
Resolve the observational data path from configuration. |
|
Input: path to observational data file Output: Dictionary containing observational data |
exo_skryer.read_stellar Module#
read_stellar.py#
Functions#
|
Read and interpolate the stellar spectrum onto the master grid. |
exo_skryer.read_yaml Module#
read_yaml.py#
Functions#
|
Input: path to YAML configuration file. |
exo_skryer.registry_bandpass Module#
instru_bandpass.py#
Functions#
Reset all bandpass-related registries and caches. |
|
Returns True if the bandpass registry has been initialised. |
|
|
Build the bandpass registry and JAX-ready padded arrays for each observational bin. |
Number of observational bins in the bandpass registry. |
|
Bin edges as an array of shape (n_bins, 2): [λ_low, λ_high] for each bin. |
|
Padded wavelength grid for each bin, shape (n_bins, max_len). |
|
Padded weights for each bin, shape (n_bins, max_len). |
|
Padded index array into the high-res spectrum grid, shape (n_bins, max_len). |
|
Padded linear convolution coefficients, shape (n_bins, max_len). |
|
Normalisation constants for each bin, shape (n_bins,). |
|
Valid (non-padded) length for each bin, shape (n_bins,). |
|
Boxcar detection flags for each bin, shape (n_bins,). |
Classes#
|
Holds information needed to convolve a single observational bin at runtime. |
exo_skryer.registry_cia Module#
registry_cia.py#
Functions#
|
|
Classes#
|
exo_skryer.registry_ck Module#
registry_ck.py#
Functions#
|
|
Classes#
|
exo_skryer.registry_cloud Module#
registry_cloud.py#
Functions#
Precompute grid-dependent quantities for Kramers-Kronig relation. |
|
Retrieve cached KK grid data or compute if not exists. |
|
Clear all cached KK grid data. |
|
Get statistics about the current KK cache state. |
|
|
Store cloud refractive index data in the global registry. |
Retrieve cached cloud refractive index data. |
|
Clear cached cloud refractive index data. |
|
Return True if cloud n,k arrays have been cached. |
|
|
Load a refractive index table from disk, interpolate to wl_master, and cache. |
exo_skryer.registry_line Module#
registry_line.py#
Functions#
|
|
Classes#
|
exo_skryer.registry_ray Module#
registry_ray.py#
Functions#
|
|
Classes#
|
exo_skryer.RT_alb_1D Module#
RT_alb_1D.py#
Functions#
|
Placeholder shortwave albedo RT kernel. |
exo_skryer.RT_em_1D_ck Module#
RT_em_1D_ck.py#
Functions#
|
exo_skryer.RT_em_1D_os Module#
RT_em_1D_os.py#
Functions#
|
exo_skryer.RT_em_schemes Module#
RT_em_schemes.py#
Emission radiative transfer solvers for thermal emission calculations.
This module provides multiple methods for solving the radiative transfer equation in thermal emission mode:
Alpha-EAA (solve_alpha_eaa): - Single-angle approximation with alpha-EAA scaling - Fast and accurate for most cases - Supports contribution function calculation
Toon89 (solve_toon89_picaso): - Full multi-stream Toon et al. (1989) method - 8-stream Gaussian quadrature integration - More accurate for optically thick, scattering atmospheres - Higher computational cost than EAA
All solvers use the same interface and can be selected via configuration
using the em_scheme parameter in the physics section.
Functions#
|
|
|
Toon et al. (1989) thermal emission solver with multi-stream quadrature. |
|
Get emission RT solver function by name. |
exo_skryer.RT_trans_1D_ck Module#
RT_trans_1D_ck.py#
Functions#
|
exo_skryer.RT_trans_1D_ck_trans Module#
RT_trans_1D_ck_trans.py#
Transit transmission spectrum calculation using the transmission multiplication random overlap method for correlated-k species mixing.
This module differs from RT_trans_1D_ck.py in that species are combined by multiplying their mean transmissions under the random-overlap assumption:
T_total = exp(-tau_cont) * Π_s [ Σ_g w_g exp(-tau_s(g)) ]
This avoids ROM sorting / k-distribution mixing entirely and is intended as a fast transmission-only approximation.
Functions#
|
Compute 1D transit depth using transmission multiplication random overlap. |
exo_skryer.RT_trans_1D_os Module#
RT_trans_1D_os.py#
Functions#
|
exo_skryer.refraction Module#
refraction.py#
Approximate refraction support for transmission spectroscopy.
Current implementation: “cutoff” mode (option A) that applies a refractive boundary (fully opaque below a wavelength-dependent impact parameter) without curved-ray optical-depth integration.
Functions#
|
Return a boolean mask for impact parameters blocked by refraction. |
|
Return a JAX-safe refraction mask or an all-false mask. |
exo_skryer.registry_special Module#
registry_special.py#
Special (non-line, non-Rayleigh, non-CIA) opacity registries.
Currently supported: - H- bound-free (bf) continuum cross-sections σ_bf(λ, T) - H- free-free (ff) continuum cross-sections σ_ff(λ, T)
Tables are precomputed on the forward-model master wavelength grid and a fixed temperature grid, then cached as device arrays for JAX kernels.
Functions#
|
Load/build special opacity tables and cache them on device. |
exo_skryer.run_retrieval Module#
run_retrieval.py#
Functions#
|
Run a retrieval defined by a YAML configuration. |
|
Format a duration in seconds into a human-readable string. |
exo_skryer.vert_alt Module#
vert_alt.py#
Functions#
|
Compute an altitude profile using the hypsometric equation (constant gravity). |
|
Compute gravity as a function of altitude assuming spherical geometry. |
|
Compute an altitude profile with altitude-dependent gravity. |
|
Compute an altitude profile with altitude-dependent gravity anchored at p_ref. |
exo_skryer.vert_chem Module#
vert_chem.py#
Functions#
|
Build a JIT-optimized function for constant VMR profiles. |
|
Build a JIT-optimized function for constant VMR profiles using centered-log-ratio (CLR) parameterization. |
|
Build a constant-VMR chemistry kernel for an explicit species ordering. |
|
Compatibility alias for FastChem-grid interpolation backend. |
|
Interpolate FastChem 5D grid over (T, P, M/H, C/O). |
|
Compute chemical equilibrium profiles using the |
|
Compute equilibrium profiles using the production CE JAX backend. |
|
Compute quenched chemical abundance profiles using the FastChem 5D grid. |
|
Compute chemical equilibrium profiles using the |
|
Build and cache the production CE model for retrieval use. |
Return True if the global element-potentials cache is initialised. |
|
|
Build an |
Return True if the global atmodeller cache has been initialised. |
|
|
Load and cache a FastChem 5D interpolation grid. |
Return True if FastChem grid interpolation cache is initialised. |
|
Return lightweight diagnostics for the cached FastChem grid backend. |
|
|
Store the list of species to quench for the quench_approx kernel. |
Return True if the quench species list has been configured. |
exo_skryer.vert_cloud Module#
Vertical cloud profile kernels.
This module contains functions that compute the vertical distribution of cloud mass mixing ratio (q_c_lay) as a function of pressure and atmospheric conditions.
Functions#
|
Return zero cloud mass mixing ratio (no clouds). |
|
Exponential decay cloud profile with hard base cutoff. |
|
Uniform slab cloud profile with hard pressure cutoffs. |
|
Constant cloud mass mixing ratio throughout the entire atmosphere. |
exo_skryer.vert_mu Module#
vert_mu.py#
Functions#
|
Return a constant mean molecular weight (μ) profile. |
|
Compute mean molecular weight from volume mixing ratios. |
|
Build a mean-molecular-weight kernel with a fixed species ordering. |
exo_skryer.vert_Tp Module#
vert_Tp.py#
Functions#
|
Compute the Hopf function for radiative transfer. |
|
Generate an isothermal temperature profile. |
|
Generate a Barstow et al. (2020) temperature profile. |
|
Generate a Milne temperature profile for an internally heated atmosphere. |
|
Generate a modified Milne temperature profile with stretched exponential transition. |
|
Generate a Guillot (2010) analytical temperature profile. |
|
Generate a modified Guillot profile with a flexible irradiated Hopf term. |
|
Generate a Madhusudhan & Seager (2009) three-region T-P profile. |
|
Generate a Parmentier & Guillot (2014,2015) picket fence T-P profile. |
|
Apply dry convective adjustment to a temperature profile. |