Index: trunk/MagicSoft/TDAS-Extractor/Algorithms.tex
===================================================================
--- trunk/MagicSoft/TDAS-Extractor/Algorithms.tex	(revision 5704)
+++ trunk/MagicSoft/TDAS-Extractor/Algorithms.tex	(revision 5705)
@@ -188,5 +188,5 @@
 
 \begin{eqnarray}
-\chi^2(E, E\tau) &=& \sum_{i,j}(y_i-E g_i-E\tau \dot{g}_i) \boldsymbol{B}^{-1}_{ij} (y_j - E g_j-E\tau \dot{g}_i) \\
+\chi^2(E, E\tau) &=& \sum_{i,j}(y_i-E g_i-E\tau \dot{g}_i) \boldsymbol{B}^{-1}_{ij} (y_j - E g_j-E\tau \dot{g}_j) \\
 &=& (\boldsymbol{y} - E
 \boldsymbol{g} - E\tau \dot{\boldsymbol{g}})^T \boldsymbol{B}^{-1} (\boldsymbol{y} - E \boldsymbol{g}- E\tau \dot{\boldsymbol{g}}) \ ,
@@ -199,5 +199,5 @@
 \end{equation}
 
-This leads to the following two equations for the estimated amplitude $\overline{E}$ and the estimation for the product of amplitude and time offset $\overline{E\tau}$:
+Taking into account that $\boldsymbol{B}$ is a symmetric matrix, this leads to the following two equations for the estimated amplitude $\overline{E}$ and the estimation for the product of amplitude and time offset $\overline{E\tau}$:
 
 \begin{eqnarray}
@@ -225,5 +225,5 @@
 
 \begin{equation}
-\boldsymbol{V}^{-1}=\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}
 
@@ -231,11 +231,11 @@
 
 \begin{equation}\label{of_noise}
-\sigma_E^2=\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}
-
-The expected contribution of the noise to the estimated timing ,$\sigma_{\tau}$, is:
+\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}
+
+The expected contribution of the noise to the estimated timing, $\sigma_{\tau}$, is:
 
 \begin{equation}\label{of_noise_time}
-E^2 \cdot \sigma_{\tau}^2=\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,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}
 
@@ -252,4 +252,10 @@
 
 The electronics noise is largely white, uncorrelated in time. The noise from the night sky background photons is the superposition of the detector response to single photo electrons arriving randomly distributed in time. Figure \ref{fig:noise_autocorr_AB_36038_TDAS} shows the noise autocorrelation matrix for an open camera. The large noise autocorrelation in time of the current FADC system is due to the pulse shaping with a shaping constant of 6 ns. 
+
+In general the amplitude and timing weights, $\boldsymbol{w}_{\text{amp}}$ and $\boldsymbol{w}_{\text{time}}$, depend on the pulse shape, the derivative of the pulse shape and the noise autocorrelation. In the high gain samples the correlated night sky background noise dominates over the white electronics noise. Thus different noise levels just cause the noise autocorrelation matrix $\boldsymbol{B}$ to change by a factor, which cancells out in the weights calculation. Thus in the high gain the weights are to a very good approximation independent of the night sky background noise level.
+
+Contrary to that in the low gain samples ... .
+
+
 
 \begin{figure}[h!]
@@ -269,5 +275,5 @@
 \includegraphics[totalheight=7cm]{w_time_MC_input_TDAS.eps}
 \end{center}
-\caption[Time weights.]{Time weights.} \label{fig:w_time_MC_input_TDAS}
+\caption[Time weights.]{Time weights $w_{\mathrm{time}}(t_0) \ldots w_{\mathrm{time}}(t_5)$ for a window size of 6 FADC slices. The first weight $w_{\mathrm{time}}(t_0)$ is plotted as a fuction of the relative time $t_{\text{rel}}$ the trigger and the FADC clock in the range $[-0.5;0.5[ \ T_{\text{ADC}}$, the second weight in the range $[0.5;1.5[ \ T_{\text{ADC}}$ and so on. A binning resolution of $0.1  T_{\text{ADC}}$ has been chosen.} \label{fig:w_time_MC_input_TDAS}
 \end{figure}
 
@@ -276,19 +282,19 @@
 \includegraphics[totalheight=7cm]{w_amp_MC_input_TDAS.eps}
 \end{center}
-\caption[Amplitude weights.]{Amplitude weights.} \label{fig:w_amp_MC_input_TDAS}
+\caption[Amplitude weights.]{Amplitude weights $w_{\mathrm{amp}}(t_0) \ldots w_{\mathrm{amp}}(t_5)$ for a window size of 6 FADC slices. The first weight $w_{\mathrm{amp}}(t_0)$ is plotted as a fuction of the relative time $t_{\text{rel}}$ the trigger and the FADC clock in the range $[-0.5;0.5[ \ T_{\text{ADC}}$, the second weight in the range $[0.5;1.5[ \ T_{\text{ADC}}$ and so on. A binning resolution of $0.1  T_{\text{ADC}}$ has been chosen.} \label{fig:w_amp_MC_input_TDAS}
 \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:
-
-\begin{equation}
-e_{i_0}=\sum_{i=i_0}^{i=i_0+5} w_{\mathrm{amp}(t_i)}y(t_{i+i_0}) \qquad e\tau_{i_0}=\sum_{i=i_0}^{i=i_0+5} w(t_i)_{\mathrm{time}(t_i)}y(t_{i+i_0}) 
-\end{equation}
-
-for all possible signal start samples $i_0$. Let $i_0^*$ be the signal start sample with the largest $e_{i_0}$. Then in a seconst step the timing offset $\tau$ is calculated:
-
-\begin{equation}
-\tau=\frac{e\tau_{i_0^*}}{e_{i_0^*}}
+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}
+e_{i_0}=\sum_{i=i_0}^{i=i_0+n-1} w_{\mathrm{amp}}(t_i)y(t_{i+i_0}) \qquad (e\tau)_{i_0}=\sum_{i=i_0}^{i=i_0+n-1} w_{\mathrm{time}}(t_i)y(t_{i+i_0}) 
+\end{equation}
+
+for all possible signal start slicess $i_0$. Let $i_0^*$ be the signal start slice with the largest $e_{i_0}$. Then in a seconst step the timing offset $\tau$ is calculated:
+
+\begin{equation}
+\tau=\frac{(e\tau)_{i_0^*}}{e_{i_0^*}}
 \end{equation}
 
@@ -296,11 +302,11 @@
 
 \begin{equation}
-E_{i_0^*}=\sum_{i=i_0^*}^{i=i_0^*+5} w_{\mathrm{amp}(t_i - \tau)}y(t_{i+i_0^*}) \qquad E \tau_{i_0^*}=\sum_{i=i_0^*}^{i=i_0^*+5} w(t_i - \tau)_{\mathrm{time}(t_i)}y(t_{i+i_0^*}) \ .
-\end{equation}
-
-The reconstructed signal is then taken to be $E_{i_0^*}$ and the reconstructed arrival time $t_{\text{arrival}}$ is 
-
-\begin{equation}
-t_{\text{arrival}} = i_0^* + \tau_{i_0^*} + \tau \ .
+E=\sum_{i=i_0^*}^{i=i_0^*+n-1} w_{\mathrm{amp}}(t_i - \tau)y(t_{i+i_0^*}) \qquad E \theta=\sum_{i=i_0^*}^{i=i_0^*+n-1} w_{\mathrm{time}}(t_i - \tau)y(t_{i+i_0^*}) \ .
+\end{equation}
+
+The reconstructed signal is then taken to be $E$ and the reconstructed arrival time $t_{\text{arrival}}$ is 
+
+\begin{equation}
+t_{\text{arrival}} = i_0^* + \tau + \theta \ .
 \end{equation}
 
@@ -337,5 +343,5 @@
 
 
-Figure \ref{fig:shape_fit_TDAS} shows the FADC samples of a single MC event together with the result of a full fit of the input MC pulse shape to the simulated FADC samples together with the result of the numerical fit using the digital filter. 
+Figure \ref{fig:shape_fit_TDAS} shows the FADC slices of a single MC event together with the result of a full fit of the input MC pulse shape to the simulated FADC samples together with the result of the numerical fit using the digital filter. 
 
 
Index: trunk/MagicSoft/TDAS-Extractor/Changelog
===================================================================
--- trunk/MagicSoft/TDAS-Extractor/Changelog	(revision 5704)
+++ trunk/MagicSoft/TDAS-Extractor/Changelog	(revision 5705)
@@ -20,4 +20,10 @@
                                                  -*-*- END OF LINE -*-*-
 
+2005/01/05: Hendrik Bartko
+  * amp_sliding: figure updated
+  * time_sliding: figure updated
+  * Algorithms.tex: text updated
+  * Reconstruction.tex: text updated
+
 2004/01/05: Markus Gaug
   * Introduction.tex: Some changes in style
@@ -29,5 +35,4 @@
   * Performance.tex: included sections dealing with calibration (not yet 
     ready)
-
 
 
