radis.test.io.test_hitemp module¶
Created on Tue Feb 2 13:51:40 2021
@author: erwan
- test_calc_hitemp_CO_noneq(verbose=True, *args, **kwargs)[source]¶
Test proper download of HITEMP CO database.
Good to test noneq calculations with direct-download of HITEMP.
05_HITEMP2020.par.bz2
is about 14 Mb. We still download it (once per machine) because it allows to compute & test noneq spectra, which failed with direct HITEMP download in RADIS 0.9.28.Approximate cost for the planet 🌳 : ~ 14 gr CO2 (hard to evaluate !).
- test_fetch_hitemp_OH_pytables(verbose=True, *args, **kwargs)[source]¶
Test proper download of HITEMP OH database, with two engines.
Good to test fetch_hitemp.
13_HITEMP2020.par.bz2
is only 900 kb so it can be run on online tests without burning the planet 🌳⚠️ if using the default
chunksize=100000
, it uncompresses in one pass (only 57k lines for OH) and we cannot test that appending to the same HDF5 works. So here we use a smaller chunksize of 20,000. .
- test_fetch_hitemp_OH_vaex(verbose=True, *args, **kwargs)[source]¶
Test proper download of HITEMP OH database, with two engines.
Good to test fetch_hitemp.
13_HITEMP2020.par.bz2
is only 900 kb so it can be run on online tests without burning the planet 🌳⚠️ if using the default
chunksize=100000
, it uncompresses in one pass (only 57k lines for OH) and we cannot test that appending to the same HDF5 works. So here we use a smaller chunksize of 20,000. .
- test_fetch_hitemp_all_molecules(molecule, verbose=True, *args, **kwargs)[source]¶
Test fetch HITEMP for all molecules whose download URL is available.
- ..warning::
this downloads gigabytes of data. It is unselected by default by Pytest (see radis/setup.cfg)
The bz2 compression factor gives about 17 MB / million lines :
OH (57 k lines) is only 900 kb
CO (0.7 M lines) is only ~14 Mb
CH4 (114 M lines) is 435 MB
If it fails, check the databases downloaded in ~/.radisdb
Notes
- Performance tests of chunksize tested on CO :
chunksize=1000000 > 22s , 1 iteration ~ 22s
chunksize=100000 > 18s, , 1 iteration ~ 4s
chunksize=50000 > 19s ,1 iteration ~ 2s
chunksize=1000 –> 90s , 1 iteration << 1s
- test_fetch_hitemp_partial_download_CO2(verbose=True, *args, **kwargs)[source]¶
Test partial download of HITEMP CO2 database.
Good to test fetch_hitemp.
CO2-02_02500-03000_HITEMP2010.h5
is only 20 MB so it can be run on online tests without burning the planet too much 🌳
- test_no_redownload(*args, **kwargs)[source]¶
Test that modification time for 2 successive hitemp fetch is the same, i.e., there is no redownload
- test_parse_hitemp_missing_labels_issue280(*args, **kwargs)[source]¶
Test dtype problems resulting from missing labels