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.

Args:

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

Returns:

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

Note:

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.

read_def(deff)[source]

Exomol IO for a definition file

Parameters

deff (definition file)

Returns

  • 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.

read_pf(pff)[source]

Exomol IO for partition file

Note:

T=temperature QT=partition function

Args:

pff: partition file

Returns:

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

Args:

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

Returns:

states data in pandas DataFrame

read_trans(transf)[source]

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

Args:

transf: transition file

Returns:

transition data in pandas DataFrame