Skip to article frontmatterSkip to article content

Derivation

We start with the Beer-Lambert law which relates the intensity of light to the properties of the material through which the light is traveling. The equation is commonly written as:

L(λ)=L0(λ)exp(αν(λ))L(\lambda) = L_0(\lambda) \exp \left(-\alpha \cdot \boldsymbol{\nu}(\lambda)\right)

where:

If we assume that there is a small absorption, i.e., αs<<1\alpha \cdot s<< 1, then we can do a first-order Taylor expansion of the exponential term to make this function simpler. We use the relationship that for small xx, then exp(x)1x\exp(-x) \approx 1 - x. If we apply this to the Beer-Lambert’s law, we get:

L(λ)L0(λ)αν(λ)L0(λ)L(\lambda) \approx L_0(\lambda) - \alpha \cdot \boldsymbol{\nu}(\lambda) \cdot L_0(\lambda)

We can re-define some of the terms to make this equation more interpretable. Firstly, let’s rearrange this equation to redefine is as the radiance due to the change in CH4_4 concentration.

ΔL(λ)=L(λ)L0(λ)αν(λ)L0(λ)\Delta L(\lambda) = L(\lambda) - L_0(\lambda) \approx - \alpha \cdot \boldsymbol{\nu}(\lambda) \cdot L_0(\lambda)

Next, we notice that the L0(λ)L_0(\lambda) is unknown. However, we can assume that we can approximate this with the background mean

L0(λ)μ(λ)[Wm2sr1nm1]But,L_0(\lambda) \approx \mu(\lambda) \hspace{5mm} [W m^{-2} sr^{-1} nm^{-1}]But,

Therefore, we can write the radiance due to the CH4_4 enhancement term as

ΔL(λ)αν(λ)μ(λ)\Delta L(\lambda) \approx - \alpha \cdot \boldsymbol{\nu}(\lambda) \cdot \mu(\lambda)

and likewise the optical depth term as

τ(λ)=αν(λ)\tau(\lambda) = \alpha \cdot \boldsymbol{\nu}(\lambda)

Finally, let’s define the target spectrum as

t(λ)=ν(λ)μ(λ)[Wm2sr1nm1][ppmm]1t(\lambda) = - \boldsymbol{\nu}(\lambda) \cdot \mu(\lambda) \hspace{5mm} [W m^{-2} sr^{-1} nm^{-1}][ppm \cdot m]^{-1}

which finally gives us the linear relationship

ΔL(λ)αt(λ)\Delta L(\lambda) \approx \alpha \cdot t(\lambda)

So, going back to the original measurement model, we can plug in our new definitions to get

L(λ)μ(λ)+αt(λ)L(\lambda) \approx \mu(\lambda) + \alpha \cdot t(\lambda)

We can assume that we never actually observe the true radiance, L(λ)L(\lambda), even with this simplified linear model. So, let’s add in the measurement model to include the noise, we get:

L(λ)=μ(λ)+αt(λ)y(λ)=L(λ)+ϵ(λ)\begin{aligned} L(\lambda) &= \mu(\lambda) + \alpha \cdot t(\lambda) \\ y(\lambda) &= L(\lambda) + \epsilon(\lambda) \\ \end{aligned}

where ϵ(λ)\epsilon(\lambda) is the instrument noise, surface reflectance variability, and atmospheric effects. This is a statistical linear model with a bias term (background mean) and additive noise.

In great Bayesian fashion, we can write the joint distribution of our variables and parameters

p(y,L,λ,θ)=p(yL,λ,θ)p(Lλ,θ)p(θ)p(y,L,\lambda,\theta) = p(y|L,\lambda,\theta)p(L|\lambda,\theta)p(\theta)

where:

This problem becomes a lot easier to solve as we simply the problem to a linear Gaussian model. We can write the likelihood function as

logp(θD,λ)=n=1NlogN(yn(λ)μ(λ)+αt(λ),Σ)+logp(θ)\log p(\theta | \mathcal{D}, \lambda) = \sum_{n=1}^{N} \log \mathcal{N}\left(y_n(\lambda) | \mu(\lambda) + \alpha \cdot t(\lambda), \Sigma\right) + \log p(\theta)

This log-likelihood term can be explicity written as

logp(αD,θ)=n=1Nyn(λ)μ(λ)αt(λ)Σ12+const\log p(\alpha | \mathcal{D}, \boldsymbol{\theta}) = \sum_{n=1}^{N} ||y_n(\lambda) - \mu(\lambda) - \alpha \cdot t(\lambda)||^2_{\Sigma^{-1}} + \text{const}

We can calculate the derivative of this log-likelihood term with respect to α\alpha and set it to zero to get a closed-form solution for the maximum likelihood estimate of α\alpha.

αlogp(αD,θ)=2t(λ)TΣ1[y(λ)μ(λ)αt(λ)]=0\partial_\alpha \log p(\alpha | \mathcal{D}, \boldsymbol{\theta}) = 2 t(\lambda)^T \Sigma^{-1} \left[y(\lambda) - \mu(\lambda) - \alpha \cdot t(\lambda)\right] = 0

Rearranging this equation gives us the maximum likelihood estimate of α\alpha.

α^=t(λ)TΣ1[y(λ)μ(λ)]t(λ)TΣ1t(λ)\hat{\alpha} = \frac{t(\lambda)^T \Sigma^{-1} \left[y(\lambda) - \mu(\lambda)\right]} {t(\lambda)^T \Sigma^{-1} t(\lambda)}

So, solving for α^\hat{\alpha}, will give us access to the enhancement concentration, ΔCH4=α^t(λ)\Delta \text{CH}_4 = \hat{\alpha} \cdot t(\lambda).


Approximations

Background Mean and Covariance

Let’s define the mean background mean and covariance spectrum. We need to assume that these can be calculated from the observations, D={yn}n=1N\mathcal{D}=\left\{y_n\right\}_{n=1}^{N}.

Background Mean:μy(λ)=E[Y]=1Ni=nNyn(λ)Background Cov:Σy(λ,λ)=Cov[Y,Y]=1N1n=1N[yn(λ)μ(λ)][yn(λ)μ(λ)]T\begin{aligned} \text{Background Mean}: && \mu_y(\lambda) &= \mathbb{E}[Y] = \frac{1}{N} \sum_{i=n}^{N} y_n(\lambda) \\ \text{Background Cov}: && \Sigma_y(\lambda,\lambda') &= \text{Cov}[Y,Y'] = \frac{1}{N-1} \sum_{n=1}^{N} \left[y_n(\lambda) - \mu(\lambda)\right] \left[y_n(\lambda') - \mu(\lambda')\right]^T \end{aligned}

This means that the only unknown parameter is the concentration enhancement, α\alpha.


RTM

RTM Model:ν:=ν(λ,AMF)=f(λ,AMF,θ)+ϵ\begin{aligned} \text{RTM Model}: && \boldsymbol{\nu}:=\boldsymbol{\nu}(\lambda, \text{AMF}) &= \boldsymbol{f}(\lambda,\text{AMF}, \boldsymbol{\theta}) + \epsilon \end{aligned}
t=AAMF(θ)μ(λ)t = - A \cdot AMF(\theta) \cdot \mu(\lambda)

Covariance Decomposition

Σ=UΛV\Sigma= U\Lambda V^\top

So the inverse will be

Σ1=VΛ1U\Sigma^{-1} = V \Lambda^{-1} U^\top

If we wish to use the regularized covariance matrix, we can use the decomposition

(Σ+λI)1=V(Λ+λI)1U\left(\Sigma + \lambda I\right)^{-1} = V \left(\Lambda + \lambda I\right)^{-1} U^\top

Covariance Regularization

We can use a shrinkage estimator to regularize the covariance matrix.

Σreg=(1γ)Σ+γtrace(Σ)dI\Sigma_{\text{reg}} = (1 - \gamma) \Sigma + \gamma \frac{\text{trace}(\Sigma)}{d} I

Logarithmic Matched Filter

Beginning with Beer-Lambert’s law (1), we can take the natural logarithm of both sides to get

logL(λ)=logL0(λ)αν(λ)\log L(\lambda) = \log L_0(\lambda) - \alpha \cdot \boldsymbol{\nu}(\lambda)

We can extract the optical depth term as

τ(λ)=αν(λ)=logL(λ)+logL0(λ)=logL(λ)L0(λ)=logL0(λ)L(λ)\begin{aligned} \tau(\lambda) &= - \alpha \cdot \boldsymbol{\nu}(\lambda) \\ &= -\log L(\lambda) + \log L_0(\lambda) \\ &= -\log \frac{L(\lambda)}{L_0(\lambda)} \\ &= \log \frac{L_0(\lambda)}{L(\lambda)} \end{aligned}

The key inversion problem still remains the same, as the L0(λ)L_0(\lambda) is still unknown for each pixel.

Strategy 1: Approximate Optical Depth

We could approximate the background mean again as L0(λ)μ(λ)L_0(\lambda) \approx \mu(\lambda). This would give us the optical depth as

τ(λ)log[μλLλ]\tau(\lambda) \approx \log \left[\frac{\mu_\lambda}{L_\lambda}\right]

Strategy 2: Log-Radiance Space

When we have a small perturbation in the radiance, we can use a first-order Taylor expansion to approximate the logarithm of the radiance. So, assuming we have the radiances plus a small perturbation, i.e.,

Lλμλ+ΔLλL_\lambda \approx \mu_\lambda + \Delta L_\lambda

where where ΔLλ<<μλ\Delta L_\lambda << \mu_\lambda.

Firstly, we should

τ(λ)log[μλμλ+ΔLλ]log[11+ΔLλ/μλ]log[1+ΔLλμλ]\begin{aligned} \tau(\lambda) &\approx \log \left[\frac{\mu_\lambda}{\mu_\lambda + \Delta L_\lambda}\right] \\ &\approx \log \left[\frac{1}{1+ \Delta L_\lambda/\mu_\lambda}\right] \\ &\approx - \log \left[1+ \frac{\Delta L_\lambda}{\mu_\lambda}\right] \end{aligned}

Using the Taylor expansion for small xx, log(1+x)x\log(1+x) \approx x for x<<1|x| << 1, we can approximate the optical depth as

τλΔLλμλ\tau_\lambda \approx - \frac{\Delta L_\lambda}{\mu_\lambda}

So, substituting the optical depth term τλ=αtλ\tau_\lambda = \alpha \cdot t_\lambda into this equation, we get

αtλΔLλμλ\alpha \cdot t_\lambda \approx - \frac{\Delta L_\lambda}{\mu_\lambda}

which yields

ΔLλαtλμλ\Delta L_\lambda \approx - \alpha \cdot t_\lambda \cdot \mu_\lambda

This yields the exact same approach as the linear matched filter, except that the target spectrum is nowNow,


Code Design

Matched Filter

# initialize obs data and target spectrum
data: Array["Samples Wavelength"] = ...  # Load your spectral data here
target_spectrum: XArray["Wavelength"] = ...  # Load or define your target spectrum here


# define the RTM model
params: PyTree = ...  # Load or define your RTM model parameters here
rtm_model: Callable[[data, target_spectrum], inferred_conc] = load_rtm_model(params)