Index: trunk/MagicSoft/TDAS-Extractor/Algorithms.tex
===================================================================
--- trunk/MagicSoft/TDAS-Extractor/Algorithms.tex	(revision 6112)
+++ trunk/MagicSoft/TDAS-Extractor/Algorithms.tex	(revision 6113)
@@ -16,5 +16,6 @@
 \begin{figure}[htp]
 \includegraphics[width=0.99\linewidth]{ExtractorClasses.eps}
-\caption{Sketch of the inheritances of three examplary MARS signal extractor classes: MExtractFixedWindow, MExtractTimeFastSpline and MExtractTimeAndChargeDigitalFilter}
+\caption{Sketch of the inheritances of three examplary MARS signal extractor classes: 
+MExtractFixedWindow, MExtractTimeFastSpline and MExtractTimeAndChargeDigitalFilter}
 \label{fig:extractorclasses}
 \end{figure}
@@ -402,7 +403,10 @@
 \end{eqnarray}
 
-where the last expression is matricial. $\chi^2$ is a continuous function of $\tau$ and will have to be discretized itself for a 
-desired resolution.  $\chi^2$ is also proportional to the auto noise-correlation matrix where increases in the noise level lead to 
-a multiplicative factor for all matrix elements and thus do not affect the position of the maximum of $\chi^2$.
+where the last expression is matricial. 
+$\chi^2$ is a continuous function of $\tau$ and will have to be discretized itself for a 
+desired resolution.  
+$\chi^2$ is in principle independent from the noise auto-correlation matrix if always the correct noise level is calculated there.
+In our case however, we decided to use one same matrix $\boldsymbol{B}$ for all levels of night-sky background since increases 
+in the noise level lead only to a multiplicative factor for all matrix elements and thus do not affect the position of the minimum of $\chi^2$.
 The minimum of $\chi^2$ is obtained for:
 
@@ -417,7 +421,11 @@
 
 \begin{eqnarray}
-0&=&-\boldsymbol{g}^T\boldsymbol{B}^{-1}\boldsymbol{y}+\boldsymbol{g}^T\boldsymbol{B}^{-1}\boldsymbol{g}\overline{E}+\boldsymbol{g}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}\overline{E\tau} 
+0&=&-\boldsymbol{g}^T\boldsymbol{B}^{-1}\boldsymbol{y}
+	+\boldsymbol{g}^T\boldsymbol{B}^{-1}\boldsymbol{g}\overline{E}
+	+\boldsymbol{g}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}\overline{E\tau} 
 \\
-0&=&-\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\boldsymbol{y}+\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\boldsymbol{g}\overline{E}+\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}\overline{E\tau} \ .
+0&=&-\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\boldsymbol{y}
+	+\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\boldsymbol{g}\overline{E}
+	+\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}\overline{E\tau} \ .
 \end{eqnarray}
 
@@ -425,22 +433,23 @@
 
 \begin{equation}
-\overline{E}(\tau) = \boldsymbol{w}_{\text{amp}}^T (\tau)\boldsymbol{y} \quad \mathrm{with} \quad \boldsymbol{w}_{\text{amp}} = \frac{ (\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}) \boldsymbol{B}^{-1} \boldsymbol{g} -(\boldsymbol{g}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}})  \boldsymbol{B}^{-1} \dot{\boldsymbol{g}}}  {(\boldsymbol{g}^T \boldsymbol{B}^{-1} \boldsymbol{g})(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}) -(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\boldsymbol{g})^2 } \ ,
-\end{equation}
-
-\begin{equation}
-\overline{E\tau}(\tau)= \boldsymbol{w}_{\text{time}}^T(\tau) \boldsymbol{y} \quad \mathrm{with} \quad \boldsymbol{w}_{\text{time}} = \frac{ ({\boldsymbol{g}}^T\boldsymbol{B}^{-1}{\boldsymbol{g}}) \boldsymbol{B}^{-1} \dot{\boldsymbol{g}} -(\boldsymbol{g}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}})  \boldsymbol{B}^{-1} {\boldsymbol{g}}}  {(\boldsymbol{g}^T \boldsymbol{B}^{-1} \boldsymbol{g})(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}) -(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\boldsymbol{g})^2 } \ .
-\end{equation}
-
+\overline{E}(\tau) = \boldsymbol{w}_{\text{amp}}^T (\tau)\boldsymbol{y} \quad \mathrm{with} \quad 
+	\boldsymbol{w}_{\text{amp}} 
+	= \frac{ (\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}) \boldsymbol{B}^{-1} \boldsymbol{g} -(\boldsymbol{g}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}})  \boldsymbol{B}^{-1} \dot{\boldsymbol{g}}}  
+	{(\boldsymbol{g}^T \boldsymbol{B}^{-1} \boldsymbol{g})(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}) -(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\boldsymbol{g})^2 } \ ,
+\end{equation}
+
+\begin{equation}
+\overline{E\tau}(\tau)= \boldsymbol{w}_{\text{time}}^T(\tau) \boldsymbol{y} \quad 
+	\mathrm{with} \quad \boldsymbol{w}_{\text{time}} 
+	= \frac{ ({\boldsymbol{g}}^T\boldsymbol{B}^{-1}{\boldsymbol{g}}) \boldsymbol{B}^{-1} \dot{\boldsymbol{g}} -(\boldsymbol{g}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}})  \boldsymbol{B}^{-1} {\boldsymbol{g}}}  
+	{(\boldsymbol{g}^T \boldsymbol{B}^{-1} \boldsymbol{g})(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}) -(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\boldsymbol{g})^2 } \ .
+\end{equation}
 
 Thus $\overline{E}$ and $\overline{E\tau}$ are given by a weighted sum of the discrete measurements $y_i$ 
 with the digital filtering weights for the amplitude, $w_{\text{amp}}(\tau)$, and time shift, $w_{\text{time}}(\tau)$
-where the time dependency gets discretized once again leading to a set of weights samples depending on the 
+where the time dependency gets discretized once again leading to a set of weights samples which themselves depend on the 
 discretized time $\tau$.
-
-\par
-\ldots {\textit{\bf IS THIS CORRECT LIKE THIS???}} \ldots
-\par
-
-Note the remaining time dependence of the two weights which follow from the dependency of $\boldsymbol{g}$ and 
+\par
+Note the remaining time dependency of the two weights samples which follow from the dependency of $\boldsymbol{g}$ and 
 $\dot{\boldsymbol{g}}$ on the position of the pulse with respect to the FADC bin positions.
 \par
@@ -452,5 +461,7 @@
 
 \begin{equation}
-\left(\boldsymbol{V}^{-1}\right)_{i,j}=\frac{1}{2}\left(\frac{\partial^2 \chi^2(E, E\tau)}{\partial \alpha_i \partial \alpha_j} \right) \quad \text{with} \quad \alpha_i,\alpha_j \in \{E, E\tau\} \ .
+\left(\boldsymbol{V}^{-1}\right)_{i,j}
+	=\frac{1}{2}\left(\frac{\partial^2 \chi^2(E, E\tau)}{\partial \alpha_i \partial \alpha_j} \right) \quad 
+	\text{with} \quad \alpha_i,\alpha_j \in \{E, E\tau\} \ .
 \end{equation}
 
@@ -458,5 +469,7 @@
 
 \begin{equation}\label{of_noise}
-\sigma_E^2=\boldsymbol{V}_{E,E}=\frac{\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}}{(\boldsymbol{g}^T \boldsymbol{B}^{-1} \boldsymbol{g})(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}) -(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\boldsymbol{g})^2} \ .
+\sigma_E^2=\boldsymbol{V}_{E,E}
+	=\frac{\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}}
+	{(\boldsymbol{g}^T \boldsymbol{B}^{-1} \boldsymbol{g})(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}) -(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\boldsymbol{g})^2} \ .
 \end{equation}
 
@@ -464,5 +477,7 @@
 
 \begin{equation}\label{of_noise_time}
-E^2 \cdot \sigma_{\tau}^2=\boldsymbol{V}_{E\tau,E\tau}=\frac{{\boldsymbol{g}}^T\boldsymbol{B}^{-1}{\boldsymbol{g}}}{(\boldsymbol{g}^T \boldsymbol{B}^{-1} \boldsymbol{g})(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}) -(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\boldsymbol{g})^2} \ .
+E^2 \cdot \sigma_{\tau}^2=\boldsymbol{V}_{E\tau,E\tau}
+	=\frac{{\boldsymbol{g}}^T\boldsymbol{B}^{-1}{\boldsymbol{g}}}
+	{(\boldsymbol{g}^T \boldsymbol{B}^{-1} \boldsymbol{g})(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}) -(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\boldsymbol{g})^2} \ .
 \end{equation}
 
@@ -506,5 +521,6 @@
 \includegraphics[totalheight=7cm]{noise_autocorr_AB_36038_TDAS.eps}
 \end{center}
-\caption[Noise autocorrelation.]{Noise autocorrelation matrix for open camera including the noise due to night sky background fluctuations.} \label{fig:noise_autocorr_AB_36038_TDAS}
+\caption[Noise autocorrelation.]{Noise autocorrelation matrix for open camera including the noise due to night sky background fluctuations.} 
+	\label{fig:noise_autocorr_AB_36038_TDAS}
 \end{figure}
 
@@ -546,7 +562,7 @@
 \end{figure}
 
-
-
-In the current implementation a two step procedure is applied to reconstruct the signal. The weight functions $w_{\mathrm{amp}}(t)$ and $w_{\mathrm{time}}(t)$ are computed numerically with a resolution of $1/10$ of an FADC slice. In the first step the quantities $e_{i_0}$ and $e\tau_{i_0}$ are computed using a window of $n$ slices:
+In the current implementation a two step procedure is applied to reconstruct the signal. The weight functions $w_{\mathrm{amp}}(t)$ 
+and $w_{\mathrm{time}}(t)$ are computed numerically with a resolution of $1/10$ of an FADC slice. 
+In the first step the quantities $e_{i_0}$ and $e\tau_{i_0}$ are computed using a window of $n$ slices:
 
 \begin{equation}
@@ -554,5 +570,6 @@
 \end{equation}
 
-for all possible signal start slices $i_0$. Let $i_0^*$ be the signal start slice with the largest $e_{i_0}$. Then in a second step the timing offset $\tau$ is calculated:
+for all possible signal start slices $i_0$. Let $i_0^*$ be the signal start slice with the largest $e_{i_0}$. 
+Then in a second step the timing offset $\tau$ is calculated:
 
 \begin{equation}
@@ -563,5 +580,6 @@
 
 \begin{equation}
-E=\sum_{i=i_0^*}^{i_0^*+n-1} w_{\mathrm{amp}}(t_i - \tau)y(t_{i+i_0^*}) \qquad E \theta=\sum_{i=i_0^*}^{i_0^*+n-1} w_{\mathrm{time}}(t_i - \tau)y(t_{i+i_0^*}) \ .
+E=\sum_{i=i_0^*}^{i_0^*+n-1} w_{\mathrm{amp}}(t_i - \tau)y(t_{i+i_0^*}) \qquad 
+	E \theta=\sum_{i=i_0^*}^{i_0^*+n-1} w_{\mathrm{time}}(t_i - \tau)y(t_{i+i_0^*}) \ .
 \end{equation}
 
