User:The Lamb of God/sandbox-Signal Transfer Function (SiTF)

The Signal transfer function (SiTF) is a measure of the signal output versus the signal input of an infrared system or sensor.

Evaluation
In evaluating the SiTF curve, the signal input and signal output are measured differentially; meaning, the differential of the input signal and differential of the output signal are calculated and plotted against eachother. An operator, using computer software, defines an arbitrary area, with a given set of data points, within the signal and backround regions of the output image of the infrared sensor, i.e. of the (Unit Under Test), (see Half Moon image below). The average signal and backround are calculated by averaging the data of each arbitrarily defined region. A second order polynomial curve is fitted  to the data of each line. Then, the polynomial is subtracted from the average signal and backround data to yield the new signal and backround. The difference of the new signal and backround data is taken to yield the net signal. Finally, the net signal is plotted versus the signal input. The signal input of the UUT is within its own spectral response. (e.g. Color Correlated Temperature, Pixel intensity, etc.). The slope of the linear portion of this curve is then found using the method of least squares.

SiTf Calculations
The average signal and backround are calculated by the following equations:

$$\mu\,Sig_{ave} = \frac{\sum_{i=o}^n X_i}{n} \qquad \qquad \mu\,Backround_{ave} = \frac{\sum_{i=0}^p Y_i}{p} $$


 * Where $$n\,$$ = the number of lines in the target area $$X\,$$ or $$Y\,$$
 * $$p\,$$ = the horizontal pixel resolution in the target area $$X\,$$ or $$Y\,$$
 * $$i\,$$ = the $$i\,$$th line or horizontal pixel resolution in the target area $$X\,$$ or $$Y\,$$
 * $$X\,$$ = an arbitrarily defined area in the illuminated portion of the image (Signal region).
 * $$Y\,$$ = an arbitrarily defined area in the non-illuminated portion of the image (Backround region).

A second order polynomial is calculated using a double summation: $$f(X)_i = \sum_{j=0}^m \sum_{i=0}^n a_j X_i^j \qquad \qquad f(Y)_i = \sum_{j=0}^m \sum_{i=0}^n a_j Y_i^j$$


 * $$f\,$$ = the output sequence best fit
 * $$X\,$$ = the input sequence (Signal Region)
 * $$Y\,$$ = the input sequence (Backround Region)
 * $$a\,$$ = the polynomial fit coefficient
 * $$m\,$$ = the polynomial order

The second order polynomial is subtracted from the original data and the mean is taken:

$$\mu\,Sig = \mu\,Sig_{ave} - f(X)_i \qquad \qquad \mu\,Backround = \mu\,Backround_{ave} - f(Y)_i$$

Then, the net signal is calculated:

$$Signal = \mu\,Sig - \mu\,Backround$$

SiTF curve
The SiTF curve is then given by the signal ouput data, (net signal data), plotted against the signal input data (see graph of SiTF to the right). All the data points in the linear region of the SiTF curve are used in the method of least squares to approximate a line.

Least squares fit calculation
Given $$n\,$$ data points $$(x_i\,,y_i\,)$$ a best fit line can be approximated by $$y = mx + b\,$$

$$ \begin{bmatrix} 1     & x_1    \\ 1     & x_2    \\ \vdots & \vdots \\ 1     & x_n \end{bmatrix}

\begin{bmatrix} b \\ m \end{bmatrix} =

\begin{bmatrix} y_1   \\ y_2   \\ \vdots \\ y_n \end{bmatrix} $$

Which can be rewritten:

$$ \begin{bmatrix} n       & \sum x_i  \\ \sum x_i & \sum x_i^2 \end{bmatrix}

\begin{bmatrix} b \\ m \end{bmatrix} =

\begin{bmatrix} \sum y_i \\ \sum x_iy_i \end{bmatrix} $$

Augmenting the matrix and performing simple row operations yields:

$$ \begin{bmatrix} 1                 & \frac{\sum x_i}{n}     & \frac{\sum y_i}{n} \\ \frac{\sum x_i}{n} & \frac{\sum x_i^2}{n}  & \frac{\sum x_iy_i}{n} \end{bmatrix} $$

Therefore:

$$ m = \frac{\frac{\sum x_iy_i}{n} - \frac{\sum x_i}{n} \frac{\sum y_i}{n}}{\frac{\sum x_i^2}{n}-(\frac{\sum x_i}{n})^2} \qquad \qquad b = \frac{\sum y_i}{n} - m \frac{\sum x_i}{n} $$