Index: trunk/MagicSoft/TDAS-Extractor/Algorithms.tex
===================================================================
--- trunk/MagicSoft/TDAS-Extractor/Algorithms.tex	(revision 5617)
+++ trunk/MagicSoft/TDAS-Extractor/Algorithms.tex	(revision 5623)
@@ -248,44 +248,8 @@
 where $\Delta T_{\mathrm{FADC}} = 3.33$ ns is the sampling intervall of the MAGIC FADCs.
 
-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^*}}
-\end{equation}
-
-and the weigths iterated:
-
-\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 \ .
-\end{equation}
-
-
-
-% This does not apply for MAGIC as the LONs are giving always a correlated noise (in addition to the artificial shaping)
-
-%In the case of an uncorrelated noise with zero mean the noise autocorrelation matrix is:
-
-%\begin{equation}
-%\boldsymbol{B}_{ij}= \langle b_i b_j \rangle \delta_{ij} = \sigma^2(b_i) \ ,
-%\end{equation}
-
-%where $\sigma(b_i)$ is the standard deviation of the noise of the discrete measurements. Equation (\ref{of_noise}) than becomes:
-
-
-%\begin{equation}
-%\frac{\sigma^2(b_i)}{\sigma_E^2} = \sum_{i=1}^{n}{g_i^2} - \frac{\sum_{i=1}^{n}{g_i \dot{g}_i}}{\sum_{i=1}^{n}{\dot{g}_i^2}} \ .
-%\end{equation}
+
+For an IACT there are two types of background noise. On the one hand there is the constantly present electronics noise, on the other hand the light of the night sky introduces a sizeable background noise to the measurement of Cherenkov photons from air showers.
+
+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. 
 
 \begin{figure}[h!]
@@ -296,4 +260,9 @@
 \end{figure}
 
+
+
+Using the average reconstructed pulpo pulse shape, see figure \ref{fig:pulpo_shape_low}, and the reconstructed noise autocorrelation matrix from a pedestal run with random triggers, the digital filter weights are computed. Figures \ref{fig:w_time_MC_input_TDAS} and \ref{fig:w_amp_MC_input_TDAS} show the parameterization of the amplitude and timing weights for the MC pulse shape as a fuction of the ...
+
+
 \begin{figure}[h!]
 \begin{center}
@@ -310,10 +279,51 @@
 \end{figure}
 
-\begin{figure}[h!]
-\begin{center}
-\includegraphics[totalheight=7cm]{shape_fit_TDAS.eps}
-\end{center}
-\caption[Shape fit.]{Full fit to the MC pulse shape with the MC input shape and a numerical fit using the digital filter.} \label{fig:shape_fit_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^*}}
+\end{equation}
+
+and the weigths iterated:
+
+\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 \ .
+\end{equation}
+
+
+
+% This does not apply for MAGIC as the LONs are giving always a correlated noise (in addition to the artificial shaping)
+
+%In the case of an uncorrelated noise with zero mean the noise autocorrelation matrix is:
+
+%\begin{equation}
+%\boldsymbol{B}_{ij}= \langle b_i b_j \rangle \delta_{ij} = \sigma^2(b_i) \ ,
+%\end{equation}
+
+%where $\sigma(b_i)$ is the standard deviation of the noise of the discrete measurements. Equation (\ref{of_noise}) than becomes:
+
+
+%\begin{equation}
+%\frac{\sigma^2(b_i)}{\sigma_E^2} = \sum_{i=1}^{n}{g_i^2} - \frac{\sum_{i=1}^{n}{g_i \dot{g}_i}}{\sum_{i=1}^{n}{\dot{g}_i^2}} \ .
+%\end{equation}
+
+
+
+
+
 
 
@@ -325,4 +335,19 @@
 \caption[Digital filter weights applied.]{Digital filter weights applied.} \label{fig:amp_sliding}
 \end{figure}
+
+
+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. 
+
+
+\begin{figure}[h!]
+\begin{center}
+\includegraphics[totalheight=7cm]{shape_fit_TDAS.eps}
+\end{center}
+\caption[Shape fit.]{Full fit to the MC pulse shape with the MC input shape and a numerical fit using the digital filter.} \label{fig:shape_fit_TDAS}
+\end{figure}
+
+
+
+
 
 
Index: trunk/MagicSoft/TDAS-Extractor/Introduction.tex
===================================================================
--- trunk/MagicSoft/TDAS-Extractor/Introduction.tex	(revision 5617)
+++ trunk/MagicSoft/TDAS-Extractor/Introduction.tex	(revision 5623)
@@ -8,5 +8,5 @@
 
 %an analog optical link \ci
-te{MAGIC-analog-link-2} to the counting house.
+%te{MAGIC-analog-link-2} to the counting house.
 
 
Index: trunk/MagicSoft/TDAS-Extractor/Reconstruction.tex
===================================================================
--- trunk/MagicSoft/TDAS-Extractor/Reconstruction.tex	(revision 5617)
+++ trunk/MagicSoft/TDAS-Extractor/Reconstruction.tex	(revision 5623)
@@ -26,5 +26,5 @@
 \end{figure}
 
-Figure \ref{fig:shape_green_high} shows the normalized average reconstructed pulse shape for green and UV calibration LED pulses \cite{MAGIC-calibration} as well as the normalized average reconstructed pulse shape for cosmics events. The pulse shape of the UV calibration pulses is quite similar to the reconstructed pulse shape for cosmics events, both have a FWHM of about 6.5 ns. As air showers due to hadronic cosmic rays trigger the telescope much more frequently than gamma showers the reconstructed pulse shape of the cosmics events corresponds mainly to hadron induced showers. The pulse shape due to electromagnetic air showers might be slightly different. The pulse shape for green calibration LED pulses is wider and has a pronounced tail.
+Figure \ref{fig:shape_green_high} shows the normalized average reconstructed pulse shapes for green and UV calibration LED pulses \cite{MAGIC-calibration} as well as the normalized average reconstructed pulse shape for cosmics events. The pulse shape of the UV calibration pulses is quite similar to the reconstructed pulse shape for cosmics events, both have a FWHM of about 6.3 ns. As air showers due to hadronic cosmic rays trigger the telescope much more frequently than gamma showers the reconstructed pulse shape of the cosmics events corresponds mainly to hadron induced showers. The pulse shape due to electromagnetic air showers might be slightly different. The pulse shape for green calibration LED pulses is wider and has a pronounced tail.
 
 
