Miscellaneous functions
Functions here are usually general "helper" or "utility" type functions that a likely used throughout different parts of RetrievalToolbox.
RetrievalToolbox.FWHM_to_sigma — Method
FWHM_to_sigma(FWHM::Number) -> Any
Calculates the standard deviation of a Gaussian for a given full width at half the maximum value.
RetrievalToolbox.H2O_VMR_to_specific_humidity — Method
H2O_VMR_to_specific_humidity(h2o::Number) -> Any
Calculates specific humidity from H2O VMR
RetrievalToolbox.check_for_not_finite — Method
check_for_not_finite(x::AbstractArray) -> Bool
For an array x, returns true if any element is not finite (as per isfinite), or false if all elements are finite.
RetrievalToolbox.findany — Method
findany(x::AbstractVector, a) -> Bool
Returns true if a is found within x, does not allocate.
Examples
julia> findany(["a", "b", "c", "d"], "b")
truejulia> findany([1,2,3,4,5], 10)
falseRetrievalToolbox.findanytype — Method
findanytype(x::AbstractVector, T) -> Bool
Returns true if any element within x is of type T, does not allocate.
RetrievalToolbox.ingest! — Method
ingest!(obj, field::Symbol, val::AbstractArray)
Sets a RetrievalToolbox type field and applies the correct unit conversion. This is the specialized function to deal with array-type values. This should be mostlya allocation-free.
Details
RetrievalToolbox.ingest! — Method
ingest!(obj, field::Symbol, val::Number)
Sets a RetrievalToolbox type field and applies the correct unit conversion
Details
RetrievalToolbox.levels_to_layers! — Method
levels_to_layers!(
layers::AbstractVector,
levels::AbstractVector;
logspace
)
For a given level vector, calculate the mid-layer values and store into layers. This function assumes that the layer-value is evaluated at the center point between the two adjacent levels.
RetrievalToolbox.levels_to_layers — Method
levels_to_layers(levels::AbstractVector; logspace) -> Any
For a given level object, create a new vector that contains the mid-layer vector. This function assumes that the layer-value is evaluated at the center point between the two adjacent levels.
RetrievalToolbox.maxmin — Method
maxmin(x::AbstractArray) -> Any
For an array x, returns the difference between the largest and smallest element maximum(x) - minimum(x).
RetrievalToolbox.pwl_value_1d_axb! — Method
a * b
RetrievalToolbox.specific_humidity_to_H2O_VMR — Method
specific_humidity_to_H2O_VMR(sh::Number) -> Any
Calculates H2O VMR from specific humidity