radis.api.geisaapi module


GEISA database parser

class GEISADatabaseManager(name, molecule, local_databases, engine='default', verbose=True, chunksize=100000, parallel=True)[source]

Bases: DatabaseManager


requires connexion

parse_to_local_file(opener, urlname, local_file, pbar_active=True, pbar_t0=0, pbar_Ntot_estimate_factor=None, pbar_Nlines_already=0, pbar_last=True)[source]

Uncompress urlname into local_file. Also add metadata

  • opener (an opener with an .open() command)

  • gfile (file handler. Filename: for info)


register in ~/radis.json

columns_GEISA = {'A': ('a10', <class 'float'>, 'Einstein A coefficient', 's-1'), 'El': ('a10', <class 'float'>, 'lower-state energy', 'cm-1'), 'Pshft': ('a9', <class 'float'>, 'air pressure-induced line shift at 296K', 'cm-1.atm-1'), 'Pshfts': ('a8', <class 'float'>, 'self pressure-induced line shift at 296K', 'cm-1.atm-1'), 'Tdpair': ('a4', <class 'float'>, 'temperature-dependance exponent for Gamma air', ''), 'Tdpnself': ('a4', <class 'float'>, 'temperature-dependance exponent for self pressure-induced line shift', ''), 'Tdppair': ('a6', <class 'float'>, 'temperature-dependance exponent for air pressure-induced line shift', ''), 'Tdpself': ('a4', <class 'float'>, 'temperature-dependance exponent for self-broadening halfwidth', ''), 'airbrd': ('a6', <class 'float'>, 'air-broadened half-width at 296K', 'cm-1.atm-1'), 'globl': ('a25', <class 'str'>, 'electronic and vibrational global lower quanta', ''), 'globu': ('a25', <class 'str'>, 'electronic and vibrational global upper quanta', ''), 'id': ('a2', <class 'int'>, 'Hitran molecular number', ''), 'idG': ('a3', <class 'str'>, 'Internal GEISA code for the data identification', ''), 'ierrA': ('a10', <class 'float'>, 'estimated accuracy on the line position', 'cm-1'), 'ierrB': ('a11', <class 'str'>, 'estimated accuracy on the intensity of the line', 'cm-1/(molecule/cm-2)'), 'ierrC': ('a6', <class 'float'>, 'estimated accuracy on the air collision halfwidth', 'cm-1.atm-1'), 'ierrF': ('a4', <class 'float'>, 'estimated accuracy on the temperature dependence coefficient of the air-broadening halfwidth', ''), 'ierrN': ('a7', <class 'float'>, 'estimated accuracy on the self-broadened at 296K', 'cm-1.atm-1'), 'ierrO': ('a9', <class 'float'>, 'estimated accuracy on the air pressure shift of the line transition at 296K', 'cm-1.atm-1'), 'ierrR': ('a6', <class 'float'>, 'estimated accuracy on the temperature dependence coefficient of the air pressure shift', ''), 'ierrS': ('a4', <class 'float'>, 'estimated accuracy on the temperature dependence coefficient of the self-broadening halfwidth', ''), 'ierrT': ('a8', <class 'float'>, 'estimated accuracy on the self-pressure shift of the line transition at 296K', 'cm-1.atm-1'), 'ierrU': ('a4', <class 'float'>, 'estimated accuracy on the temperature dependence coefficient of the self pressure shift', ''), 'int': ('a11', <class 'str'>, 'intensity at 296K', 'cm-1/(molecule/cm-2)'), 'iso': ('a1', <class 'int'>, 'Hitran isotope number', ''), 'isoG': ('a3', <class 'int'>, 'GEISA isotope number', ''), 'locl': ('a15', <class 'str'>, 'electronic and vibrational local lower quanta', ''), 'locu': ('a15', <class 'str'>, 'electronic and vibrational local upper quanta', ''), 'mol': ('a3', <class 'int'>, 'GEISA molecular number', ''), 'selbrd': ('a7', <class 'float'>, 'self-broadened half-width at 296K', 'cm-1.atm-1'), 'wav': ('a12', <class 'float'>, 'vacuum wavenumber', 'cm-1')}[source]

parsing order of GEISA2020 format



gei2df(fname, cache=True, load_columns=None, verbose=True, drop_non_numeric=True, load_wavenum_min=None, load_wavenum_max=None, engine='pytables')[source]

Convert a GEISA [1] file to a Pandas dataframe. :Parameters: * fname (str) – GEISA file name.

  • cache (boolean, or ‘regen’) – 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.

  • load_columns (list) – columns to load. If None, loads everything. .. note:

    this is only relevant when loading from a cache file. To generate
    the cache file, all columns are loaded anyway.
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.api.cache_files.load_h5_cache_file`. Default 'None'.

  • engine (‘pytables’, ‘vaex’) – format for Hdf5 cache file, pytables by default.


df – dataframe containing all lines and parameters.

Return type:

pandas Dataframe


GEISA Database 2020 release can be downloaded from [2]


See also

hit2df(), cdsd2df()


Get non-empty lines of a chunk b, parsing the bytes.