Creating and maintaining the local HITRAN database cache
The local HITRAN database cache is stored using the SQLite format. You can directly use and manipulate this database in order to filter for specific properties. In future versions some easy-to-use Julia filter functions will be added. For now you can create a view on a table (or multiple tables) and store them as a view which can be used by the α
function as a source table.
Basic database usage
HITRAN.open_database
— Methodopen_database(file_path::String)
Opens the SQLite database at the given file path and sets it as the current database. Only use this if you want to use multiple different database.
HITRAN.fetch!
— Functionfetch!([db,] name, global_ids, ν_min, ν_max, parameters)
Fetches new data from HITRANonline and stores it in the current database in the table given by name
. If the table with the given parameters already exists, no data download will be initiated.
Arguments
db
: The database to use for storage (optional)name
: The table name which can subsequently used as source table for theα
functionglobal_ids
: The global isotopologue ids to consider. You can also provide a tuple (or an array of tuples) withmolecule_id
,local_id
as identifiersν_min
: The minimum wavenumber in $cm^{-1}$ to considerν_max
: The minimum wavenumber in $cm^{-1}$ to considerparameters
: A list of parameters to fetch. You can use parameter groups using Symbols as shortcuts, e.g. :standard for all HITRAN standard parameters.
Parameter groups
There is a number of parameter groups you can use to define parameter lists for fetching line-by-line data. For now it is recommended to use :standard
and combine it with :ht_air
. A list of all parameter groups will be listed in the future.
Isotopologue IDs
HITRAN.iso_id
— Functioniso_id([db::SQLite.DB,] M::T, I::T) where T <: Union{Integer, AbstractVector{Integer}}
Returns the global isotopologue IDs for the given molecule ids and local ids provided either as single value or as array for both parameters.
Arguments
M
: molecule id or array of idsI
: local isotopologue id or array of ids
iso_id([db::SQLite.DB,] formulas::T) where T <: Union{String, AbstractVector{String}}
Returns the global isotopologue IDs for the given molecule or isotopologue formulas.