radis.db.molparam module¶


class MolParams(file=None, terrestrial_abundances=True, extra_file_json='/home/docs/checkouts/readthedocs.org/user_builds/radis/envs/master/lib/python3.8/site-packages/radis/db/molparams_extra.json')[source]¶

Bases: object

Easy access to molecular parameters taken from HITRAN molparam.txt.

Note

Starting from Radis 0.13.1 MolParams can also read extra parameters from a .json file

Parameters

Examples

Get earth abundance of CO2, isotope 1:

from radis.db.molparam import MolParams
molpar = MolParams()
molpar.get(2, 1, 'abundance')         # 2 for CO2, 1 for isotope 1
Get Molecular Parameters

Get Molecular Parameters

Get Molecular Parameters
Use Custom Abundances

Use Custom Abundances

Use Custom Abundances
Add-heading

Note

Isotope number was derived manually assuming the isonames were ordered in the database The isotope name (ex: CO2 626) is kept for comparison if ever needed

References

http://hitran.org/media/molparam.txt

df[source]¶
extra_molparams[source]¶
get(molecule, isotope, key: ['isoname', 'abundance', 'Q_296K', 'gj', 'molar_mass', 'isotope_name', 'isotope_name_exomol'])[source]¶

Get attribute of molecule, isotope.

Parameters
  • molecule (str or int) – molecule name or molecule id

  • iso (int) – isotope number # (sorted by terrestrial abundance)

  • key ('abundance', 'mol_mass', 'isotope_name', 'isotope_name_exomol') – parameter

Examples

Get explicit name of an isotope:

from radis.db.molparam import MolParams
mp = MolParams()
print(mp.get("CO2", 1, "isotope_name"))   # >> (12C)(16O)2
print(mp.get("CO2", 2, "isotope_name"))   # >> (13C)(16O)2
Use Custom Abundances

Use Custom Abundances

Use Custom Abundances
terrestrial_abundances[source]¶
get_extra_molparams(path='/home/docs/checkouts/readthedocs.org/user_builds/radis/envs/master/lib/python3.8/site-packages/radis/db/molparams_extra.json')[source]¶

Read the extra molecular parameters in MOLPARAMS_EXTRA_PATH to complement the HITRAN molecular parameters of molparam.txt