radis.test.lbl.test_base moduleΒΆ
Created on Mon May 7 17:34:52 2018
@author: erwan
- test_export_populations(plot=True, verbose=True, warnings=True, *args, **kwargs)[source]ΒΆ
Check populations calculated in the nonequilibrium module are exported in Spectrum.
Compare with hardcoded values
Examples
- ::
sf = SpectrumFactory(export_populations=βrovibβ)
- test_export_rovib_fractions(plot=True, verbose=True, warnings=True, *args, **kwargs)[source]ΒΆ
Compare rovib fraction (nu_vib, nl_vib, nu_rot, nl_rot) are calculated in the nonequilibrium module
Examples
- ::
sf = SpectrumFactory(export_lines=True, β¦) sf.misc.export_rovib_fraction = True # required from 0.9.30
- test_input_wunit(plot=True, *args, **kwargs)[source]ΒΆ
Test spectrum default units are properly when giving inputs in wavenumber or wavelength ; and test that intensity units are consistent too
- test_linestrength_calculations(*args, **kwargs)[source]ΒΆ
Compare and validate linestrength calculations from
radis.lbl.base.linestrength_from_Einstein()
,radis.lbl.base.BaseFactory.calc_linestrength_eq()
,radis.lbl.base.BaseFactory.calc_linestrength_non_eq()
,
- test_optically_thick_limit_1iso(verbose=True, plot=True, *args, **kwargs)[source]ΒΆ
Test that we find Planck in the optically thick limit
In particular, this test will fail if :
linestrength are not properly calculated
at noneq, linestrength and emission integrals are mixed up
The test should be run for 1 and several isotopes, because different calculations paths are used internally, and this can lead to different errors.
Also, this test is used to run with DEBUG_MODE = True, which will check that isotopes and molecule ids are what we expect in all the groupby() loops that make the production code very fast.
Notes
switched from large band calculation with [HITRAN-2016] to a calculation with the embedded [HITEMP-2010] fragment (shorter range, but no need to download files)
- test_optically_thick_limit_2iso(verbose=True, plot=True, *args, **kwargs)[source]ΒΆ
Test that we find Planck in the optically thick limit
In particular, this test will fail if :
linestrength are not properly calculated
at noneq, linestrength and emission integrals are mixed up
The test should be run for 1 and several isotopes, because different calculations paths are used internally, and this can lead to different errors.
Also, this test is used to run with DEBUG_MODE = True, which will check that isotopes and molecule ids are what we expect in all the groupby() loops that make the production code very fast.
Notes
switched from large band calculation with [HITRAN-2016] to a calculation with the embedded [HITEMP-2010] fragment (shorter range, but no need to download files)
- test_populations_CO2_hamiltonian(plot=True, verbose=True, warnings=True, *args, **kwargs)[source]ΒΆ
Calculate nonequilibrium modes with the CO2 Hamiltonian
..warning:
as we only use a reduced set of the CO2 effective Hamiltonian (< 3000 cm-1), many levels of the Line Database will not appear in the Levels Database. We will need to either filter the Line Database beforehand, or run it a first time and remove all levels not found. This database is obviously not to be used in a Production code!