Functions for blackbody thermal emission (and its derivatives) calculation
PlanckFunctions.PlanckFunctions — Module
PlanckFunctions module provides a set of functions for evaluating the Planck thermal emission spectrum intensity (spectral radiance) and its derivatives with respect to wavelength and temperature. It also provides function to evaluate the integral over the wavelength radiance and Rosseland-averaged and Planck-averaged of spectral coefficients.
Wavelength units are microns and all temperatures should be in Kelvins.
Main functions are: ibb - spectral intensity (spectral radiance) in [W/m²⋅sr⋅μm]
∇ₜibb - spectral intensity first derivative with respect to temperature
∇²ₜibb - spectral intensity second derivative with respect to temperature
∇ₗibb - spectral intensity first derivative with respect to wavelength
∇²ₗibb - spectral intensity second derivative with respect to wavelength
band_power , ∇ₜband_power , ∇²ₜband_power - total intensity (spectral radiance) in wavelength region together with its derivatives, [W/m²⋅sr]
spectral_ratio , ∇ₜspectral_ratio , ∇²ₜspectral_ratio - spectral intensity ratio for two wavelength (spectral ration pyrometer)
spectral_band_ratio , ∇ₜspectral_band_ratio , ∇²ₜspectral_band_ratio - spectral intensity ratio for two wavelength wavelength bands
planck_averaged - plack - averaged quantity (e.g. total emittance)
rosseland_averaged_attenuation - Rosseland-averaging of spectral attenuation
planck_averaged_attenuation - Planck-averaging of spectral attenuation
weighted_average - general function to evaluate averaged
Main literature sources are:
J.R.Howell,M.P.Menguc,J.R.Howell,M.P.Menguc,K.Daun,R.Siegel. Thermal radiation heat transfer. Seventh edition. 2021
Risch, T.K., User's Manual: Routines for Radiative Heat Transfer and Thermometry. NASA/TM-2016-219103. 2016, Edwards, California: Armstrong flight Research Center
https://physics.nist.gov/
PlanckFunctions.C₁ — Constant
C₁ constant for Planck function multiplier in [W⋅μm⁴/(m²⋅sr)]
source https://physics.nist.gov/PlanckFunctions.C₂ — Constant
C₂ constant for Planck spectral intensity exponent in [μm⋅K]
source https://physics.nist.gov/PlanckFunctions.C₃ — Constant
C₃ constant of Wien's displacement law [μm⋅K]
source https://physics.nist.gov/PlanckFunctions.C₃_∇₁ — Constant
Constant of the first derivaitve Wien's displacement
PlanckFunctions.C₃_∇₂ — Constant
Constant of the second derivaitve Wien's displacement
PlanckFunctions.C₄ — Constant
C₄ constant in equation for maximum blackbody intensity [W/(m²⋅μm⋅sr*K⁵)]
source https://physics.nist.gov/PlanckFunctions.c_big — Constant
Speed of light in vacuum
`c` [https://physics.nist.gov/] , m s^-1PlanckFunctions.h_big — Constant
Planck const
`h` [https://physics.nist.gov/] , J Hz^-1PlanckFunctions.kB_big — Constant
Boltzmann const
`kb` [https://physics.nist.gov/] , J K^-1PlanckFunctions.σ — Constant
Stefan-Boltzmann constant [W/(m²*K⁴)]source https://physics.nist.gov/
ChainRulesCore.frule — Method
frule((Δself, ΔT), ::typeof(band_power), T; λₗ=0.0, λᵣ=Inf, tol=1e-8)Forward-mode AD rule for band_power.
ChainRulesCore.frule — Method
frule((Δself, ΔT), ::typeof(band_power), T; λₗ=0.0, λᵣ=Inf, tol=1e-8)Forward-mode AD rule for band_power.
ChainRulesCore.frule — Method
frule((Δself, Δλ, ΔT), ::typeof(ibb), λ::Number, T::Number)Custom forward-mode automatic differentiation rule for the Planck function ibb(λ, T)
ChainRulesCore.rrule — Method
rrule(::typeof(ibb), λ::Number, T::Number)Custom reverse-mode automatic differentiation rule (pullback) for ibb(λ, T).
ChainRulesCore.rrule — Method
ChainRulesCore.rrule(
::typeof(band_power),
T::TT; λₗ::Number , λᵣ::Number
) where { TT<:Number}Custom reverse-mode automatic differentiation rule (pullback) for band_power(T; λₗ = λₗ , λᵣ = λᵣ).
PlanckFunctions.Dₗibb — Method
Dₗibb(λ,T)Returns a three-element tuple of (1.bb intensity,2.its first and 3.second derivative with respect to the wavelentgh)
Arguments:
λ - wavelength, μm T - temperature, K
PlanckFunctions.Dₜband_power — Method
Dₜband_power(T , skip_second_derivative::Val{true} ; λₗ=0.0 , λᵣ=Inf , tol=1e-8)returns the value and its derivative
PlanckFunctions.Dₜband_power — Method
Dₜband_power(T ; λₗ=0.0 , λᵣ=Inf , tol=1e-8)returns all derivatives
PlanckFunctions.Dₜibb! — Method
Dₜibb!(input_tuple, λ::AbstractVector,T)In-place filling the tuple of (bb intensity, its first ,and second ) derivatives with respect to temperature
Arguments:
input_tuple, {Nx0 vector or nothing , Nx0 vector or nothing, Nx0 vector or nothing} λ - wavelength, μm, [Nx0] T - temperature, K Out: input_tuple filled with ibb , dIbb/dT , d²Ibb/dT²
This version is slightly faster than calling each derivative separately
PlanckFunctions.Dₜibb — Method
Dₜibb( λ::Number, T::Number , skip_second_derivative::Val{true})Skips the second derivative evaluation $Dₜibb( λ, T , Val(true))$
PlanckFunctions.Dₜibb — Method
Dₜibb( λ::Number, T::Number)returns a tuple of (value, first derivative, second derivative)
PlanckFunctions.Dₜibb — Method
Dₜibb(λ::AbstractVector,T::AbstractVector)Calculates tuple of (Ibb,dIbb/dT,d²Ibb/dT²) calculated according to:
d²Ibb/dT² = C₁*(eᵃ¹/(eᵃ¹-1)²)*(C₂/(λ⁶*T³))*[(C₂/(λ*T))*(2*eᵃ¹/(eᵃ¹-1)-1)-2], d²Ibb/dT² = C₁*(eᵃ¹/(eᵃ¹-1)²)*(a₁/(λ⁵*T²))*[a₁*(2*eᵃ¹/(eᵃ¹-1) -1)-2], a₁=C₂/(λ*T), a₂ = 1/(eᵃ¹-1) , a₃ = eᵃ¹/(eᵃ¹-1) , d²Ibb/dT² = C₁*a₂*a₃*(a₁/(λ⁵*T²))*[a₁*(2*a₃ - 1))-2] as far as Ibb = (λ⁻⁵)* C₁*a₂ and dIbb/dT = C₁*a₃*a₂*a₁*(1/(λ⁵*T)) = a₃*a₁*Ibb/T hense d²Ibb/dT² = C₁*a₂*a₃*a₁*(1/(λ⁵*T²))*[a₁*(2*a₃ - 1))-2] = [a₃*a₁*Ibb/T^2]*[a₁*(2*a₃ - 1))-2] = [(dIbb/dT)/T]*[a₁*(2*a₃ - 1))-2]
Arguments:
λ - wavelength region, μm T - temperature, Kelvins
Returns:
(Ibb , dIbb/dT , d²Ibb/dT²)
PlanckFunctions.Dₜpower — Method
Dₜpower(T)Tuple of total intensity , fisrt and second derivative with respect to temeperature
PlanckFunctions.Dₜspectral_band_ratio — Method
Dₜspectral_band_ratio(λ1::NTuple{2, TL}, λ2::NTuple{2,TL}, T::Number , skip_second_derivative::Val{true}; e_slope::Number=1.0 , tol = 1e-6) where TL <: NumberIgnores the second derivative evaluation
PlanckFunctions.Dₜspectral_band_ratio — Method
Dₜspectral_band_ratio(λ1::NTuple{2, TL}, λ2::NTuple{2,TL}, T::Number; e_slope::Number=1.0 , tol = 1e-6) where TL <: NumberAll spectral band ratio derivatives are in one tuple
Arguments
λ1- tuple of left and right wavelength of the first band, in μm. λ2- tuple of left and right wavelength of the second band, in μm. T- Absolute temperature, in K. e_slope- Spectral emissivity at λ1 to λ2 ratio (default: 1.0)
PlanckFunctions.Dₜspectral_ratio — Method
Dₜspectral_ratio(λ1::Number, λ2::Number, T::Number; e_slope::Number=1.0)All spectral ratio derivatives in one tuple
Arguments
λ1- First wavelength (usually the shorter one), in μm. λ2- Second wavelength (usually the longer one), in μm. T- Absolute temperature, in K. e_slope- Spectral emissivity at λ1 to λ2 ratio (default: 1.0).
PlanckFunctions.attenuated_band_power — Method
attenuated_band_power(T, τ::AbstractVector, λ::AbstractVector; tol=1e-6)Evaluates the integrated band power of BB with temperature T reaching the detector, accounting for the spectral transmittance profile τ(λ).
Arguments:
T - temeperature , K τ - transmittance λ - wavelength , μm
PlanckFunctions.a₁₂₃! — Method
a₁₂₃!(amat::AbstractMatrix,λ::AbstractVector,T::Number)In-place filling of the intermediate matrix a₁=C₂/(λ*T) - amat first column a₂ = 1/(eᵃ¹-1) - amat second column a₃ = eᵃ¹/(eᵃ¹-1) - amat third column
Arguments:
amat - matrix of intermediate coefficients size [Nx3], λ - wavelength , μm, [Nx0], T - temperature, K,
PlanckFunctions.a₁₂₃ — Method
a₁₂₃(λ::Float64,T::Float64)Arguments:
amat - matrix of intermediate coefficients size [Nx3] λ - wavelength , μm, [Nx0] T - temperature, K
Returns tuple:
(a1 = C₂/(λ*T), a2 = 1/expm1(a1), a3 = 1 + a2)
PlanckFunctions.band_power — Method
band_power(T;λₗ=0.0 , λᵣ=Inf , tol=1e-8)Total bb with temperature T integral intensity within (in-band radiance), [W/(m²⋅sr)] the spectral range λₗ...λᵣ (by default the range is 0...inf) tol - tolerance of intehration
Arguments:
T - temperature,Kelvins (optional) λₗ - left wavelength boundary, μm λᵣ - right wavelength boundary, μm tol - intergation tolerance
PlanckFunctions.bb_max — Method
bb_max(T::Number)Blackbody instensity at maximum value
PlanckFunctions.bb_max — Method
bb_max(bb_function , T)Returns the value of function at a maximum bb_function can be ibb , ∇ₜibb , ∇²ₜibb
PlanckFunctions.bright_temperature — Method
bright_temperature(i, λ; ϵ=1.0)Evaluates bright temperature for single wavelength pyrometer i - measured intensity , λ - wavelength, μm ϵ - emissivity
PlanckFunctions.ibb! — Method
ibb!(i::AbstractVector , λ::AbstractVector , amat::AbstractMatrix)In-place blackbody intensity with intermediate coefficients provided externally, [W/m2-sr-mkm] Ibb = C₁*(λ⁻⁵)*a₂ , where a₁=C₂/(λ*T) - amat first column a₂ = 1/(eᵃ¹-1) - amat second column
Arguments:
i - BB intensity, [Nx0] λ - wavelength in μm, [Nx0] amat - matrix of intermediate coefficients, [Nx3]
PlanckFunctions.ibb! — Method
ibb!(i::AbstractVector , λ::AbstractVector , T::Number)In-place blackbody intensity, [W/m²⋅sr⋅μm] Ibb = (λ⁻⁵)* C₁/(eᵃ¹-1) , where a₁=C₂/(λT)
Arguments:
i - bb intensity vector, [Nx0] λ - wavelength in μm, [Nx0] T - temperature in Kelvins
PlanckFunctions.ibb — Method
ibb(λ::AbstractVector,amat::AbstractMatrix)Blackbody spectral intensity (spectral radiance) with intermediate matrix provided externally, [W/m²⋅sr⋅μm] Ibb = C₁*(λ⁻⁵)*a₂ , a₁=C₂/(λ*T) - amat first column, a₂ = 1/(eᵃ¹-1) - amat second column
Arguments:
amat - matrix of intermediate coefficients, [Nx3] λ - wavelength in μm, [Nx0]
PlanckFunctions.ibb — Method
ibb(λ::AbstractVector,T::AbstractVector)Blackbody spectral intensity (spectral radiance), [W/m²⋅sr⋅μm] Ibb = (λ⁻⁵)* C₁/(eᵃ¹-1) , where a₁=C₂/(λ*T)
Arguments:
λ - wavelength in μm, [Nx0] T - temperature in Kelvins [Mx0]
PlanckFunctions.ibb — Method
ibb(λ,T)Blackbody spectral intensity (spectral radiance), [W/m²⋅sr⋅μm] Ibb = (λ⁻⁵)* C₁/(eᵃ¹-1) , a₁=C₂/(λ*T)
Arguments:
λ - wavelength in μm T - temperature in Kelvins
PlanckFunctions.planck_averaged — Method
planck_averaged(x::AbstractVector, λ::AbstractVector,T::Number)Evaluates the Planck-averaged value of x(λ) for temperature T:
xᵣ = ∫x(λ)ibb(λ,T)dλ/∫ibb(λ,T)dλ
E.g. can be used to evaluate the integral from spectral emissivity
PlanckFunctions.planck_averaged_attenuation — Method
planck_averaged_attenuation(α::AbstractVector, λ::AbstractVector,T::Number)Planck-averaged spectral attenuation coefficient (the summation of spectral scattering and absorption coefficients) α(λ) for temperature T:
αᵣ = (∫(1/α(λ))⋅ibb(λ,T)dλ/∫ibb(λ,T)dλ)⁻¹
PlanckFunctions.power — Method
power(T)Integral (over the wavelength) intensity of BB (radiance) at temperature T
Units: W/(m²⋅sr)
Arguments:
T - temperature, K
PlanckFunctions.rosseland_averaged_attenuation — Method
rosseland_averaged_attenuation(α::AbstractVector, λ::AbstractVector,T::Number)Evaluates the Rosseland-averaged spectral attenuation coefficient (the summation of spectral scattering and absorption coefficients) α(λ) for temperature T:
αᵣ = (∫(1/α(λ))⋅∇ₜibb(λ,T)dλ/∫∇ₜibb(λ,T)dλ)⁻¹
PlanckFunctions.second_order_polynomial_fit — Method
second_order_polynomial_fit(x1,x2,x3,g1,g2,g3)Hardcoded second order polynomial lsqr fitting
PlanckFunctions.spectral_band_ratio — Method
spectral_band_ratio(λ1::NTuple{2, TL}, λ2::NTuple{2,TL}, T::Number; e_slope::Number=1.0 , tol = 1e-6) where TL <: NumberThe same as spectral_ratio, but now the band can be wide (not a single wavelength). This may be useful for two-color pyrometers when their working regions width cannot be ignored
Arguments
λ1- tuple of left and right wavelength of the first band, in μm. λ2- tuple of left and right wavelength of the second band, in μm. T- Absolute temperature, in K. e_slope- Spectral emissivity at λ1 to λ2 ratio (default: 1.0)
PlanckFunctions.spectral_ratio — Method
spectral_ratio(λ1::Number, λ2::Number, T::Number; e_slope::Number=1.0)Calculate the theoretical intensity ratio R = e_slope * ( Ibb1/Ibb2) between two wavelengths λ1 and λ2 at temperature T, accounting for the spectral emissivities e_slope = ε1/ε2.
Arguments
λ1- First wavelength (usually the shorter one), in μm. λ2- Second wavelength (usually the longer one), in μm. T- Absolute temperature, in K. e_slope- Spectral emissivity at λ1 to λ2 ratio (default: 1.0)
PlanckFunctions.temperature — Method
temperature(i)The bb temperature for intensity i corresponding to wavelength λ
PlanckFunctions.tₘ — Method
tₘ(λ)The temperature of BB having maximum at wavelength λ in Kelvins
PlanckFunctions.units — Method
units(f::Function)returns units string of output quantity return
PlanckFunctions.weighted_average — Function
weighted_average(α::AbstractVector,
λ::AbstractVector,
T::Number,
g::Dfunctions,
f::F = identity) where FGeneric function to evaluate the averaged value of some f(x) function of variable x dependent on wavelength λ for temperature T. Uses linear approximation for the discrete variable and square polynomial for the g function
xᵣ = ∫f(x)g(λ,T)dλ/∫g(λ,T)dλ the default value of f is identity, e.g. if f = inv: xᵣ = ∫g(λ,T)/x(λ)dλ/∫g(λ,T)dλ
PlanckFunctions.weighted_value — Method
weighted_value( α::AbstractVector,
λ::AbstractVector,
T ,
g::Union{typeof(ibb),typeof(∇ₜibb),typeof(∇²ₜibb)},
f::F = identity) where F <: FunctionReturns the tuple of (f(α)g(λ,T)dλ , ∫g(λ,T)dλ)
PlanckFunctions.λₘ — Method
λₘ(T::Number)The wavelength (in μm) of bb intensity maximum vs temperature T argmax(Planck(T)) - Wien's displacement law
Arguments:
T - temperature in Kelvins
PlanckFunctions.λₘ — Method
λₘ(::Union{typeof(ibb) , typeof(∇ₜibb) , typeof(∇²ₜibb)} , T::Number)The wavelength (in μm) of bb intensity , its first or second derivaitve maximum vs temperature T
Arguments:
T - temperature in Kelvins
PlanckFunctions.∇²ₗibb — Method
∇²ₗibb(λ,T)BB intensity second derivative with respect to the wavelength
Arguments:
λ - wavelength, μm T - temperature, K
PlanckFunctions.∇²ₜ — Function
∇²ₜ(f)
Differentiation operator returns the derivatives of functionibb , band_power , power , spectral_ratio , spectral_band_ratio
Examples
∇²ₜ(ibb) # -> ∇²ₜibb
∇²ₜ(band_power) # -> ∇²ₜband_powerPlanckFunctions.∇²ₜband_power — Method
∇²ₜband_power(T , band_power_value; λₗ=0.0 , λᵣ=Inf , tol=1e-8)Band power second derivative with respect to temeprature with band_power value evaluated externally
Arguments:
T - temperature,Kelvins
(optional) λₗ - left wavelength boundary, μm λᵣ - right wavelength boundary, μm tol - intergation tolerance
PlanckFunctions.∇²ₜband_power — Method
∇²ₜband_power(T ; λₗ=0.0 , λᵣ=Inf , tol=1e-8)Band power second derivative with respect to temeprature
Arguments:
T - temperature,Kelvins
(optional) λₗ - left wavelength boundary, μm λᵣ - right wavelength boundary, μm tol - intergation tolerance
PlanckFunctions.∇²ₜibb! — Method
∇²ₜibb!(h::AbstractMatrix{Float64} , λ::AbstractVector{Float64}, T::AbstractVector{Float64})In-place bb intensity second order derivative with respect to temperature
d²Ibb/dT² = C₁*(eᵃ¹/(eᵃ¹-1)²)*(C₂/(λ⁶*T³))*[(C₂/(λ*T))*(2*eᵃ¹/(eᵃ¹-1)-1)-2],
d²Ibb/dT² = C₁*(eᵃ¹/(eᵃ¹-1)²)*(a₁/(λ⁵*T²))*[a₁*(2*eᵃ¹/(eᵃ¹-1) -1)-2], a₁=C₂/(λ*T), a₂ = 1/(eᵃ¹-1) , a₃ = eᵃ¹/(eᵃ¹-1) ,
d²Ibb/dT² = C₁*a₂*a₃*(a₁/(λ⁵*T²))*[a₁*(2*a₃ - 1))-2]
Arguments :
h - to be filled, [Nx0] λ - wavelength in μm, [Nx0] T- tmperature in Kelvins
PlanckFunctions.∇²ₜibb! — Method
∇²ₜibb!(h::AbstractVector{Float64}, λ::AbstractVector{Float64} , T::Float64 ,amat::AbstractMatrix{Float64})::NothingIn-place bb intensity second order derivative with respect to temperature with intermediate matrix provided externally
d²Ibb/dT² = C₁*(eᵃ¹/(eᵃ¹-1)²)*(C₂/(λ⁶*T³))*[(C₂/(λ*T))*(2*eᵃ¹/(eᵃ¹-1)-1)-2],
d²Ibb/dT² = C₁*(eᵃ¹/(eᵃ¹-1)²)*(a₁/(λ⁵*T²))*[a₁*(2*eᵃ¹/(eᵃ¹-1) -1)-2], a₁=C₂/(λ*T), a₂ = 1/(eᵃ¹-1) , a₃ = eᵃ¹/(eᵃ¹-1) ,
d²Ibb/dT² = C₁*a₂*a₃*(a₁/(λ⁵*T²))*[a₁*(2*a₃ - 1))-2]
Arguments :
h - to be filled, [Nx0] λ- wavelength in μm, [Nx0] T - temperature in Kelvins amat - matrix of intermediate coefficients, [Nx3]
PlanckFunctions.∇²ₜibb! — Method
∇²ₜibb!(h::AbstractVector , λ::AbstractVector , T::Number)In-place bb intensity second order derivative with respect to temperature
Arguments :
h - to be filled, [Nx0] λ - wavelength in μm, [Nx0] T - tmperature in Kelvins
PlanckFunctions.∇²ₜibb! — Method
∇²ₜibb!(h::AbstractVector{Float64},T::Float64,amat::AbstractMatrix{Float64},∇i::AbstractVector{Float64})::NothingIn-place bb intensity second order derivative with respect to temperature with provided both the intermediate matrix amat and the the Planck function first derivative
d²Ibb/dT² = C₁*(eᵃ¹/(eᵃ¹-1)²)*(C₂/(λ⁶*T³))*[(C₂/(λ*T))*(2*eᵃ¹/(eᵃ¹-1)-1)-2]
d²Ibb/dT² = C₁*(eᵃ¹/(eᵃ¹-1)²)*(a₁/(λ⁵*T²))*[a₁*(2*eᵃ¹/(eᵃ¹-1) -1)-2] a₁=C₂/(λ*T) a₂ = 1/(eᵃ¹-1) , a₃ = eᵃ¹/(eᵃ¹-1) , d²Ibb/dT² = C₁*a₂*a₃*(a₁/(λ⁵*T²))*[a₁*(2*a₃ - 1))-2] as far as Ibb = (λ⁻⁵)* C₁*a₂ and dIbb/dT = C₁*a₃*a₂*a₁*(1/(λ⁵*T)) = a₃*a₁*Ibb/T hense
d²Ibb/dT² = C₁*a₂*a₃*a₁*(1/(λ⁵*T²))*[a₁*(2*a₃ - 1))-2] = [a₃*a₁*Ibb/T^2]*[a₁*(2*a₃ - 1))-2] = [(dIbb/dT)/T]*[a₁*(2*a₃ - 1))-2]
Arguments :
h - to be filled, [Nx0] λ - wavelength in μm, [Nx0] amat - matrix of intermediate coefficients, [Nx3] ∇i - vector of bb intensity first derivatives, [Nx0]
PlanckFunctions.∇²ₜibb — Method
∇²ₜibb(λ,T)BB intensity second derivative with respect to temperature
d²Ibb/dT² = C₁*(eᵃ¹/(eᵃ¹-1)²)*(C₂/(λ⁶*T³))*[(C₂/(λ*T))*(2*eᵃ¹/(eᵃ¹-1)-1)-2] ,
d²Ibb/dT² = C₁*(eᵃ¹/(eᵃ¹-1)²)*(a₁/(λ⁵*T²))*[a₁*(2*eᵃ¹/(eᵃ¹-1) -1)-2], a₁=C₂/(λ*T), a₂ = 1/(eᵃ¹-1), a₃ = eᵃ¹/(eᵃ¹-1) ,
d²Ibb/dT² = C₁*a₂*a₃*(a₁/(λ⁵*T²))*[a₁*(2*a₃ - 1))-2]
Arguments :
λ - wavelength in μm T - tmperature in Kelvins
PlanckFunctions.∇²ₜpower — Method
∇²ₜpower(T)Total intensity second derivative of BB (radiance) at temperature T
Units: W/(m²⋅sr⋅K)
Arguments:
T - temperature, K
PlanckFunctions.∇²ₜspectral_band_ratio — Method
∇²ₜspectral_band_ratio(λ1::NTuple{2, TL}, λ2::NTuple{2,TL}, T::Number; e_slope::Number=1.0 , tol = 1e-6) where TL <: NumberSpectral band ratio second derivative
Arguments
λ1- tuple of left and right wavelength of the first band, in μm. λ2- tuple of left and right wavelength of the second band, in μm. T- Absolute temperature, in K. e_slope- Spectral emissivity at λ1 to λ2 ratio (default: 1.0)
PlanckFunctions.∇²ₜspectral_ratio — Method
∇²ₜspectral_ratio(λ1::Number, λ2::Number, T::Number; e_slope::Number=1.0)Spectral ratio second derivative
Arguments
λ1- First wavelength (usually the shorter one), in μm. λ2- Second wavelength (usually the longer one), in μm. T- Absolute temperature, in K. e_slope- Spectral emissivity at λ1 to λ2 ratio (default: 1.0).
PlanckFunctions.∇²ₜ∫ibbₗ — Method
∇²ₜ∫ibbₗ(T; λₗ=0.0, λᵣ=Inf)Relative (with respect to the integral power in the whole spectrum) integral intensity derivative (analytic) of bb intensity fraction in the spectral range λₗ...λᵣ (by default the range is 0...inf)
Arguments:
T - temperature,Kelvins (optional) λₗ - left wavelength boundary, μm λᵣ - right wavelength boundary, μm
PlanckFunctions.∇ₗibb — Method
∇ₗibb(λ,T)BB intensity first derivative with respect to the wavelength
Arguments:
λ - wavelength, μm T - temperature, K
PlanckFunctions.∇ₜ — Function
∇ₜ(f)
Differentiation operator returns the derivatives function for the input functionibb , band_power , power , spectral_ratio , spectral_band_ratio and their derivatives e.g ∇ₜband_power etc.
Examples
∇ₜ(ibb) # -> ∇ₜibb
(∇ₜ∘∇ₜ)(ibb) # -> ∇²ₜspectral_band_ratioPlanckFunctions.∇ₜband_power — Method
∇ₜband_power(T , band_power_value; λₗ=0.0 , λᵣ=Inf)Evaluates bandpower derivative with respect to temperature with `bandpowervalue` provided externally (this may be usefull if one already has calculated the bandpower itself)
Arguments:
T - temperature,Kelvins band_power_value - band_power calculated elswhere
(optional) λₗ - left wavelength boundary, μm λᵣ - right wavelength boundary, μm tol - intergation tolerance
PlanckFunctions.∇ₜband_power — Method
∇ₜband_power(T;λₗ=0.0,λᵣ=Inf,tol=1e-6)Total bb with temperature T integral intensity derivative within (in-band radiance), [W/(m²⋅sr⋅K)] the spectral range λₗ...λᵣ (by default the range is 0...inf) tol - tolerance of integration
Arguments:
T - temperature,Kelvins (optional) λₗ - left wavelength boundary, μm λᵣ - right wavelength boundary, μm tol - intergation tolerance
PlanckFunctions.∇ₜibb! — Method
∇ₜibb!(g::AbstractMatrix , λ::AbstractVector , T::AbstractVector)In-place BB intensity first derivative with respect to temperature a₁=C₂/(λ*T) a₂ = 1/(eᵃ¹-1) a₃ = eᵃ¹/(eᵃ¹-1) dIbb/dT = C₁*a₃*a₂*a₁*(1/(λ⁵*T))
Arguments:
g - vector to be filled, [Nx0] λ - wavelength in μm, [Nx0] T - temperature in Kelvins
PlanckFunctions.∇ₜibb! — Method
∇ₜibb!(g::AbstractVector , λ::AbstractVector , T , amat::AbstractMatrix)In-place bb intensity first derivative with respect to temperature with externally provided amat - matrix with columns a₁,a₂,a₃
dIbb/dT = C₁*(eᵃ¹/(eᵃ¹-1)²)*(C₂/(λ⁶*T²)), a₁=C₂/(λ*T) , a₂ = 1/(eᵃ¹-1) , a₃ = eᵃ¹/(eᵃ¹-1) , dIbb/dT = C₁*a₃*a₂*a₁*(1/(λ⁵*T)),
Arguments:
g - to be filled, [Nx0] λ - wavelength in μm, [Nx0] T - temperature in Kelvins amat - matrix of intermediate coefficients, [Nx3]
PlanckFunctions.∇ₜibb! — Method
∇ₜibb!(g::AbstractVector , T , amat::AbstractMatrix , bb_intensity::AbstractVector)In-place bb intensity first derivative with respect to temperature with externally provided both amat - matrix with columns a₁,a₂,a₃ and bb_intensity
dIbb/dT = C₁(eᵃ¹/(eᵃ¹-1)²)(C₂/(λ⁶T²)) a₁=C₂/(λT) a₂ = 1/(eᵃ¹-1) # 1/expm1(a1) a₃ = eᵃ¹/(eᵃ¹-1) # exp(a)/expm1(a) dIbb/dT = C₁a₃a₂a₁(1/(λ⁵T)) as far as Ibb = C₁a₂/λ⁵ dIbb/dT = a₃a₁C₁(a₂/λ⁵)(1/T)=a₃a₁Ibb/T
Arguments:
g - to be filled, [Nx0] λ - wavelength in μm, [Nx0] T - temperature in Kelvins amat - matrix of intermediate coefficients, [Nx3]
PlanckFunctions.∇ₜibb — Method
∇ₜibb(λ::AbstractVector,T,amat::AbstractMatrix)BB intensity first derivative with respect to temperature with externally provided matrix of intermediate coefficients dIbb/dT = C₁*(eᵃ¹/(eᵃ¹-1)²)*(C₂/(λ⁶*T²)) a₁=C₂/(λ*T) a₂ = 1/(eᵃ¹-1) a₃ = eᵃ¹/(eᵃ¹-1) dIbb/dT = C₁*a₃*a₂*a₁*(1/(λ⁵*T))
Arguments:
λ - wavelength in μm, [Nx0] T - temperature in Kelvins amat - matrix of intermediate coefficients, [Nx3]
PlanckFunctions.∇ₜibb — Method
∇ₜibb(λ,T)BB intensity first derivative with respect to temperature dIbb/dT = C₁(eᵃ¹/(eᵃ¹-1)²)(C₂/(λ⁶T²)) `a₁=C₂/(λT)a₂ = 1/(eᵃ¹-1)# 1/expm1(a1)a₃ = eᵃ¹/(eᵃ¹-1)` # exp(a)/expm1(a) dIbb/dT = C₁a₃a₂a₁(1/(λ⁵*T))
Arguments:
λ - wavelength, μm T - temperature, K
PlanckFunctions.∇ₜpower — Method
∇ₜpower(T)Total intensity first derivative of BB (radiance) at temperature T
Units: W/(m²⋅sr⋅K)
Arguments:
T - temperature, K
PlanckFunctions.∇ₜspectral_band_ratio — Method
∇ₜspectral_band_ratio(λ1::NTuple{2, TL}, λ2::NTuple{2,TL}, T::Number; e_slope::Number=1.0 , tol = 1e-6) where TL <: Number
First derivative of two wide spectral band ratioArguments
λ1- tuple of left and right wavelength of the first band, in μm. λ2- tuple of left and right wavelength of the second band, in μm. T- Absolute temperature, in K. e_slope- Spectral emissivity at λ1 to λ2 ratio (default: 1.0)
PlanckFunctions.∇ₜspectral_ratio — Method
∇ₜspectral_ratio(λ1::Number, λ2::Number, T::Number; e_slope::Number=1.0)Calculate the theoretical intensity ratio derivative dR/T =d/dT ( e_slope * ( Ibb1/Ibb2)) between two wavelengths λ1 and λ2 at temperature T, accounting for the spectral emissivities e_slope = ε1/ε2.
Arguments
λ1- First wavelength (usually the shorter one), in μm. λ2- Second wavelength (usually the longer one), in μm. T- Absolute temperature, in K. e_slope- Spectral emissivity at λ1 to λ2 ratio (default: 1.0).
PlanckFunctions.∇ₜ∫ibbₗ — Method
∇ₜ∫ibbₗ(T; λₗ=0.0, λᵣ=Inf)Relative (with respect to the integral power in the whole spectrum) integral intensity derivative (analytic) of bb intensity fraction in the spectral range λₗ...λᵣ (by default the range is 0...inf)
Arguments:
T - temperature,Kelvins (optional) λₗ - left wavelength boundary, μm λᵣ - right wavelength boundary, μm
PlanckFunctions.∫ibbₗ — Method
∫ibbₗ(T;λₗ=0.0,λᵣ=Inf,tol=1e-6)Relative (with respect to the integral power in the whole spectrum) integral intensity of bb in the spectral range λₗ...λᵣ (by default the range is 0...inf)
Arguments:
`T - temperature,Kelvins
(optional)
λₗ - left wavelength boundary, μm λᵣ - right wavelength boundary, μm tol - intergation tolerance
PlanckFunctions.∫ₗ — Method
∫ₗ(f::F , λ₁::Number, λ₂::Number) where F <: Union{typeof(ibb), typeof(∇²ₜibb), typeof(∇ₜibb)}Returns a callable object which returns the f function integral as a function of temperature
f = ∫ₗ(ibb , 2.3 , 4.5)
f(1273.5) # returns the value of Planck function integrated over 2.3 - 4.5 spectral range at temperature 1273,5 K