radis.io.hitemp module¶
Created on Sun May 22 17:35:05 2022
@author: erwan
- fetch_hitemp(molecule, local_databases=None, databank_name='HITEMP-{molecule}', isotope=None, load_wavenum_min=None, load_wavenum_max=None, columns=None, cache=True, verbose=True, chunksize=100000, clean_cache_files=True, return_local_path=False, engine='default', output='pandas', parallel=True)[source]¶
Stream HITEMP file from HITRAN website. Unzip and build a HDF5 file directly.
Returns a Pandas DataFrame containing all lines.
- Parameters:
molecule (
"H2O", "CO2", "N2O", "CO", "CH4", "NO", "NO2", "OH"
) – HITEMP molecule. See https://hitran.org/hitemp/local_databases (str) – where to create the RADIS HDF5 files. Default
"~/.radisdb/hitemp"
. Can be changed inradis.config["DEFAULT_DOWNLOAD_PATH"]
or in ~/radis.json config filedatabank_name (str) – name of the databank in RADIS Configuration file Default
"HITEMP-{molecule}"
isotope (str, int or None) – load only certain isotopes :
'2'
,'1,2'
, etc. IfNone
, loads everything. DefaultNone
.load_wavenum_min, load_wavenum_max (float (cm-1)) – load only specific wavenumbers.
columns (list of str) – list of columns to load. If
None
, returns all columns in the file.
- Other Parameters:
cache (
True
,False
,'regen'
or'force'
) – ifTrue
, use existing HDF5 file. IfFalse
or'regen'
, rebuild it. If'force'
, raise an error if cache file cannot be used (useful for debugging). DefaultTrue
.verbose (bool)
chunksize (int) – number of lines to process at a same time. Higher is usually faster but can create Memory problems and keep the user uninformed of the progress.
clean_cache_files (bool) – if
True
clean downloaded cache files after HDF5 are created.return_local_path (bool) – if
True
, also returns the path of the local database file.engine (‘pytables’, ‘vaex’, ‘default’) – which HDF5 library to use to parse local files. If ‘default’ use the value from ~/radis.json
output (‘pandas’, ‘vaex’, ‘jax’) – format of the output DataFrame. If
'jax'
, returns a dictionary of jax arrays. If'vaex'
, output is avaex.dataframe.DataFrameLocal
Note
Vaex DataFrames are memory-mapped. They do not take any space in RAM and are extremely useful to deal with the largest databases.
parallel (bool) – if
True
, uses joblib.parallel to load database with multiple processes
- Returns:
df (pd.DataFrame) – Line list A HDF5 file is also created in
local_databases
and referenced in the RADIS config file with namedatabank_name
local_path (str) – path of local database file if
return_local_path
Examples
from radis import fetch_hitemp df = fetch_hitemp("CO") print(df.columns) >>> Index(['id', 'iso', 'wav', 'int', 'A', 'airbrd', 'selbrd', 'El', 'Tdpair', 'Pshft', 'ierr', 'iref', 'lmix', 'gp', 'gpp', 'Fu', 'branch', 'jl', 'syml', 'Fl', 'vu', 'vl'], dtype='object')
Explore Line Database Parameters
Explore Line Database ParametersDownload the HITEMP databaseScale Linestrengths of carbon-monoxide
Scale Linestrengths of carbon-monoxideCompare CO cross-sections from HITRAN, HITEMP, GEISA, and ExoMol
Compare CO cross-sections from HITRAN, HITEMP, GEISA, and ExoMolNotes
if using
load_only_wavenum_above/below
orisotope
, the whole database is anyway downloaded and uncompressed tolocal_databases
fast access .HDF5 files (which will take a long time on first call). Only the expected wavenumber range & isotopes are returned. The .HFD5 parsing useshdf2df()
See also
fetch_hitran()
,fetch_exomol()
,fetch_geisa()
,fetch_kurucz()
,hdf2df()
,fetch_databank()