radis.lbl.overp moduleΒΆ
Created on Thu Sep 14 13:44:35 2017.
@author: erwan
SummaryΒΆ
An experimental module to merge precalculated vibrational bands in post-processing, and recompute a new spectrum at a new temperature or with overpopulations, without having to recalculate the broadening of each line
Warning
Order of magnitude faster, but only valid under optically thin conditions as the rescaling of absorption doesnt scale induced emission properly
- class LevelsList(parfunc, bands, levelsfmt, sortby='Ei', copy_lines=False, verbose=True)[source]ΒΆ
Bases:
object
A class to generate a Spectrum from a list of precalculated bands at a given reference temperature.
Warning
only valid under optically thin conditions!!
- eq_spectrum(Tgas, overpopulation=None, mole_fraction=None, path_length=None, save_rescaled_bands=False)[source]ΒΆ
See
eq_spectrum()
Warning
only valid under optically thin conditions!!
- Parameters:
β¦ same as usually. If None, then the reference value (used to
calculate bands) is used
- Other Parameters:
save_rescaled_bands (boolean) β save updated bands. Take some time as it requires rescaling all bands individually (which is only done on the MergedSlabs usually) Default
False
- non_eq_spectrum(Tvib=None, Trot=None, Ttrans=None, vib_distribution='boltzmann', overpopulation=None, mole_fraction=None, path_length=None, save_rescaled_bands=False)[source]ΒΆ
-
Warning
only valid under optically thin conditions!!
- Parameters:
β¦ same as usually. If None, then the reference value (used to
calculate bands) is used
- Other Parameters:
save_rescaled_bands (boolean) β save updated bands. Take some time as it requires rescaling all bands individually (which is only done on the MergedSlabs usually) Default
False
Notes
Implementation:
Generation of a new spectrum is done by recombination of the precalculated bands with
- plot_vib_populations(nfig=None, **kwargs)[source]ΒΆ
Plot current distribution of vibrational levels.
By constructions populations are shown as divided by the state degeneracy, i.e, g = gv * (2J+1) * gi * gs
- Parameters:
nfig (str, int) β name of Figure to plot on
kwargs (**dict) β arguments are forwarded to plot()
- rescale_updown_levels(spec, new_nu, old_nu, new_nl, old_nl, ignore_warnings=False, force=False)[source]ΒΆ
Update spectrum with new molar fraction for upper and lower levels.
Convoluted values (with slit) are dropped in the process.
Rescales with a ratio new_nu/old_nu.
This is only valid for emission quantities, under optically thin conditions, as rescaling doesnt correct for induced emission.
Warning
experimental feature
- Parameters:
new_nu (float) β new upper state mole fraction
old_nu (float) β current upper state mole fraction
new_nl (float) β new lower state mole fraction
old_nl (float) β current lower state mole fraction
- Other Parameters:
force (boolean) β if False, wonβt allow rescaling to 0 (not to loose information). Default
False
Notes
Implementation:
similar to rescale_path_length() but we have to scale abscoeff & emisscoeff Note that this is valid only for small changes in mole fractions. Then, the change in line broadening becomes significant and the whole band should be recomputed
IMPORTANT: if editing make sure you use the proper nu and nl. In particular when inferring emission quantities from absorption quantities this may ends up in error in overpopulation rescaling.