Calculate non-LTE spectra of carbon-monoxide

Compute a CO spectrum with the temperature of the vibrational mode different from the temperature of the rotational mode.

This example uses the calc_spectrum() function, the [HITRAN-2016] line database to derive the line positions and intensities, and the default RADIS spectroscopic constants to compute nonequilibrium energies and populations, but it can be extended to other line databases and other sets of spectroscopic constants.

plot nonequilibrium co spectrum

Out:

Generating cache file /home/docs/.astropy/cache/astroquery/Hitran/tempfile_CO_1_1895.00_2305.00.h5 with metadata :
{'molecule': 'CO', 'isotope': 1, 'wmin': 1895.0, 'wmax': 2305.0}
/home/docs/checkouts/readthedocs.org/user_builds/radis/envs/latest/lib/python3.6/site-packages/pandas/core/generic.py:2449: PerformanceWarning:


your performance may suffer as PyTables will pickle object types that it cannot
map directly to c-types [inferred_type->bytes,key->block3_values] [items->Index(['globu', 'globl', 'locu', 'locl', 'lmix'], dtype='object')]


Generating cache file /home/docs/.astropy/cache/astroquery/Hitran/tempfile_CO_2_1895.00_2305.00.h5 with metadata :
{'molecule': 'CO', 'isotope': 2, 'wmin': 1895.0, 'wmax': 2305.0}
/home/docs/checkouts/readthedocs.org/user_builds/radis/envs/latest/lib/python3.6/site-packages/pandas/core/generic.py:2449: PerformanceWarning:


your performance may suffer as PyTables will pickle object types that it cannot
map directly to c-types [inferred_type->bytes,key->block3_values] [items->Index(['globu', 'globl', 'locu', 'locl', 'lmix'], dtype='object')]


Generating cache file /home/docs/.astropy/cache/astroquery/Hitran/tempfile_CO_3_1895.00_2305.00.h5 with metadata :
{'molecule': 'CO', 'isotope': 3, 'wmin': 1895.0, 'wmax': 2305.0}
/home/docs/checkouts/readthedocs.org/user_builds/radis/envs/latest/lib/python3.6/site-packages/pandas/core/generic.py:2449: PerformanceWarning:


your performance may suffer as PyTables will pickle object types that it cannot
map directly to c-types [inferred_type->bytes,key->block3_values] [items->Index(['globu', 'globl', 'locu', 'locl', 'lmix'], dtype='object')]


Calculating energy levels with Dunham expansion for CO(X1Σ+)(iso1)
Database generated up to v=48, J=238
Calculating energy levels with Dunham expansion for CO(X1Σ+)(iso2)
Database generated up to v=48, J=243
Calculating energy levels with Dunham expansion for CO(X1Σ+)(iso3)
Database generated up to v=48, J=243
Calculating Non-Equilibrium Spectrum
Physical Conditions
----------------------------------------
   Tgas                 300.0 K
   Trot                 300.0 K
   Tvib                 700.0 K
   isotope              1,2,3
   mole_fraction        0.1
   molecule             CO
   path_length          1.0 cm
   pressure_mbar        1013.25 mbar
   rot_distribution     boltzmann
   self_absorption      True
   state                X
   vib_distribution     boltzmann
   wavenum_max          2300.0000 cm-1
   wavenum_min          1900.0000 cm-1
Computation Parameters
----------------------------------------
   Tref                 296 K
   broadening_max_width  10 cm-1
   broadening_method    fft
   cutoff               1e-27 cm-1/(#.cm-2)
   dbformat             hitran
   dbpath               fetched from hitran
   dlm_log_pG           0.1375350788016573
   dlm_log_pL           0.20180288881201608
   folding_thresh       1e-06
   include_neighbouring_lines  True
   levelsfmt            radis
   optimization         min-RMS
   parfuncfmt           hapi
   pseudo_continuum_threshold  0
   wavenum_max_calc     2305.0000 cm-1
   wavenum_min_calc     1895.0000 cm-1
   waveunit             cm-1
   wstep                0.01 cm-1
   zero_padding         -1
Information
----------------------------------------
   db_use_cached        True
   export_lines         False
   load_energies        True
   lvl_use_cached       True
   total_lines          749
   warning_broadening_threshold  0.01
   warning_linestrength_cutoff  0.01
----------------------------------------
Fetching Evib & Erot.
/home/docs/checkouts/readthedocs.org/user_builds/radis/envs/latest/lib/python3.6/site-packages/radis/misc/warning.py:319: NegativeEnergiesWarning:

There are negative rotational energies in the database

... sorting lines by vibrational bands
... lines sorted in 0.0s
Spectrum calculated in 0.21s

<matplotlib.lines.Line2D object at 0x7f73de4321d0>

from astropy import units as u

from radis import calc_spectrum

s2 = calc_spectrum(
    1900 / u.cm,
    2300 / u.cm,
    molecule="CO",
    isotope="1,2,3",
    pressure=1.01325 * u.bar,
    Tvib=700 * u.K,
    Trot=300 * u.K,
    mole_fraction=0.1,
    path_length=1 * u.cm,
    databank="hitran",  # or use 'hitemp'
)
s2.apply_slit(0.5, "nm")
s2.plot("radiance", nfig="same")  # compare with previous

Total running time of the script: ( 0 minutes 2.534 seconds)

Gallery generated by Sphinx-Gallery