pyLBL.webapi package¶
Submodules¶
pyLBL.webapi.hitran_api module¶
Defines the API for interacting with the HITRAN database.
- class pyLBL.webapi.hitran_api.HitranWebApi(api_key, api_version='v2', host='https://hitran.org', proxy=None)[source]¶
Bases:
objectControls access to HITRAN’s web API.
- api_key¶
String hitran.org api key.
- api_version¶
String version of the api to use.
- cross_section_directory¶
String directory where cross section files are located.
- host¶
URL to retrieve the data from.
- parameters¶
List of Struct objects describing the HITRAN parameters.
- proxy¶
Web proxy (optional).
- timestamp¶
String time stamp telling when the server was accessed.
- transition_directory¶
String directory where transitions files are located.
- download_cross_sections(molecules)[source]¶
Downloads cross-sections for molecules available in the HITRAN database.
- Parameters:
molecules – List of Struct objcts.
- Returns:
List of Struct objects containing the response data.
- download_data_sources(ids=None)[source]¶
Downloads information about the source of the line data (papers, etc.)
- Parameters:
ids – Isotopologue ids.
- Returns:
JSON string containing the response data.
- download_isotopologues(molecules)[source]¶
Downloads the isotopologues available in HITRAN.
- Parameters:
molecules – List of Struct objects.
- Returns:
List of Struct objects containing the response data.
- download_molecules()[source]¶
Downloads the molecules available in HITRAN.
- Returns:
List of Struct objects containing the response data.
- download_transitions(isotopologues, numin, numax, parameters=None)[source]¶
Downloads transitions for isotopologues available in HITRAN.
- Parameters:
isotopologues – List of Struct objects.
numin – Wavenumber lower bound [cm-1].
numax – Wavenumber upper bound [cm-1].
parameters – List of parameters to download.
- Returns:
List of Struct objects containing the response data.
pyLBL.webapi.tips_api module¶
Defines the API for interacting with the TIPS data stored on the web.
- exception pyLBL.webapi.tips_api.NoMoleculeError[source]¶
Bases:
BaseExceptionNo TIPS data found for this molecule.
