compute_line_opacity#
- exo_skryer.opacity_line.compute_line_opacity(state: Dict[str, Array], opac: Dict[str, Array], params: Dict[str, Array]) Array[source]#
Compute opacity-sampling mass opacity for all molecular/atomic absorbers.
This function calculates the total line absorption opacity by: 1. Interpolating pre-loaded cross-sections to atmospheric (P, T) conditions 2. Weighting each species’ opacity by its volume mixing ratio 3. Summing contributions from all species 4. Converting from molecular cross-section to mass opacity
- Parameters:
- statedict[str,
ndarray] Atmospheric state dictionary containing:
p_layndarray, shape (nlay,)Layer pressures in dyne cm⁻².
T_layndarray, shape (nlay,)Layer temperatures in Kelvin.
mu_layndarray, shape (nlay,)Mean molecular weight per layer in g mol^-1.
vmr_laydict[str,ndarray]Volume mixing ratios for each species. Keys must match species names in the loaded line opacity tables. Values can be scalars or arrays with shape (nlay,).
- paramsdict[str,
ndarray] Parameter dictionary (unused; VMRs come from state[‘vmr_lay’]). Kept for API compatibility with other opacity functions.
- statedict[str,
- Returns:
- kappa_line
ndarray, shape (nlay, nwl) Total line absorption mass opacity in cm² g⁻¹ at each layer and wavelength point.
- kappa_line