eradiate.radprops.absorption.compute_sigma_a#
- eradiate.radprops.absorption.compute_sigma_a(ds, wl=<Quantity(550.0, 'nanometer')>, p=<Quantity(101325.0, 'pascal')>, t=<Quantity(288.15, 'kelvin')>, n=None, fill_values=None, methods=None)[source]#
Compute monochromatic absorption coefficient at given wavelength, pressure and temperature values.
- Parameters:
ds (
Dataset
) – Absorption cross-section data set.wl (
quantity
) – Wavelength [nm].p (
quantity
) – Pressure [Pa].Note
If
p
,t
andn
are arrays, their lengths must be the same.t (
quantity
) – Temperature [K].Note
If the coordinate
t
is not in the input datasetds
, the interpolation on temperature is not performed.n (
quantity
) – Number density [m^-3].Note
If
n
isNone
, the values oft
andp
are then used only to compute the corresponding number density.fill_values (
dict
, optional) – Mapping of coordinates (in["w", "pt"]
) and fill values (eitherNone
or float). If notNone
, out of bounds values are assigned the fill value during interpolation along the wavelength or pressure and temperature coordinates. IfNone
, out of bounds values will trigger the raise of aValueError
. Only one fill value can be provided for both pressure and temperature coordinates.methods (
dict
, optional) – Mapping of coordinates (in["w", "pt"]
) and interpolation methods. Default interpolation method is linear. Only one interpolation method can be specified for both pressure and temperature coordinates.
- Returns:
quantity
– Absorption coefficient values.- Raises:
ValueError – When wavelength, pressure, or temperature values are out of the range of the data set and the corresponding fill value in
fill_values
isNone
.
Warning
The values of the absorption cross-section at the desired wavelength, pressure and temperature values, \(\sigma_{a\lambda} (p, T)\), are obtained by interpolating the input absorption cross-section data set along the corresponding dimensions.
Notes
The absorption coefficient is given by:
\[k_{a\lambda} = n \, \sigma_{a\lambda} (p, T)\]where
\(k_{a\lambda}\) is the absorption coefficient [\(L^{-1}\)],
\(\lambda\) is the wavelength [\(L\)],
\(n\) is the number density [\(L^{-3}\)],
\(\sigma_a\) is the absorption cross section [\(L^2\)],
\(p\) is the pressure [\(ML^{-1}T^{-2}\)] and
\(t\) is the temperature [\(\Theta\)].