radis.io.exomolapi module

API for Exomol molecular database

Borrowed from the Exojax code (which you should also have a look at !), by @HajimeKawahara, under MIT License.

pickup_gE(states, trans, dic_def, trans_lines=False)[source]

extract g_upper (gup), E_lower (elower), and J_lower and J_upper from states DataFrame and insert them to transition DataFrame.


states: states pandas DataFrame trans: transition pandas DataFrame trans_lines: By default (False) we use nu_lines computed using the state file, i.e. E_upper - E_lower. If trans_nuline=True, we use the nu_lines in the transition file. Note that some trans files do not this info. dic_def: Informations about additional quantum labels


A, nu_lines, elower, gup, jlower, jupper, **quantum_labels


We first convert pandas DataFrame to ndarray. The state counting numbers in states DataFrame is used as indices of the new array for states (newstates). We remove the state count numbers as the column of newstate, i.e. newstates[:,k] k=0: E, 1: g, 2: J. Then, we can directly use the state counting numbers as mask.


Exomol IO for a definition file


deff (definition file)


  • temperature exponent n_Texp

  • broadening parameter alpha_ref

  • molecular mass

  • numinf (nu minimum for trans)

  • numtag (tag for wavelength range)

  • Note – For some molecules, ExoMol provides multiple trans files. numinf and numtag are the ranges and identifiers for the multiple trans files.


Exomol IO for partition file


T=temperature QT=partition function


pff: partition file


partition data in pandas DataFrame

read_states(statesf, dic_def)[source]

Exomol IO for a state file Note:

i=state counting number E=state energy g=state degeneracy J=total angular momentum See Table 11 in https://arxiv.org/pdf/1603.05890.pdf


statesf: state file dic_def: Info from def file to read extra quantum numbers


states data in pandas DataFrame


Exomol IO for a transition file Note:

i_upper=Upper state counting number i_lower=Lower state counting number A=Einstein coefficient in s-1 nu_lines=transition wavenumber in cm-1 See Table 12 in https://arxiv.org/pdf/1603.05890.pdf


transf: transition file


transition data in pandas DataFrame