def __init__(self, file=None): """ Easy access to molecular parameters taken from HITRAN molparam.txt Parameters ---------- file: str if None the one in RADIS is taken Examples -------- Get abundance of CO2, isotope 1:: molpar = Molparams() molpar.get(2, 1, 'abundance') # 2 for CO2, 1 for isotope 1 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 """ if file is None: file = getFile("molparam.txt") df = pd.read_csv(file, comment="#", delim_whitespace=True) df = df.set_index(["id", "iso"]) self.df = df # ------ try: # Add hints (Python >3.6 only) self.get.__annotations__["key"] = list(df.keys()) except AttributeError: pass # old Python version
"HITEMP-CO2-TEST": { "info": "HITEMP-2010, CO2, 3 main isotope (CO2-626, 636, 628), " + "2283.7-2285.1 cm-1", "path": [getTestFile(r"cdsd_hitemp_09_fragment.txt")], "format": "cdsd-hitemp", # CDSD-HITEMP version (same lines as HITEMP-2010). "parfuncfmt": "hapi", "levelsfmt": "radis", }, "HITEMP-CO2-HAMIL-TEST": { "info": "HITEMP-2010, CO2, 3 main isotope (CO2-626, 636, 628), " + "2283.7-2285.1 cm-1, energies calculated from Tashkun effective hamiltonian", "path": [getTestFile(r"cdsd_hitemp_09_fragment.txt")], "format": "cdsd-hitemp", # CDSD-HITEMP version (same lines as HITEMP-2010). "parfunc": getFile("CO2", "partition_functions.txt"), "parfuncfmt": "cdsd", "levels": { 1: getTestFile(r"co2_cdsd_hamiltonian_fragment.levels") }, "levelsfmt": "cdsd-hamil", }, } """dict: test databases added in the :ref:`Configuration file <label_lbl_config_file>` by :py:func:`~radis.test.utils.setup_test_line_databases` """ # %% Utils to test spec module def setup_test_line_databases(verbose=True):