tardis.opacities.sobolevs_from_levels module
- tardis.opacities.sobolevs_from_levels.calculate_sobolev_opacities_from_level_densities(level_density_values, line_indices, lines_lower_level_index, lines_upper_level_index, g_lower, g_upper, meta_stable_upper, nlte_lines_mask, tau_coefficient)[source]
Calculate Sobolev optical depths and escape probabilities from level densities.
- Parameters:
- level_density_valuesnumpy.ndarray
Number densities for all atomic levels.
- line_indicesnumpy.ndarray, dtype int
Indices of the lines for which to calculate the Sobolev quantities.
- lines_lower_level_indexnumpy.ndarray, dtype int
Index of the lower level for each line.
- lines_upper_level_indexnumpy.ndarray, dtype int
Index of the upper level for each line.
- g_lowernumpy.ndarray
Statistical weights of the lower level for each line.
- g_uppernumpy.ndarray
Statistical weights of the upper level for each line.
- meta_stable_uppernumpy.ndarray, dtype bool
Mask identifying lines with metastable upper levels.
- nlte_lines_masknumpy.ndarray, dtype bool
Mask identifying lines treated with non-local thermodynamic equilibrium populations.
- tau_coefficientnumpy.ndarray
Coefficient multiplying the lower-level density for each line’s optical depth.
- Returns:
- tuple[numpy.ndarray, numpy.ndarray]
Sobolev optical depths and escape probabilities for the selected lines.