radis.io.hitran module

Summary

HITRAN database parser

Routine Listing


cast_to_int64_with_missing_values(dg, keys)[source]

replace missing values of int64 columns with -1

columns_2004 = {'A': ('a10', <class 'float'>, 'Einstein A coefficient', 's-1'), 'El': ('a10', <class 'float'>, 'lower-state energy', 'cm-1'), 'Pshft': ('a8', <class 'float'>, 'air pressure-induced line shift at 296K', 'cm-1.atm-1'), 'Tdpair': ('a4', <class 'float'>, 'temperature-dependance exponent for Gamma air', ''), 'airbrd': ('a5', <class 'float'>, 'air-broadened half-width at 296K', 'cm-1.atm-1'), 'globl': ('a15', <class 'str'>, 'electronic and vibrational global lower quanta', ''), 'globu': ('a15', <class 'str'>, 'electronic and vibrational global upper quanta', ''), 'gp': ('a7', <class 'float'>, 'upper state degeneracy', ''), 'gpp': ('a7', <class 'float'>, 'lower state degeneracy', ''), 'id': ('a2', <class 'int'>, 'Molecular number', ''), 'ierr': ('a6', <class 'str'>, 'ordered list of indices corresponding to uncertainty estimates of transition parameters', ''), 'int': ('a10', <class 'float'>, 'intensity at 296K', 'cm-1/(molecule/cm-2)'), 'iref': ('a12', <class 'str'>, 'ordered list of reference identifiers for transition parameters', ''), 'iso': ('a1', <class 'int'>, 'isotope number', ''), 'lmix': ('a1', <class 'str'>, 'flag indicating the presence of additional data and code relating to line-mixing', ''), 'locl': ('a15', <class 'str'>, 'electronic and vibrational local lower quanta', ''), 'locu': ('a15', <class 'str'>, 'electronic and vibrational local upper quanta', ''), 'selbrd': ('a5', <class 'float'>, 'self-broadened half-width at 296K', 'cm-1.atm-1'), 'wav': ('a12', <class 'float'>, 'vacuum wavenumber', 'cm-1')}[source]

parsing order of HITRAN 2004 format

Type

OrderedDict

hit2df(fname, cache=True, verbose=True, drop_non_numeric=True, load_wavenum_min=None, load_wavenum_max=None)[source]

Convert a HITRAN/HITEMP 1 file to a Pandas dataframe

Parameters
  • fname (str) – HITRAN-HITEMP file name

  • cache (boolean, or 'regen' or 'force') – if True, a pandas-readable HDF5 file is generated on first access, and later used. This saves on the datatype cast and conversion and improves performances a lot (but changes in the database are not taken into account). If False, no database is used. If 'regen', temp file are reconstructed. Default True.

Other Parameters
  • drop_non_numeric (boolean) – if True, non numeric columns are dropped. This improves performances, but make sure all the columns you need are converted to numeric formats before hand. Default True. Note that if a cache file is loaded it will be left untouched.

  • load_wavenum_min, load_wavenum_max (float) – if not 'None', only load the cached file if it contains data for wavenumbers above/below the specified value. See :py:func`~radis.io.cache_files.load_h5_cache_file`. Default 'None'.

Returns

df – dataframe containing all lines and parameters

Return type

pandas Dataframe

References

1

HITRAN 1996, Rothman et al., 1998

Notes

Performances: see CDSD-HITEMP parser

See also

cdsd2df()

parse_global_quanta(df, mol)[source]
Parameters
  • df (pandas Dataframe)

  • mol (str) – molecule name

parse_local_quanta(df, mol)[source]
Parameters
  • df (pandas Dataframe)

  • mol (str) – molecule name