# Signal to Noise Ratio of a Coded Slit Hyperspectral Sensor
## 2 Materials and Methods: The Signal to Noise (SNR) Model
### The SNR Model for Assessing the Utility of CA Multiplexed Sensing  
The hyperspectral data cube \(F\) of \(L\) spatial samples, \(M\) lines and \(N\) bands, is represented as the signal model in this work, i.e., it could be represented as \(F\in\mathbb{Z}_{+}^{L\times M\times N}\). Note that the multiplexing between elements of the signal from different spatial samples is not considered in the present CA sensor architecture, thus the signal recovery will not involve information of other spatial samples. Thus, one can restrict the analysis to the \(M\times N\) matrix \(F\in\mathbb{Z}_{+}^{M\times N}\) without loss of generality. Given a spatial sample, let \(Y_{i,j}\) be a random variable that represents the photoelectrons which are collected by detector element \(j\) in frame \(i\). As described previously, assume that there are \(N\) pixels in each spatial sample, i.e., \(j=1\ldots N\); and \(N\) frames of data are required for reconstruction so \(i=1\ldots N\). Additionally, let the spectral dispersion of the spectrograph be such that spatial sample \(m\) in band \(n+1\) is coincident with sample \(m+1\) in band \(n\) (i.e., a polychromatic point source would be imaged on the detector array as a line at an angle of 45 degrees to the rows and columns of the array). Let \(h_{k}\in\{0,1\}\) which denotes the transparency (or opacity) of the \(k^{\text{th}}\) element of the CA code and \(k=1\ldots 2N-1\). Hence:  
\[Y_{i,j}=\sum_{n=1}^{N}h_{N-n+j}F_{n,j-n+1-i}\]  
To illustrate this, consider the simplified example in Figure 5, which illustrates a single frame of data (single value of \(i\)):  
We consider reconstructing elements on the diagonal of \(F\) using elements on the diagonal of \(Y\). Although this only allows reconstruction of a portion of \(F\), further elements of \(F\) can be reconstructed using a different set of frames to form \(Y\). So, we form the vector \(\mathbf{y}= \begin{pmatrix}Y_{1,N}&Y_{2,N-1}&\cdots&Y_{N,1}\end{pmatrix} ^{T}\); then:  
\[\mathbf{y}= \begin{pmatrix}h_{2N-1}F_{1,N}+h_{2N-2}F_{1,N-1}+\ldots h_{N}F_{N,1}\\ h_{2N-2}F_{1,N}+h_{2N-3}F_{1,N-1}+\ldots h_{N-1}F_{N,1}\\ \vdots\\ h_{N}F_{1,N}+h_{N-1}F_{1,N-1}+\ldots h_{1}F_{N,1}\end{pmatrix} = \begin{pmatrix}h _{2N-1}&\cdots&h_{N}\\ \vdots&\ddots&\\ h_{N}&&h_{1}\end{pmatrix}\begin{pmatrix}F_{1,N}\\ F_{2,N-1}\\ \vdots\\ F_{N,1}\end{pmatrix} =H\mathbf{f} \tag{1}\]  
The CA code above can be represented by the matrix \(H\) which is in the form of a cyclic binary Hadamard matrix as shown in Equation (1). N.B. Equation (1) defines \(\mathbf{f}\) which is the diagonal of \(F\). Figure 4: (**a**) an example of a 31-band, visible light, airborne hyperspectral image, showing vehicles parked on a concrete pad. (**b**) Simulation of the central portion of the same image viewed through a sensor of the type considered in this paper. The “blurring” is due to multiple wavelengths overlapping at the focal plane, while some faint horizontal stripes are visible due to the aperture code. Note that multiple frames of this type are required to reconstruct the full hyperspectral image. (**c**) The aperture code used to simulate (**b**). Due to the presence of dark current (\(d\)) and various other noise sources (\(r\)) which are independent of the signal level, the total number of electrons counted for any individual measurement can be written as:  
\[\boldsymbol{y}_{tot}=\boldsymbol{y}+d+r \tag{2}\]  
(\(n\),\(m\)) (indices of \(F\)) at aperture code  
Let the notation \(\langle\rangle\) denote the expectation value of a random variable. The dark current term, \(d\sim Poisson(d)\), and the noise term, \(r\sim Normal\left(r,\sigma^{2}\right)\), which are both scalar, are added to every individual element of the vector \(\boldsymbol{y}\). The noise variable \(r\) could be understood as the collective effects of a variety of noise sources such as readout and quantization noises, etc. Note that typically \(r\) may be equal to 0.