.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_hitemp_spectrum.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Run this example online : - Click :ref:`here ` to download the full example code - Then start `Radis-Lab `__, upload the Jupyter notebook, and run it from there. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_hitemp_spectrum.py: .. _example_calculate_hitemp: ================================ Calculate a spectrum from HITEMP ================================ Auto-download and compute a CO spectrum from HITEMP ([HITEMP-2010]_). Compare with HITRAN-2016 ([HITRAN-2016]_). .. GENERATED FROM PYTHON SOURCE LINES 14-51 .. image-sg:: /auto_examples/images/sphx_glr_plot_hitemp_spectrum_001.png :alt: plot hitemp spectrum :srcset: /auto_examples/images/sphx_glr_plot_hitemp_spectrum_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Downloading 05_HITEMP2019.par.bz2 for CO (1/1). Download complete. Parsing CO database to /home/docs/.radisdb/hitemp/CO-05_HITEMP2019.hdf5 Added HITEMP-CO database in /home/docs/radis.json Calculating Equilibrium Spectrum Physical Conditions ---------------------------------------- Tgas 2000 K Trot 2000 K Tvib 2000 K isotope 1 mole_fraction 0.1 molecule CO overpopulation None path_length 1 cm pressure_mbar 3000.0 mbar rot_distribution boltzmann self_absorption True state X vib_distribution boltzmann wavenum_max 2170.0000 cm-1 wavenum_min 2135.0000 cm-1 Computation Parameters ---------------------------------------- Tref 296 K add_at_used broadening_method voigt cutoff 1e-27 cm-1/(#.cm-2) dbformat hitemp-radisdb dbpath /home/docs/.radisdb/hitemp/CO-05_HITEMP2019.hdf5 folding_thresh 1e-06 include_neighbouring_lines True memory_mapping_engine auto neighbour_lines 0 cm-1 optimization simple parfuncfmt hapi parsum_mode full summation pseudo_continuum_threshold 0 sparse_ldm auto truncation 50 cm-1 waveunit cm-1 wstep 0.01 cm-1 zero_padding -1 ---------------------------------------- 0.03s - Spectrum calculated Added HITRAN-CO2-TEST database in /home/docs/radis.json Added HITRAN-CO-TEST database in /home/docs/radis.json Added HITEMP-CO2-TEST database in /home/docs/radis.json Added HITEMP-CO2-HAMIL-TEST database in /home/docs/radis.json Using database: HITRAN-CO-TEST 'HITRAN-CO-TEST': {'info': 'HITRAN 2016 database, CO, 3 main isotopes (CO-26, 36, 28), 2000-2300 cm-1', 'path': ['/home/docs/checkouts/readthedocs.org/user_builds/radis/envs/master/lib/python3.8/site-packages/radis/test/files/hitran_co_3iso_2000_2300cm.par'], 'format': 'hitran', 'parfuncfmt': 'hapi', 'levelsfmt': 'radis'} Generating cache file /home/docs/checkouts/readthedocs.org/user_builds/radis/envs/master/lib/python3.8/site-packages/radis/test/files/hitran_co_3iso_2000_2300cm.h5 with metadata : {'last_modification': 'Sun Aug 28 21:55:18 2022', 'wavenum_min': 2000.052539, 'wavenum_max': 2298.445736} /home/docs/checkouts/readthedocs.org/user_builds/radis/envs/master/lib/python3.8/site-packages/radis/misc/warning.py:354: HighTemperatureWarning: HITRAN is valid for low temperatures (typically < 700 K). For higher temperatures you may need HITEMP or CDSD. See the 'databank=' parameter Calculating Equilibrium Spectrum Physical Conditions ---------------------------------------- Tgas 2000 K Trot 2000 K Tvib 2000 K isotope 1 mole_fraction 0.1 molecule CO overpopulation None path_length 1 cm pressure_mbar 3000.0 mbar rot_distribution boltzmann self_absorption True state X vib_distribution boltzmann wavenum_max 2170.0000 cm-1 wavenum_min 2135.0000 cm-1 Computation Parameters ---------------------------------------- Tref 296 K add_at_used broadening_method voigt cutoff 1e-27 cm-1/(#.cm-2) dbformat hitran dbpath /home/docs/checkouts/readthedocs.org/user_builds/radis/envs/master/lib/python3.8/site-packages/radis... folding_thresh 1e-06 include_neighbouring_lines True memory_mapping_engine auto neighbour_lines 0 cm-1 optimization simple parfuncfmt hapi parsum_mode full summation pseudo_continuum_threshold 0 sparse_ldm auto truncation 50 cm-1 waveunit cm-1 wstep 0.01 cm-1 zero_padding -1 ---------------------------------------- 0.03s - Spectrum calculated (
, [, ]) | .. code-block:: default from radis import calc_spectrum s = calc_spectrum( 2135, 2170, # cm-1 molecule="CO", isotope="1", pressure=3, # bar Tgas=2000, # K mole_fraction=0.1, path_length=1, # cm databank="hitemp", # latest version is fetched name="HITEMP-2020", ) from radis.test.utils import setup_test_line_databases setup_test_line_databases() s2 = calc_spectrum( 2135, 2170, # cm-1 molecule="CO", isotope="1", pressure=3, # bar Tgas=2000, # K mole_fraction=0.1, path_length=1, # cm databank="HITRAN-CO-TEST", # we could also have fetched the latest HITRAN with "databank='hitran'" name="HITRAN-2016", ) # Compare: from radis import plot_diff plot_diff(s, s2) .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 25.616 seconds) .. _sphx_glr_download_auto_examples_plot_hitemp_spectrum.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_hitemp_spectrum.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_hitemp_spectrum.ipynb `