radis.db.hitemp_co2 moduleΒΆ
HITEMP CO2 Block-Aligned Partial Decompression.
Implements efficient partial downloading and decompression of the HITEMP CO2 database using block-aligned bzip2 decompression for specific wavenumber ranges.
@author: dcmvd
- get_bz2(session, file_url, offset=None, size=None, verbose=True)[source]ΒΆ
Download a byte range from a remote bzip2 file using HTTP range requests.
- Parameters:
session (requests.Session) β Authenticated session
file_url (str) β URL of the remote file
offset, size (int, optional) β Byte range to download. If None, downloads entire file.
verbose (bool, default True) β If True, prints progress and status messages
- Returns:
Downloaded file content
- Return type:
bytes
- partial_download_co2_chunk(target_wn_min, target_wn_max, session, output_file_path, verbose=True)[source]ΒΆ
Download and decompress a specific wavenumber range from HITEMP CO2 database.
Uses block-aligned partial decompression to extract only the requested wavenumber range without downloading the entire ~6GB file.
- Parameters:
target_wn_min, target_wn_max (float) β Wavenumber range to extract (cmβ»ΒΉ)
session (requests.Session) β Authenticated HITRAN session
output_file_path (str) β Where to save the decompressed data
verbose (bool, default True) β If True, prints progress and status messages