Calculate a spectrum from ExoMolΒΆ

Auto-download and compute a SiO spectrum from the ExoMol database ([ExoMol-2020])

from radis import calc_spectrum

s = calc_spectrum(
    1080,
    1320,  # cm-1
    species="SiO",
    isotope="1",
    pressure=1.01325,  # bar
    Tgas=1000,  # K
    mole_fraction=0.1,
    path_length=1,  # cm
    databank=("exomol", "EBJT"),  # Simply use 'exomol' for the recommended database
)
s.apply_slit(1, "cm-1")  # simulate an experimental slit
s.plot("radiance")
plot exomol spectrum
--------------------------------------------------------------------------------
SiO - EXOMOL - Fetching 28Si-16O - EBJT
--------------------------------------------------------------------------------
- Local folder: /home/docs/.radisdb/exomol/SiO/28Si-16O/EBJT

Download:
  - Total download size: 0.000004 GB
  - Downloading 28Si-16O__EBJT.def

    28Si-16O__EBJT.def:   0%|          | 0.00/4.65k [00:00<?, ?B/s]
    28Si-16O__EBJT.def: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 4.65k/4.65k [00:00<00:00, 35.4MB/s]
  - Total download size: 0.000044 GB
  - Downloading 28Si-16O__EBJT.pf

    28Si-16O__EBJT.pf:   0%|          | 0.00/45.7k [00:00<?, ?B/s]
    28Si-16O__EBJT.pf:  53%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Ž    | 24.0k/45.7k [00:00<00:00, 196kB/s]
    28Si-16O__EBJT.pf: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 45.7k/45.7k [00:00<00:00, 275kB/s]
  - Total download size: 0.000244 GB
  - Downloading 28Si-16O__EBJT.states.bz2

    28Si-16O__EBJT.states.bz2:   0%|          | 0.00/256k [00:00<?, ?B/s]
    28Si-16O__EBJT.states.bz2:  13%|β–ˆβ–Ž        | 32.0k/256k [00:00<00:01, 191kB/s]
    28Si-16O__EBJT.states.bz2:  63%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Ž   | 160k/256k [00:00<00:00, 528kB/s]
    28Si-16O__EBJT.states.bz2: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 256k/256k [00:00<00:00, 758kB/s]
  - Total download size: 0.000016 GB

Broadening:
  - Downloading 28Si-16O__H2.broad

    28Si-16O__H2.broad:   0%|          | 0.00/22.0 [00:00<?, ?B/s]
    28Si-16O__H2.broad: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 22.0/22.0 [00:00<00:00, 244kB/s]
  - Downloading 28Si-16O__He.broad

    28Si-16O__He.broad:   0%|          | 0.00/23.0 [00:00<?, ?B/s]
    28Si-16O__He.broad: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 23.0/23.0 [00:00<00:00, 269kB/s]
  - Downloading 28Si-16O__air.broad

    28Si-16O__air.broad:   0%|          | 0.00/16.6k [00:00<?, ?B/s]
    28Si-16O__air.broad: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 16.6k/16.6k [00:00<00:00, 202kB/s]
  - Downloading 28Si-16O__self.broad

    28Si-16O__self.broad:   0%|          | 0.00/22.0 [00:00<?, ?B/s]
    28Si-16O__self.broad: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 22.0/22.0 [00:00<00:00, 275kB/s]
  - Downloading 28Si-16O__Ar.broad

    28Si-16O__Ar.broad:   0%|          | 0.00/23.0 [00:00<?, ?B/s]
    28Si-16O__Ar.broad: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 23.0/23.0 [00:00<00:00, 268kB/s]
  - Downloading 28Si-16O__CH4.broad

    28Si-16O__CH4.broad:   0%|          | 0.00/22.0 [00:00<?, ?B/s]
    28Si-16O__CH4.broad: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 22.0/22.0 [00:00<00:00, 259kB/s]
  - Downloading 28Si-16O__CO.broad

    28Si-16O__CO.broad:   0%|          | 0.00/23.0 [00:00<?, ?B/s]
    28Si-16O__CO.broad: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 23.0/23.0 [00:00<00:00, 238kB/s]
  - Downloading 28Si-16O__CO2.broad

    28Si-16O__CO2.broad:   0%|          | 0.00/23.0 [00:00<?, ?B/s]
    28Si-16O__CO2.broad: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 23.0/23.0 [00:00<00:00, 198kB/s]
  - Downloading 28Si-16O__H2.broad

    28Si-16O__H2.broad:   0%|          | 0.00/22.0 [00:00<?, ?B/s]
    28Si-16O__H2.broad: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 22.0/22.0 [00:00<00:00, 267kB/s]
  - Downloading 28Si-16O__H2O.broad

    28Si-16O__H2O.broad:   0%|          | 0.00/23.0 [00:00<?, ?B/s]
    28Si-16O__H2O.broad: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 23.0/23.0 [00:00<00:00, 264kB/s]
  - Downloading 28Si-16O__N2.broad

    28Si-16O__N2.broad:   0%|          | 0.00/23.0 [00:00<?, ?B/s]
    28Si-16O__N2.broad: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 23.0/23.0 [00:00<00:00, 275kB/s]
  - Downloading 28Si-16O__NH3.broad

    28Si-16O__NH3.broad:   0%|          | 0.00/23.0 [00:00<?, ?B/s]
    28Si-16O__NH3.broad: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 23.0/23.0 [00:00<00:00, 261kB/s]
  - Downloading 28Si-16O__NO.broad

    28Si-16O__NO.broad:   0%|          | 0.00/23.0 [00:00<?, ?B/s]
    28Si-16O__NO.broad: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 23.0/23.0 [00:00<00:00, 290kB/s]
  - Downloading 28Si-16O__O2.broad

    28Si-16O__O2.broad:   0%|          | 0.00/23.0 [00:00<?, ?B/s]
    28Si-16O__O2.broad: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 23.0/23.0 [00:00<00:00, 199kB/s]
  - Downloading 28Si-16O__NH3.broad

    28Si-16O__NH3.broad:   0%|          | 0.00/23.0 [00:00<?, ?B/s]
    28Si-16O__NH3.broad: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 23.0/23.0 [00:00<00:00, 290kB/s]
  - Downloading 28Si-16O__CS.broad
Warning: Couldn't download .broad file
  - Downloaded 15 broadening file(s): H2, He, air, self, Ar, CH4, CO, CO2, H2, H2O, N2, NH3, NO, O2, NH3
  - 1 broadening file(s) not available (using default parameters)
  - Caching states data to pytables format. This will be faster on subsequent runs.

Download:
- File 28Si-16O__EBJT.trans
  - Total download size: 0.002863 GB
  - Downloading 28Si-16O__EBJT.trans.bz2

    28Si-16O__EBJT.trans.bz2:   0%|          | 0.00/2.93M [00:00<?, ?B/s]
    28Si-16O__EBJT.trans.bz2:   1%|          | 32.0k/2.93M [00:00<00:16, 188kB/s]
    28Si-16O__EBJT.trans.bz2:   5%|β–Œ         | 160k/2.93M [00:00<00:05, 518kB/s]
    28Si-16O__EBJT.trans.bz2:  23%|β–ˆβ–ˆβ–Ž       | 688k/2.93M [00:00<00:01, 1.69MB/s]
    28Si-16O__EBJT.trans.bz2:  92%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–| 2.70M/2.93M [00:00<00:00, 6.40MB/s]
    28Si-16O__EBJT.trans.bz2: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2.93M/2.93M [00:00<00:00, 4.37MB/s]
  - Caching the *.trans.bz2 file to the pytables (*.h5) format. After the second time, it will become much faster.
/home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/io/exomol.py:256: AccuracyWarning: ExoMol cache file /home/docs/.radisdb/exomol/SiO/28Si-16O/EBJT/28Si-16O__EBJT.trans.h5 is missing columns ['gupper', 'glower']. This may be from an older version of RADIS. Regenerate the cache with `cache='regen'` to fix this.
  warnings.warn(
Cleaned up downloaded file: 28Si-16O__EBJT.trans.bz2
Broadening code level: m0
Broadening code level: a0
/home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/api/exomolapi.py:727: AccuracyWarning: The default broadening parameter (alpha = 0.07 cm^-1 and n = 0.5) are used for J'' > 0 up to J'' = 396
  warnings.warn(

ExoMol database loading complete
13.67s - Loaded database
/home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:434: MissingPressureShiftWarning: Pressure-shift coefficient not given in database: assumed 0 pressure shift
  warnings.warn(WarningType(message))
Calculating Equilibrium Spectrum
Physical Conditions
----------------------------------------
   Tgas                 1000 K
   isotope              1
   medium               air
   mole_fraction        0.1
   path_length          1 cm
   pressure             1.01325 bar
   self_absorption      True
   species              SiO
   state                X
   wavenum_max          1320.0000 cm-1
   wavenum_min          1080.0000 cm-1
Computation Parameters
----------------------------------------
   Tref                 296 K
   add_at_used          numpy
   broadening_method    voigt_poly
   cutoff               1e-27 cm-1/(#.cm-2)
   dbformat             exomol-radisdb
   dbpath               /home/docs/.radisdb/exomol/SiO/28Si-16O/EBJT
   diluent              air
   folding_thresh       1e-06
   include_neighbouring_lines  True
   isatom               False
   isneutral            None
   lbfunc               None
   memory_mapping_engine  auto
   neighbour_lines      0 cm-1
   optimization         simple
   parsum_mode          full summation
   pfsource             default
   potential_lowering   None
   pseudo_continuum_threshold  0
   sparse_ldm           True
   truncation           50 cm-1
   waveunit             cm-1
   wstep                0.01 cm-1
   zero_padding         24001
----------------------------------------
0.03s - Spectrum calculated
Slice 1/1

<matplotlib.lines.Line2D object at 0x73c58f50d940>
"""ExoMol lines can be downloaded and accessed separately using
:py:func:`~radis.io.exomol.fetch_exomol`
"""

# See line data:
from radis.io.exomol import fetch_exomol

df = fetch_exomol("SiO", database="EBJT", isotope=1, load_wavenum_max=5000)
print(df)
/home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/io/exomol.py:256: AccuracyWarning: ExoMol cache file /home/docs/.radisdb/exomol/SiO/28Si-16O/EBJT/28Si-16O__EBJT.trans.h5 is missing columns ['gupper', 'glower']. This may be from an older version of RADIS. Regenerate the cache with `cache='regen'` to fix this.
  warnings.warn(
Broadening code level: m0
Broadening code level: a0
/home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/api/exomolapi.py:727: AccuracyWarning: The default broadening parameter (alpha = 0.07 cm^-1 and n = 0.5) are used for J'' > 0 up to J'' = 408
  warnings.warn(
        i_upper  i_lower             A  ...  Tdpair  selbrd  selbrd_Tdpair
0         24300    24299  1.926600e-12  ...     0.5   0.082            0.5
1          4698     5073  3.431600e-10  ...     NaN   0.070            0.5
2         24273    24272  1.652000e-10  ...     0.5   0.082            0.5
3         24301    24300  1.725200e-11  ...     0.5   0.070            0.5
4         24232    24231  7.675700e-10  ...     0.5   0.082            0.5
...         ...      ...           ...  ...     ...     ...            ...
249599     3769     1818  2.429700e-04  ...     0.5   0.070            0.5
249600     8052     6269  1.481800e-02  ...     0.5   0.070            0.5
249601     8693     6938  1.601100e-02  ...     0.5   0.070            0.5
249602     8659     6904  1.166600e-02  ...     0.5   0.070            0.5
249603     7665     5871  3.160000e-03  ...     0.5   0.070            0.5

[249604 rows x 15 columns]

See the list of recommended databases for the 1st isotope of SiO :

from radis.io.exomol import get_exomol_database_list, get_exomol_full_isotope_name

databases, recommended = get_exomol_database_list(
    "SiO", get_exomol_full_isotope_name("SiO", 1)
)
print("Databases for SiO: ", databases)
print("Database recommended by ExoMol: ", recommended)
Databases for SiO:  [np.str_('EBJT'), np.str_('Kurucz-SiO'), np.str_('SiOUVenIR'), np.str_('xsec-SiOUVenIR')]
Database recommended by ExoMol:  SiOUVenIR

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