\section{Calibration \label{sec:calibration}}


In this section, we describe the tests performed using light pulses of different colour, 
pulse shapes and intensities with the MAGIC LED Calibration Pulser Box \cite{hardware-manual}. 
\par
The LED pulser system is able to provide fast light pulses of 3--4\,ns FWHM 
with intensities ranging from 3--4 to more than 500 photo-electrons in one inner photo-multiplier of the 
camera. These pulses can be produced in three colours {\textit {\bf green, blue}} and 
{\textit{\bf UV}}.

\begin{table}[htp]
\centering
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
\hline
\multicolumn{7}{|c|}{The possible pulsed light colours} \\
\hline
\hline
Colour &  Wavelength & Spectral Width & Min. Nr. &  Max. Nr. & Secondary & FWHM \\
      & [nm]         & [nm]           &  Phe's   &  Phe's    & Pulses  &  Pulse [ns]\\
\hline
Green &  520      & 40      & 6          &  120      & yes  & 3--4  \\
\hline
Blue &  460       & 30      & 6          &  500      & yes  & 3--4 \\
\hline
UV   &  375       & 12      & 3          &  50       & no   & 2--3 \\ 
\hline
\hline
\end{tabular}
\caption{The pulser colours available from the calibration system}
\label{tab:pulsercolours}
\end{table}

Table~\ref{tab:pulsercolours} lists the available colours and intensities and 
figures~\ref{fig:pulseexample1leduv} and~\ref{fig:pulseexample23ledblue} show exemplary pulses 
as registered by the FADCs.
Whereas the UV-pulse is very stable, the green and blue pulses show sometimes smaller secondary 
pulses after about 10--40\,ns from the main pulse.
One can see that the very stable UV-pulses are unfortunately only available in such intensities as to 
not saturate the high-gain readout channel. However, the brightest combination of light pulses easily 
saturates all channels in the camera, but does not reach a saturation of the low-gain readout.
\par
Our tests can be classified into three subsections:

\begin{enumerate}
\item Un-calibrated pixels and events: These tests measure the percentage of failures of the extractor 
resulting either in a pixel declared as un-calibrated or in an event which produces a signal outside 
of the expected Gaussian distribution.
\item Number of photo-electrons: These tests measure the reconstructed numbers of photo-electrons, their 
spread over the camera and the ratio of the obtained mean values for outer and inner pixels, respectively.
\item Linearity tests: These tests measure the linearity of the extractor with respect to pulses of 
different intensity and colour.
\item Time resolution: These tests show the time resolution and stability obtained with different 
intensities and colours.
\end{enumerate}

\begin{figure}[htp]
\centering
\includegraphics[width=0.48\linewidth]{1LedUV_Pulse_Inner.eps}
\includegraphics[width=0.48\linewidth]{1LedUV_Pulse_Outer.eps}
\caption{Example of a calibration pulse from the lowest available intensity (1\,Led UV). 
The left plot shows the signal obtained in an inner pixel, the right one the signal in an outer pixel.
Note that the pulse height fluctuates much more than suggested from these pictures. Especially, a 
zero-pulse is also possible.}
\label{fig:pulseexample1leduv}
\end{figure}

\begin{figure}[htp]
\centering
\includegraphics[width=0.48\linewidth]{23LedsBlue_Pulse_Inner.eps}
\includegraphics[width=0.48\linewidth]{23LedsBlue_Pulse_Outer.eps}
\caption{Example of a calibration pulse from the highest available mono-chromatic intensity (23\,Leds Blue). 
The left plot shows the signal obtained in an inner pixel, the right one the signal in an outer pixel.
One the left side of both plots, the (saturated) high-gain channel is visible, 
on the right side from FADC slice 18 on, 
the delayed low-gain 
pulse appears. Note that in the left plot, there is a secondary pulses visible in the tail of the 
high-gain pulse. }
\label{fig:pulseexample23ledblue}
\end{figure}

We used data taken on the 7$^{th}$ of June, 2004 with different pulser LED combinations, each taken with 
16384 events. 19 different calibration configurations have been tested. 
The corresponding MAGIC data run numbers range from nr. 31741 to 31772. These data was taken 
before the latest camera repair access which resulted in a replacement of about 2\% of the pixels known to be 
mal-functioning at that time.
There is thus a lower limit to the number of un-calibrated pixels of about 1.5--2\% of known 
mal-functioning photo-multipliers.
\par
Although we had looked at and tested all colour and extractor combinations resulting from these data, 
we refrain ourselves to show here only exemplary behaviour and results of extractors. 
All plots, including those which are not displayed in this TDAS, can be retrieved from the following 
locations:

\begin{verbatim}
http://www.magic.ifae.es/~markus/pheplots/
http://www.magic.ifae.es/~markus/timeplots/
\end{verbatim}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{Un-Calibrated Pixels and Events}

The MAGIC calibration software incorporates a series of checks to sort out mal-functioning pixels. 
Except for the software bug searching criteria, the following exclusion criteria can apply:

\begin{enumerate}
\item The reconstructed mean signal is less than 2.5 times the extractor resolution $R$ from zero. 
(2.5 Pedestal RMS in the case of the simple fixed window extractors, see section~\ref{sec:pedestals}). 
This criterium essentially cuts out 
dead pixels.
\item The reconstructed mean signal error is smaller than its value. This criterium cuts out 
signal distributions which fluctuate so much that their RMS is bigger than its mean value. This 
criterium cuts out ``ringing'' pixels or mal-functioning extractors. 
\item The reconstructed mean number of photo-electrons lies 4.5 sigma outside 
the distribution of photo-electrons obtained with the inner or outer pixels in the camera, respectively. 
This criterium cuts out channels with apparently deviating (hardware) behaviour compared to 
the rest of the camera readout\footnote{This criteria is not applied any more in the standard analysis, 
although we kept using it here}.
\item All pixels with reconstructed negative mean signal or with a 
mean numbers of photo-electrons smaller than one. Pixels with a negative pedestal RMS subtracted 
sigma occur, especially when stars are focused onto that pixel during the pedestal taking (resulting 
in a large pedestal RMS), but have moved to another pixel during the calibration run. In this case, the 
number of photo-electrons would result artificially negative. If these 
channels do not show any other deviating behaviour, their number of photo-electrons gets replaced by the 
mean number of photo-electrons in the camera, and the channel is further calibrated as normal.
\end{enumerate}

Moreover, the number of events are counted which have been reconstructed outside a 5$\sigma$ region 
from the mean signal. These events are called ``outliers''. Figure~\ref{fig:outlier} shows a typical 
outlier obtained with the digital filter applied on a low-gain signal, and figure~\ref{fig:unsuited:all}
shows the average number of all excluded pixels and outliers obtained from all 19 calibration configurations.
One can already see that the largest window sizes yield a high number of un-calibrated pixels, mostly 
due to the missing ability to recognize the low-intensity pulses (see later). One can also see that 
the amplitude extracting spline yields a higher number of outliers than the rest of the extractors.
\par
The global champion in lowest number of un-calibrated pixels results to be 
{\textit{\bf MExtractTimeAndChargeSpline}} extracting the integral over two FADC slices (extractor \#25). 
The one with the lowest number of outliers is 
{\textit{\bf MExtractFixedWindowPeakSearch}} with an extraction range of 2 slices (extractor \#11). 

\begin{figure}[htp]
\centering
\includegraphics[width=0.95\linewidth]{Outlier.eps}
\caption{Example of an event classified as ``un-calibrated''. The histogram has been obtained 
using the digital filter (extractor \#32) applied to a high-intensity blue pulse (run 31772). 
The event marked as ``outlier'' clearly has been mis-reconstructed. It lies outside the 5 sigma 
region from the fitted mean.}
\label{fig:outlier}
\end{figure}

\begin{figure}[htp]
\centering
\includegraphics[height=0.75\textheight]{UnsuitVsExtractor-all.eps}
\caption{Un-calibrated pixels and outlier events averaged over all available 
calibration runs.}
\label{fig:unsuited:all}
\end{figure}

The following figures~\ref{fig:unsuited:5ledsuv},~\ref{fig:unsuited:1leduv},~\ref{fig:unsuited:2ledsgreen}
and~\ref{fig:unsuited:23ledsblue} show the resulting numbers of un-calibrated pixels and events for 
different colours and intensities. Because there is a strong anti-correlation between the number of 
excluded pixels and the number of outliers per event, we have chosen to show these numbers together. 

\par

\begin{figure}[htp]
\centering
\includegraphics[height=0.95\textheight]{UnsuitVsExtractor-5LedsUV-Colour-12.eps}
\caption{Un-calibrated pixels and outlier events for a typical calibration  
pulse of UV-light which does not saturate the high-gain readout.}
\label{fig:unsuited:5ledsuv}
\end{figure}

\begin{figure}[htp]
\centering
\includegraphics[height=0.95\textheight]{UnsuitVsExtractor-1LedUV-Colour-04.eps}
\caption{Un-calibrated pixels and outlier events for a very low 
intensity pulse.}
\label{fig:unsuited:1leduv}
\end{figure}

\begin{figure}[htp]
\centering
\includegraphics[height=0.95\textheight]{UnsuitVsExtractor-2LedsGreen-Colour-02.eps}
\caption{Un-calibrated pixels and outlier events for a typical green pulse.}
\label{fig:unsuited:2ledsgreen}
\end{figure}

\begin{figure}[htp]
\centering
\includegraphics[height=0.95\textheight]{UnsuitVsExtractor-23LedsBlue-Colour-00.eps}
\caption{Un-calibrated pixels and outlier events for a high-intensity blue pulse.}
\label{fig:unsuited:23ledsblue}
\end{figure}

One can see that in general, big extraction windows raise the 
number of un-calibrated pixels and are thus less stable. Especially for the very low-intensity 
\textit{\bf 1\,Led\,UV}-pulse, the big extraction windows -- summing 8 or more slices -- cannot calibrate more 
than 50\% of the inner pixels (fig.~\ref{fig:unsuited:1leduv}). 
This is an expected behavior since big windows 
sum up more noise which in turn makes the search for the small signal more difficult.
\par
In general, one can also find that all ``sliding window''-algorithms (extractors \#17-32) discard 
less pixels than the corresponding ``fixed window''-ones (extractors \#1--16). 

The spline (extractors \#23--27) and the digital filter with the correct weights (extractors \#30-33) discard 
the least number of pixels and are also robust against slight modifications of the pulse form 
(of the weights for the digital filter). 
\par
Concerning the numbers of outliers, one can conclude that in general, the numbers are very low never exceeding
0.1\% except for the amplitude-extracting spline which seems to mis-reconstruct a certain type of events.
It seems however that the spline algorithm extracting the amplitude of the signal produces an over-proportional
\par
In conclusion, already this first test excludes all extractors with too large window sizes because 
they are not able to extract cleanly small signals produced by about 4 photo-electrons. Moreover, 
the amplitude extracting spline produces a significantly higher number of outlier events.

\clearpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{Number of Photo-Electrons \label{sec:photo-electrons}}

Assuming that the readout chain adds only negligible noise to the one 
introduced by the photo-multiplier itself, one can make the assumption that the variance of the 
true signal, $S$, is the amplified Poisson variance of the number of photo-electrons, 
multiplied with the excess noise of the photo-multiplier which itself is 
characterized by the excess-noise factor $F$:

\begin{equation}
Var(S) = F^2 \cdot Var(N_{phe}) \cdot \frac{<S>^2}{<N_{phe}>^2}
\label{eq:excessnoise}
\end{equation}

After introducing the effect of the night-sky background (eq.~\ref{eq:rmssubtraction}) 
and assuming that the variance of the number of photo-electrons is equal 
to the mean number of photo-electrons (because of the Poisson distribution), 
one obtains an expression to retrieve the mean number of photo-electrons  impinging on the photo-multiplier from the 
mean extracted signal, $\widehat{S}$, and the RMS of the extracted signal obtained from 
pure pedestal runs $R$ (see section~\ref{sec:ffactor}):

\begin{equation}
<N_{phe}> \approx F^2 \cdot \frac{<\widehat{S}>^2}{Var(\widehat{S}) - R^2}
\label{eq:pheffactor}
\end{equation}

In theory, eq.~\ref{eq:pheffactor} must not depend on the extractor! Effectively, we will use it to test the 
quality of our extractors by requiring that a valid extractor yields the same number of photo-electrons 
for all pixels of a same type and does not deviate from the number obtained with other extractors. 
As the camera is flat-fielded, but the number of photo-electrons impinging on an inner and an outer pixel is 
different, we also use the ratio of the mean numbers of photo-electrons from the outer pixels to the one 
obtained from the inner pixels as a test variable. In the ideal case, it should always yield its central 
value of about 2.6$\pm$0.1~\cite{michele-diploma}.
\par
In our case, there is an additional complication due to the fact that the green and blue coloured light pulses 
show secondary pulses which destroy the Poisson behaviour of the number of photo-electrons. We will
have to split our sample of extractors into those being affected by the secondary pulses and those 
being immune to this effect. 
\par
Figures~\ref{fig:phe:5ledsuv},~\ref{fig:phe:1leduv},~\ref{fig:phe:2ledsgreen}~and~\ref{fig:phe:23ledsblue} show 
some of the obtained results. One can see a rather good stability for the standard 
{\textit{\bf 5\,Leds\,UV}}\ pulse, except for the extractors {\textit{\bf MExtractFixedWindowPeakSearch}}, initialized 
with an extraction window of 2 slices.
\par
There is a considerable difference for all shown non-standard pulses. Especially the pulses from green 
and blue LEDs 
show a clear dependency  of the number of photo-electrons on the extraction window. Only the largest 
extraction windows seem to catch the entire range of (jittering) secondary pulses and get the ratio 
of outer vs. inner pixels right. However, they (obviously) over-estimate the number of photo-electrons 
in the primary pulse.
\par
The strongest discrepancy is observed in the low-gain extraction (fig.~\ref{fig:phe:23ledsblue}) where all 
fixed window extractors with extraction windows smaller than 8 FADC slices fail to reconstruct the correct numbers. 
This has to do with the fact that 
the fixed window extractors fail to catch a significant part of the (larger) pulse because of the 
1~FADC slice event-to-event jitter. Also the sliding windows smaller than 6 FADC slices and the spline smaller than 
2 FADC slices reproduce too small numbers of photo-electrons. Moreover, the digital filter shows a small dependency 
of the number of photo-electrons w.r.t. the extration window.
\par


\begin{figure}[htp]
\centering
\includegraphics[height=0.92\textheight]{PheVsExtractor-5LedsUV-Colour-12.eps}
\caption{Number of photo-electrons from a typical, not saturating calibration pulse of colour UV, 
reconstructed with each of the tested signal extractors. 
The first plots shows the number of photo-electrons obtained for the inner pixels, the second one 
for the outer pixels and the third shows the ratio of the mean number of photo-electrons for the 
outer pixels divided by the mean number of photo-electrons for the inner pixels. Points 
denote the mean of all not-excluded pixels, the error bars their RMS.}
\label{fig:phe:5ledsuv}
\end{figure}

\begin{figure}[htp]
\centering
\includegraphics[height=0.92\textheight]{PheVsExtractor-1LedUV-Colour-04.eps}
\caption{Number of photo-electrons from a typical, very low-intensity calibration pulse of colour UV, 
reconstructed with each of the tested signal extractors. 
The first plots shows the number of photo-electrons obtained for the inner pixels, the second one 
for the outer pixels and the third shows the ratio of the mean number of photo-electrons for the 
outer pixels divided by the mean number of photo-electrons for the inner pixels. Points 
denote the mean of all not-excluded pixels, the error bars their RMS.}
\label{fig:phe:1leduv}
\end{figure}

\begin{figure}[htp]
\centering
\includegraphics[height=0.92\textheight]{PheVsExtractor-2LedsGreen-Colour-02.eps}
\caption{Number of photo-electrons from a typical, not saturating calibration pulse of colour green, 
reconstructed with each of the tested signal extractors. 
The first plots shows the number of photo-electrons obtained for the inner pixels, the second one 
for the outer pixels and the third shows the ratio of the mean number of photo-electrons for the 
outer pixels divided by the mean number of photo-electrons for the inner pixels. Points 
denote the mean of all not-excluded pixels, the error bars their RMS.}
\label{fig:phe:2ledsgreen}
\end{figure}


\begin{figure}[htp]
\centering
\includegraphics[height=0.92\textheight]{PheVsExtractor-23LedsBlue-Colour-00.eps}
\caption{Number of photo-electrons from a typical, high-gain saturating calibration pulse of colour blue, 
reconstructed with each of the tested signal extractors. 
The first plots shows the number of photo-electrons obtained for the inner pixels, the second one 
for the outer pixels and the third shows the ratio of the mean number of photo-electrons for the 
outer pixels divided by the mean number of photo-electrons for the inner pixels. Points 
denote the mean of all not-excluded pixels, the error bars their RMS.}
\label{fig:phe:23ledsblue}
\end{figure}

One can see that all extractors using a large window belong to the class of extractors being affected 
by the secondary pulses, except for the digital filter. 
\par
The extractor {\textit{\bf MExtractTimeAndChargeDigitalFilter}} seems to be stable against modifications in the 
exact form of the weights in the high-gain readout channel since all applied weights yield about 
the same number of photo-electrons and the same ratio of outer vs. inner pixels, except if one applies the cosmics 
weights to the very low-intensity pulse $1\,LED\,UV$ where a slight increase in photo-electrons is observed.
\par
All sliding window and spline algorithms yield a stable ratio of outer vs. inner pixels in the high and the low-gain. 
\par
Concluding, there is no fixed window extractor yielding always the correct number of photo-electrons, 
except for the extraction window of 8 FADC slices. 
Either the number of photo-electrons itself is wrong or the ratio of outer vs. inner pixels is 
not correct. All sliding window algorithms seem to reproduce the correct numbers if one takes into 
account the after-pulse behaviour of the light pulser itself. The digital filter seems to be 
stable against changing the pulse width from 1~to~4\,ns.

\clearpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{Linearity \label{sec:calibration:linearity}}

\begin{figure}[htp]
\centering
\includegraphics[width=0.99\linewidth]{PheVsCharge-4.eps}
\caption{Conversion factor $c_{phe}$ for three exemplary inner pixels (upper plots) 
and three exemplary outer ones (lower plots) obtained with the extractor 
{\textit{MExtractFixedWindow}} on a window size of 8 high-gain and 8 low-gain slices 
(extractor \#4). }
\label{fig:linear:phevscharge4}
\end{figure}

In this section, we test the linearity of the conversion factors FADC counts to photo-electrons:

\begin{equation}
c_{phe} =\  <N_{phe}> / <\widehat{S}>
\end{equation}

As the photo-multiplier and the subsequent 
optical transmission devices~\cite{david} is a linear device over a 
wide dynamic range, the number of photo-electrons per charge has to remain constant over the tested 
linearity region. 
\par
A first test concerns the stability of the conversion factor: mean number of averaged photo-electrons 
per FADC counts over the tested intensity region. This test includes all systematic uncertainties 
in the calculation of the number of photo-electrons and the computation of the mean signal. 
A more detailed investigation of the linearity will be shown in a 
separate TDAS~\cite{tdas-calibration}, although there, the number of photo-electrons will be calculated 
in a more independent way.

\par
Figure~\ref{fig:linear:phevscharge4} shows the conversion factor $c_{phe}$ obtained for different light intensities 
and colours for three exemplary inner and three exemplary outer pixels using a fixed window on 
8 FADC slices. The conversion factor seems to be linear to a good approximation, 
except for two cases:
\begin{itemize}
\item The green pulses yield systematically low conversion factors
\item Some of the pixels show a difference 
between the high-gain ($<$100\ phes for the inner, $<$300\ phes for the outer pixels) and the low-gain 
($>$100\ phes for the inner, $>$300\ phes for the outer pixels) region and 
a rather good stability of $c_{phe}$ for each region separately.
\end{itemize}

We conclude that, apart from the two reasons above, 
the fixed window extractor \#4 is a linear extractor for both high-gain 
and low-gain regions, separately.
\par

Figures~\ref{fig:linear:phevscharge9} and~\ref{fig:linear:phevscharge15} show the conversion factors 
using an integrated spline and a fixed window with global peak search, respectively, over 
an extraction window of 8 FADC slices. The same behaviour is obtained as before. These extractors are 
linear to a good approximation, except for the two cases mentionned above.
\par

\begin{figure}[h!]
\centering
\includegraphics[width=0.99\linewidth]{PheVsCharge-9.eps}
\caption{Conversion factor $c_{phe}$ for three exemplary inner pixels (upper plots) 
and three exemplary outer ones (lower plots) obtained with the extractor 
{\textit{MExtractFixedWindowSpline}} 
on a window size of 8 high-gain and 8 low-gain slices (extractor \#9). }
\label{fig:linear:phevscharge9}
\end{figure}

\begin{figure}[h!]
\centering
\includegraphics[width=0.99\linewidth]{PheVsCharge-15.eps}
\caption{Conversion factor $c_{phe}$ for three exemplary inner pixels (upper plots) 
and three exemplary outer ones (lower plots) obtained with the extractor 
{\textit{MExtractFixedWindowPeakSearch}} on a window size of 8 high-gain and 8 low-gain slices 
(extractor \#15). }
\label{fig:linear:phevscharge15}
\end{figure}

\begin{figure}[h!]
\centering
\includegraphics[width=0.99\linewidth]{PheVsCharge-11.eps}
\caption{Example of a the development of the conversion factor FADC counts to photo-electrons for three 
exemplary inner pixels (upper plots) and three exemplary outer ones (lower plots) obtained with the extractor 
{\textit{MExtractFixedWindowPeakSearch}} 
on a window size of 2 high-gain and 2 low-gain slices (extractor \#11). }
\label{fig:linear:phevscharge11}
\end{figure}

Figure~\ref{fig:linear:phevscharge11} shows the conversion factors using a fixed window with global peak search 
integrating a window of 2 FADC slices. One can see that the linearity is completely lost! Especially in the low-gain, 
the reconstructed number of photo-electrons is much too low and the conversion factors bend down. A similiar behaviour can 
be found for all extractors with window sizes smaller than 6 FADC slices, especially in the low-gain region. (This behaviour 
was already visible in the investigations on the number of photo-electrons in the previous section~\ref{sec:photo-electrons}).
\par
Figure~\ref{fig:linear:phevscharge20} shows the conversion factors using a sliding window of 6 FADC slices. 
The linearity is maintained like in the previous examples, except for the smallest signals the effect
of the bias is already visible.
\par

\begin{figure}[h!]
\centering
\includegraphics[width=0.99\linewidth]{PheVsCharge-20.eps}
\caption{Example of a the development of the conversion factor FADC counts to photo-electrons for three 
exemplary inner pixels (upper plots) and three exemplary outer ones (lower plots) obtained with the extractor 
{\textit{MExtractTimeAndChargeSlidingWindow}} 
on a window size of 6 high-gain and 6 low-gain slices (extractor \#20). }
\label{fig:linear:phevscharge20}
\end{figure}

Figure~\ref{fig:linear:phevscharge23} shows the conversion factors using the amplitude-extracting spline 
(extractor \#23).
Here, the linearity worse than in the previous sample. A very clear difference between high-gain and 
low-gain regions can be seen as well as a bigger general spread in conversion factors. In order to investigate
if there is a common, systematic effect of the extractor, we show the averaged conversion factors over all 
inner and outer pixels in figure~\ref{fig:linear:phevschargearea23}. Both characteristics are maintained 
there. Although the differences between high-gain and low-gain can be easily corrected for, we conclude 
that extractor \#23 is still unstable against the linearity tests.
\par

\begin{figure}[h!]
\centering
\includegraphics[width=0.99\linewidth]{PheVsCharge-23.eps}
\caption{Conversion factor $c_{phe}$ for three exemplary inner pixels (upper plots) 
and three exemplary outer ones (lower plots) obtained with the extractor 
{\textit{MExtractTimeAndChargeSpline}} with amplitude extraction (extractor \#23). }
\label{fig:linear:phevscharge23}
\vspace{\floatsep}
\includegraphics[width=0.9\linewidth]{PheVsCharge-Area-23.eps}
\caption{Conversion factor $c_{phe}$ averaged over all inner (left) and all outer (right) pixels 
obtained with the extractor 
{\textit{MExtractTimeAndChargeSpline}} with amplitude extraction (extractor \#23). }
\label{fig:linear:phevschargearea23}
\end{figure}

Figure~\ref{fig:linear:phevscharge24} shows the conversion factors using a spline integrating over 
one effective FADC slice in the high-gain and 1.5 effective FADC slices in the low-gain (extractor \#24).
The same problems are found as with extractor \#23, however to a much lower extent. 
The difference between high-gain and low-gain regions is less pronounced and the spread 
in conversion factors is smaller. 
Figure~\ref{fig:linear:phevschargearea24} shows already rather good stability except for the two 
lowest intensity pulses in green and blue. We conclude that extractor \#24 is still un-stable, but 
preferable to amplitude extractor.
\par

\begin{figure}[h!]
\centering
\includegraphics[width=0.99\linewidth]{PheVsCharge-24.eps}
\caption{Conversion factor $c_{phe}$ for three exemplary inner pixels (upper plots) 
and three exemplary outer ones (lower plots) obtained with the extractor 
{\textit{MExtractTimeAndChargeSpline}} with window size of 1 high-gain and 2 low-gain slices 
(extractor \#24). }
\label{fig:linear:phevscharge24}
\vspace{\floatsep}
\includegraphics[width=0.9\linewidth]{PheVsCharge-Area-24.eps}
\caption{Conversion factor $c_{phe}$ averaged over all inner (left) and all outer (right) pixels 
obtained with the extractor 
{\textit{MExtractTimeAndChargeSpline}} with window size of 1 high-gain and 2 low-gain slices 
(extractor \#24). }
\label{fig:linear:phevschargearea24}
\end{figure}

Looking at figure~\ref{fig:linear:phevscharge25}, one can see that raising the integration window 
to two  effective FADC slices in the high-gain and three effective FADC slices in the low-gain 
(extractor \#25), the stability is completely resumed, except for 
a small systematic increase of the conversion factor in the low-gain range. This effect 
is not very significant, however it can be seen in five out of the 
six tested channels. We conclude that extractor \#25 is almost as stable as the fixed window extractors. 
\par

\begin{figure}[htp]
\centering
\includegraphics[width=0.99\linewidth]{PheVsCharge-25.eps}
\caption{Conversion factor $c_{phe}$ for three exemplary inner pixels (upper plots) 
and three exemplary outer ones (lower plots) obtained with the extractor 
{\textit{MExtractTimeAndChargeSpline}} with window size of 2 high-gain and 3 low-gain slices 
(extractor \#25). }
\label{fig:linear:phevscharge25}
\vspace{\floatsep}
\includegraphics[width=0.9\linewidth]{PheVsCharge-Area-25.eps}
\caption{Conversion factor $c_{phe}$ averaged over all inner (left) and all outer (right) pixels 
obtained with the extractor 
{\textit{MExtractTimeAndChargeSpline}} with window size of 2 high-gain and 3 low-gain slices 
(extractor \#25). }
\label{fig:linear:phevschargearea25}
\end{figure}

Figure~\ref{fig:linear:phevscharge30} and~\ref{fig:linear:phevscharge31} show the conversion factors using a digital filter, 
applied on 6 FADC slices and respectively 4 FADC slices with weights calculated from the UV-calibration pulse.
One can see that one or two blue  calibration pulses at low and intermediate intensity fall
out of the linear region, moreover there is a small systematic offset between the high-gain and low-gain region. 
It seems that the digital filter does not pass this test if the pulse form changes for more than 2\,ns from the 
expected one. The effect is not as problematic as it may appear here, because the actual calibration 
will not calculate the number of photo-electrons (with the F-Factor method) for every signal intensity. 
Thus, one possible reason for the instability falls away in the cosmics analysis. However, the limits 
of this extraction are clearly visible here and have to be monitored further.

\par

\begin{figure}[htp]
\centering
\includegraphics[width=0.99\linewidth]{PheVsCharge-30.eps}
\caption{Conversion factor $c_{phe}$ for three exemplary inner pixels (upper plots) 
and three exemplary outer ones (lower plots) obtained with the extractor 
{\textit{MExtractTimeAndChargeDigitalFilter}}  
using a window size of 6 high-gain and 6 low-gain slices with UV-weights (extractor \#30). }
\label{fig:linear:phevscharge30}
\vspace{\floatsep}
\includegraphics[width=0.9\linewidth]{PheVsCharge-Area-30.eps}
\caption{Conversion factor $c_{phe}$ averaged over all inner (left) and all outer (right) pixels 
obtained with the extractor 
{\textit{MExtractTimeAndChargeDigitalFilter}} with window size of 6 high-gain and 6 low-gain slices and UV-weight
(extractor \#30). }
\label{fig:linear:phevschargearea30}
\end{figure}


\begin{figure}[htp]
\centering
\includegraphics[width=0.99\linewidth]{PheVsCharge-31.eps}
\caption{Conversion factor $c_{phe}$ for three exemplary inner pixels (upper plots) 
and three exemplary outer ones (lower plots) obtained with the extractor 
{\textit{MExtractTimeAndChargeDigitalFilter}} using a window size of 
4 high-gain and 4 low-gain slices (extractor \#31). }
\label{fig:linear:phevscharge31}
\vspace{\floatsep}
\includegraphics[width=0.9\linewidth]{PheVsCharge-Area-31.eps}
\caption{Conversion factor $c_{phe}$ averaged over all inner (left) and all outer (right) pixels 
obtained with the extractor 
{\textit{MExtractTimeAndChargeDigitalFilter}} with window size of 6 high-gain and 6 low-gain slices and blue weights
(extractor \#31). }
\label{fig:linear:phevschargearea3}
\end{figure}

\clearpage

\subsection{Time Resolution}

The extractors \#17--33 are able to compute the arrival time of each pulse. The calibration LEDs
deliver a fast-rising pulses, uniform over the camera in signal size and time. 
We estimate the time-uniformity to better 
than 300\,ps, a limit due to the different travel times of the light between inner and outer parts of the
camera. Since the calibration does not permit a precise measurement of the absolute arrival time, we measure 
the relative arrival time for every channel with respect to a reference channel (usually pixel Nr.\,1):

\begin{equation}
\delta t_i = t_i - t_1
\end{equation}

where $t_i$ denotes the reconstructed arrival time of pixel number $i$ and $t_1$ the reconstructed 
arrival time of the reference pixel nr. 1 (software numbering). In one calibration run, one can then fill 
histograms of $\delta t_i$ and fit them to the expected Gaussian distribution. The fits 
yield a mean $\mu(\delta t_i)$, comparable to 
systematic delays in the signal travel time, and a sigma $\sigma(\delta t_i)$, a measure of the 
combined time resolutions of pixel $i$ and pixel 1. Assuming that the PMTs and readout channels are 
of a same kind, we obtain an approximate time resolution of pixel $i$:

\begin{equation}
t^{res}_i \approx \sigma(\delta t_i)/\sqrt(2)
\end{equation}

Figures~\ref{fig:reltimesinnerleduv} show distributions of $\delta t_i$ 
for a typical inner pixel and a non-saturating calibration pulse of UV-light, 
obtained with six different extractors. 
One can see that all of them yield acceptable Gaussian distributions, 
except for the sliding window extracting 2 slices which shows a three-peak structure and cannot be fitted. 
We discarded that particular extractor from the further studies of this section.

\begin{figure}[htp]
\centering
\includegraphics[width=0.45\linewidth]{RelTime_100_Extractor17.eps}
\includegraphics[width=0.45\linewidth]{RelTime_100_Extractor18.eps}
\includegraphics[width=0.45\linewidth]{RelTime_100_Extractor23.eps}
\includegraphics[width=0.45\linewidth]{RelTime_100_Extractor24.eps}
\includegraphics[width=0.45\linewidth]{RelTime_100_Extractor30.eps}
\includegraphics[width=0.45\linewidth]{RelTime_100_Extractor31.eps}
\caption{Examples of a distributions of relative arrival times $\delta t_i$ of an inner pixel (Nr. 100) \protect\\
Top: {\textit{\bf MExtractTimeAndChargeSlidingWindow}} over 2  slices (\#17) and 4  slices (\#18) \protect\\
Center: {\textit{\bf MExtractTimeAndChargeSpline}} with maximum (\#23) and half-maximum pos. (\#24) \protect\\
Bottom: {\textit{\bf MExtractTimeAndChargeDigitalFilter}} fitted to a UV-calibration pulse over 6 slices (\#30) and 4 slices (\#31) \protect\\
A medium sized UV-pulse (5\,Leds UV) has been used which does not saturate the high-gain readout channel.}
\label{fig:reltimesinnerleduv}
\end{figure}

Figures~\ref{fig:reltimesinnerledblue1} and~\ref{fig:reltimesinnerledblue2} show 
the distributions of $\delta t_i$ for a typical inner pixel and an intense, high-gain-saturating calibration 
pulse of blue light. 
One can see that the sliding window extractors yield double Gaussian structures, except for the 
largest window sizes of 8 and 10 FADC slices. Even then, the distributions are not exactly Gaussian.
The maximum position extracting spline also yields distributions which are not exactly Gaussian and seem 
to miss the exact arrival time in quite some events. Only the position of the half-maximum gives the 
expected result of a single Gaussian distribution.
A similiar problem occurs in the case of the digital filter: If one takes the correct weights 
(fig.~\ref{fig:reltimesinnerledblue2} bottom), the distribution is perfectly Gaussian and the resolution good, 
however a rather slight change from the blue calibration pulse weights to cosmics pulses weights (top) 
adds a secondary peak of events with mis-reconstructed arrival times.

\begin{figure}[htp]
\centering
\includegraphics[width=0.45\linewidth]{RelTime_100_Extractor18_logain.eps}
\includegraphics[width=0.45\linewidth]{RelTime_100_Extractor19_logain.eps}
\includegraphics[width=0.45\linewidth]{RelTime_100_Extractor21_logain.eps}
\includegraphics[width=0.45\linewidth]{RelTime_100_Extractor22_logain.eps}
\includegraphics[width=0.45\linewidth]{RelTime_100_Extractor23_logain.eps}
\includegraphics[width=0.45\linewidth]{RelTime_100_Extractor24_logain.eps}
\caption{Examples of a distributions of relative arrival times $\delta t_i$ of an inner pixel (Nr. 100) \protect\\
Top: {\textit{\bf MExtractTimeAndChargeSlidingWindow}} over 4  slices (\#18) and 6  slices (\#19) \protect\\
Center: {\textit{\bf MExtractTimeAndChargeSlidingWindow}} over 8  slices (\#20) and 10  slices (\#21)\protect\\
Bottom: {\textit{\bf MExtractTimeAndChargeSpline}} with maximum (\#23) and half-maximum pos. (\#24) \protect\\ 
A strong Blue pulse (23\,Leds Blue) has been used which does not saturate the high-gain readout channel.}
\label{fig:reltimesinnerledblue1}
\end{figure}

\begin{figure}[htp]
\centering
\includegraphics[width=0.45\linewidth]{RelTime_100_Extractor30_logain.eps}
\includegraphics[width=0.45\linewidth]{RelTime_100_Extractor31_logain.eps}
\includegraphics[width=0.45\linewidth]{RelTime_100_Extractor32_logain.eps}
\includegraphics[width=0.45\linewidth]{RelTime_100_Extractor33_logain.eps}
\caption{Examples of a distributions of relative arrival times $\delta t_i$ of an inner pixel (Nr. 100) \protect\\
Top: {\textit{\bf MExtractTimeAndChargeDigitalFilter}} 
fitted to cosmics pulses over 6 slices (\#30) and 4  slices (\#31) \protect\\
Bottom: {\textit{\bf MExtractTimeAndChargeDigitalFilter}} fitted to the correct blue calibration pulse over 6  slices (\#30) and 4  slices (\#31)
A strong Blue pulse (23\,Leds Blue) has been used which does not saturate the high-gain readout channel.}
\label{fig:reltimesinnerledblue2}
\end{figure}

%\begin{figure}[htp]
%\centering
%\includegraphics[width=0.31\linewidth]{RelArrTime_Pixel400_10LedUV_Extractor32.eps}
%\includegraphics[width=0.31\linewidth]{RelArrTime_Pixel400_10LedUV_Extractor23.eps}
%\includegraphics[width=0.31\linewidth]{RelArrTime_Pixel400_10LedUV_Extractor17.eps}
%\caption{Example of a two distributions of relative arrival times of an outer pixel with respect to 
%the arrival time of the reference pixel Nr. 1. The left plot shows the result using the digital filter
% (extractor \#32), the central plot shows the result obtained with the half-maximum of the spline and the 
%right plot the result of the sliding window with a window size of 2  slices (extractor \#17). A 
%medium sized UV-pulse (10Leds UV) has been used which does not saturate the high-gain readout channel.}
%\label{fig:reltimesouter10leduv}
%\end{figure}

%\begin{figure}[htp]
%\centering
%\includegraphics[width=0.31\linewidth]{RelArrTime_Pixel97_10LedBlue_Extractor23.eps}
%\includegraphics[width=0.31\linewidth]{RelArrTime_Pixel97_10LedBlue_Extractor32.eps}
%\caption{Example of a two distributions of relative arrival times of an inner pixel with respect to 
%the arrival time of the reference pixel Nr. 1. The left plot shows the result using the half-maximum of the spline (extractor \#23), the right plot shows the result obtained with the digital filter
%(extractor \#32). A 
%medium sized Blue-pulse (10Leds Blue) has been used which saturates the high-gain readout channel.}
%\label{fig:reltimesinner10ledsblue}
%\end{figure}



%\begin{figure}[htp]
%\centering
%\includegraphics[width=0.31\linewidth]{RelArrTime_Pixel400_10LedBlue_Extractor23.eps}
%\includegraphics[width=0.31\linewidth]{RelArrTime_Pixel400_10LedBlue_Extractor32.eps}
%\caption{Example of a two distributions of relative arrival times of an outer pixel with respect to 
%the arrival time of the reference pixel Nr. 1. The left plot shows the result using the half-maximum of the spline (extractor \#23), the right plot shows the result obtained with the digital filter
%(extractor \#32). A 
%medium sized Blue-pulse (10Leds Blue) has been used which saturates the high-gain readout channel.}
%\label{fig:reltimesouter10ledsblue}
%\end{figure}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{figure}[htp]
\centering
\includegraphics[width=0.95\linewidth]{UnsuitTimeVsExtractor-5LedsUV-Colour-12.eps}
\caption{Reconstructed arrival time resolutions from a typical, not saturating calibration pulse 
of colour UV, reconstructed with each of the tested arrival time extractors. 
The first plots shows the time resolutions obtained for the inner pixels, the second one 
for the outer pixels. Points 
denote the mean of all not-excluded pixels, the error bars their RMS.}
\label{fig:time:5ledsuv}
\end{figure}

\begin{figure}[htp]
\centering
\includegraphics[width=0.95\linewidth]{UnsuitTimeVsExtractor-1LedUV-Colour-04.eps}
\caption{Reconstructed arrival time resolutions from the lowest intensity calibration pulse 
of colour UV (carrying a mean number of 4 photo-electrons), 
reconstructed with each of the tested arrival time extractors. 
The first plots shows the time resolutions obtained for the inner pixels, the second one 
for the outer pixels. Points 
denote the mean of all not-excluded pixels, the error bars their RMS.}
\label{fig:time:1leduv}
\end{figure}

\begin{figure}[htp]
\centering
\includegraphics[width=0.95\linewidth]{UnsuitTimeVsExtractor-2LedsGreen-Colour-02.eps}
\caption{Reconstructed arrival time resolutions from a typical, not saturating calibration pulse 
of colour Green, reconstructed with each of the tested arrival time extractors. 
The first plots shows the time resolutions obtained for the inner pixels, the second one 
for the outer pixels. Points 
denote the mean of all not-excluded pixels, the error bars their RMS.}
\label{fig:time:2ledsgreen}
\end{figure}

\begin{figure}[htp]
\centering
\includegraphics[width=0.95\linewidth]{UnsuitTimeVsExtractor-23LedsBlue-Colour-00.eps}
\caption{Reconstructed arrival time resolutions from the highest intensity calibration pulse 
of colour blue, reconstructed with each of the tested arrival time extractors. 
The first plots shows the time resolutions obtained for the inner pixels, the second one 
for the outer pixels. Points 
denote the mean of all not-excluded pixels, the error bars their RMS.}
\label{fig:time:23ledsblue}
\end{figure}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{figure}[htp]
\centering
\includegraphics[width=0.95\linewidth]{TimeResExtractor-5LedsUV-Colour-12.eps}
\caption{Reconstructed arrival time resolutions from a typical, not saturating calibration pulse 
of colour UV, reconstructed with each of the tested arrival time extractors. 
The first plots shows the time resolutions obtained for the inner pixels, the second one 
for the outer pixels. Points 
denote the mean of all not-excluded pixels, the error bars their RMS.}
\label{fig:time:5ledsuv}
\end{figure}

\begin{figure}[htp]
\centering
\includegraphics[width=0.95\linewidth]{TimeResExtractor-1LedUV-Colour-04.eps}
\caption{Reconstructed arrival time resolutions from the lowest intensity calibration pulse 
of colour UV (carrying a mean number of 4 photo-electrons), 
reconstructed with each of the tested arrival time extractors. 
The first plots shows the time resolutions obtained for the inner pixels, the second one 
for the outer pixels. Points 
denote the mean of all not-excluded pixels, the error bars their RMS.}
\label{fig:time:1leduv}
\end{figure}

\begin{figure}[htp]
\centering
\includegraphics[width=0.95\linewidth]{TimeResExtractor-2LedsGreen-Colour-02.eps}
\caption{Reconstructed arrival time resolutions from a typical, not saturating calibration pulse 
of colour Green, reconstructed with each of the tested arrival time extractors. 
The first plots shows the time resolutions obtained for the inner pixels, the second one 
for the outer pixels. Points 
denote the mean of all not-excluded pixels, the error bars their RMS.}
\label{fig:time:2ledsgreen}
\end{figure}

\begin{figure}[htp]
\centering
\includegraphics[width=0.95\linewidth]{TimeResExtractor-23LedsBlue-Colour-00.eps}
\caption{Reconstructed arrival time resolutions from the highest intensity calibration pulse 
of colour blue, reconstructed with each of the tested arrival time extractors. 
The first plots shows the time resolutions obtained for the inner pixels, the second one 
for the outer pixels. Points 
denote the mean of all not-excluded pixels, the error bars their RMS.}
\label{fig:time:23ledsblue}
\end{figure}


\begin{figure}[htp]
\centering
\includegraphics[width=0.47\linewidth]{TimeResVsCharge-Area-21.eps}
\includegraphics[width=0.47\linewidth]{TimeResVsCharge-Area-24.eps}
\vspace{\floatsep}
\includegraphics[width=0.47\linewidth]{TimeResVsCharge-Area-30.eps}
\includegraphics[width=0.47\linewidth]{TimeResVsCharge-Area-31.eps}
\caption{Reconstructed mean arrival time resolutions as a function of the extracted mean number of 
photo-electrons for the weighted sliding window with a window size of 8 slices (extractor \#21, top left), 
the half-maximum searching spline (extractor \#24, top right), 
the digital filter with UV calibration-pulse weights over 6 slices (extractor \#30, bottom left) 
and the digital filter with UV calibration-pulse weights over 4 slices (extractor \#31, bottom rigth).
Error bars denote the spread (RMS) of time resolutions of the investigated channels.
The marker colours show the applied 
pulser colour, except for the last (green) point where all three colours were used.}
\label{fig:time:dep}
\end{figure}


\begin{figure}[htp]
\centering
\includegraphics[width=0.32\linewidth]{TimeResVsSqrtPhe-Area-24.eps}
\includegraphics[width=0.32\linewidth]{TimeResVsSqrtPhe-Area-30.eps}
\includegraphics[width=0.32\linewidth]{TimeResVsSqrtPhe-Area-31.eps}
\caption{Reconstructed arrival time resolutions as a function of the square root of the 
extimated number of photo-electrons for the half-maximum searching spline (extractor \#24, left) a
and the digital filter with the calibration pulse weigths fitted to UV pulses over 6 FADC slices (extractor \#30, center) 
and the  digital filter with the calibration pulse weigths fitted to UV pulses over 4 FADC slices (extractor \#31, right).
The time resolutions have been fitted from 
The marker colours show the applied 
pulser colour, except for the last (green) point where all three colours were used.}
\label{fig:time:fit2430}
\end{figure}


%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "MAGIC_signal_reco"
%%% End: 
