radis.test.lbl.test_broadening module¶
Created on Tue Jan 9 17:14:01 2018
@author: erwan
Test broadening against HAPI and tabulated data
We’re looking at CO(0->1) line ‘R1’ at 2150.86 cm-1
- test_abscoeff_continuum(plot=False, verbose=2, warnings=True, threshold=0.1, *args, **kwargs)[source]¶
Test calculation with pseudo-continuum
Assert results on abscoeff dont change
Notes
Uses HITRAN so it can deployed and tested on Travis CI, but we should switch to HITEMP if some HITEMP files can be downloaded automatically at the execution time.
- test_broadening_LDM(verbose=True, plot=False, *args, **kwargs)[source]¶
Test use of lineshape template for broadening calculation.
Ensures that results are the same with and without LDM.
- test_broadening_LDM_FT(verbose=True, plot=False, *args, **kwargs)[source]¶
Test use of LDM with and without Fourier Transform
Ensures that results are the same, and compare calculation times.
- test_broadening_LDM_noneq(verbose=True, plot=False, *args, **kwargs)[source]¶
Test Noneq version of LDM and makes sure it gives the same results as the eq one when used with Tvib=Trot
- test_broadening_chunksize_eq(verbose=True, plot=False, *args, **kwargs)[source]¶
Test equilibrium spectra with and without chunksize, using different optimization strategies and ensure that the residual is very small.
Tests the chunksize implementation introduced for calculation of equilibrium spectra in https://github.com/radis/radis/pull/489/
- test_broadening_methods_different_conditions(verbose=True, plot=False, *args, **kwargs)[source]¶
Test direct Voigt broadening vs convolution of Gaussian x Lorentzian for different spectral grid resolution
Notes
Reference broadening calculated manually with the HWHM formula of HITRAN.org
- test_broadening_methods_different_wstep(verbose=True, plot=False, *args, **kwargs)[source]¶
Test direct Voigt broadening vs convolution of Gaussian x Lorentzian for different spectral grid resolution
- test_broadening_vs_hapi(rtol=0.01, verbose=True, plot=False, *args, **kwargs)[source]¶
Test broadening against HAPI and tabulated data
We’re looking at CO(0->1) line ‘R1’ at 2150.86 cm-1
- test_broadening_warnings(*args, **kwargs)[source]¶
Test AccuracyWarning and AccuracyErrors are properly triggered.
Inspired by https://github.com/radis/radis/issues/186
Test
_check_accuracy()
Examples
- ::
AccuracyError: Some lines are too narrow (FWHM ~ 0.0011 cm⁻¹) for the current spectral grid (wstep=0.01). Please reduce wstep to (at least) below 0.00055 cm⁻¹ or (suggested) 0.00022 cm⁻¹
- test_diluents_molefraction(verbose=True, plot=False, *args, **kwargs)[source]¶
Assert an error is raised when Molefraction (molecule + diluent) < 1 or > 1 Assert calculations run when Molefraction (molecule + diluent) == 1
- test_non_air_diluent(verbose=True, plot=False, *args, **kwargs)[source]¶
Test collisional broadening by other species than air and self (resonant)
Here, broadening by CO2 yields larger Lorentzian HWHM than air. We check that.
Introduced in https://github.com/radis/radis/pull/495
- test_noneq_continuum(plot=False, verbose=2, warnings=True, *args, **kwargs)[source]¶
Test calculation with pseudo-continuum under nonequilibrium
Assert results on emisscoeff dont change
Notes
Uses HITRAN so it can deployed and tested on Travis CI, but we should switch to HITEMP if some HITEMP files can be downloaded automatically at the execution time.
- test_truncations_and_neighbour_lines(*args, **kwargs)[source]¶
Test new truncations introduced in https://github.com/radis/radis/issues/340
So far: test that all functions work More assertion could be added.