exo_k.adatabase
@author: jeremy leconte
Module containing a class to handle a database of CIA tables to compute opacities with it.
Module Contents
- class exo_k.adatabase.Adatabase(*str_filters, filenames=None, remove_zeros=False, **kwargs)[source]
Bases:
exo_k.util.spectral_object.Spectral_object
Class to group
Atable
objects and combine them in radiative transferInitializes aerosol tables and supporting data from a list of filenames.
- Parameters:
filenames (
list
) – List of names (not full path) of the input cia files. The files must be in the global search path.
A local search path can be specified with ‘search_path=’
See the options of
Atable
__init__ method.- atables
- r_eff_unit = None
- add_atables(*atables)[source]
Adds new
Atable
objects to a Adatabase.- Parameters:
atables (
Atable
) – As many Atables as you want.
- property names
- Gives the names of the aerosols in the database
- sample(wngrid, remove_zeros=True, use_grid_filter=True, sample_all_vars=True)[source]
Samples all the Atables in the database on the same wavenumber grid to be able to use them in radiative transfer modules.
Important
For this method, the default options are remove_zeros=True and use_grid_filter=True. This ensures that you do not count several contributinns twice when you use two different aerosol tables to represent the same aerosol type over two different spectral window (typically VI and IR)
- Parameters:
wngrid (
array
,np.ndarray
) – new wavenumber grid (cm-1)
See also
See
exo_k.atable.Atable.sample()
for further details on options.
- absorption_coefficient(aer_reffs_densities, wngrid_limit=None, log_interp=None)[source]
Computes the opacity for the whole mix specified (assumes data in MKS).
Warning
The unit and physical meaning of the result may change depending on the quantity provided in aer_reffs_densities. See
exo_k.atable.Atable.absorption_coefficient()
for further details.- Parameters:
aer_reffs_densities (
dict
) – A dictionary with aerosol names as keys and lists containing 2 floats (or arrays) as values. The values are the particle effective radii and number densities (or ratio of aerosol to gas number density).wngrid_limit (
array
,np.ndarray
, optional) – Smaller and bigger wavenumbers inside which to perform the calculation.
- Returns:
The opacity profile for the aerosols.
- Return type:
array
- optical_properties(aer_reffs_densities, wngrid_limit=None, log_interp=None, compute_all_opt_prop=True)[source]
Computes the optical properties for the mix of aerosols (assumes data in MKS).
Warning
The unit and physical meaning of the result may change depending on the quantity provided in aer_reffs_densities. See
exo_k.atable.Atable.absorption_coefficient()
for further details.- Parameters:
aer_reffs_densities (
dict
) – A dictionary with aerosol names as keys and lists containing 2 floats (or arrays) as values. The values are the particle effective radii and number densities (or ratio of aerosol to gas number density).wngrid_limit (
array
,np.ndarray
, optional) – Smaller and bigger wavenumbers inside which to perform the calculation.
- Returns:
The optical properties profile for the aerosols (in m^2).
- Return type:
array