\section{The Burst Alarm System at La Palma}

{\bf Current status:}

\par

The Burst Alarm System {\it gspot} (Gamma
Sources Pointing Trigger) is installed and working in La Palma since last Summer.
It performs a full-time survey of the {\it GRB Coordinates Network} (\g) alerts~\cite{GCN}.
Different satellite experiments 
send GRB coordinates to the \g which in its turn broadcasts
the alerts to registered users.
The Burst Alarm System is composed of a core program which 
manages the monitoring of the \g and the communication with the Central Control (CC). 
It also handles three communication channels to notice the shifters
about an alert. It is a c-based daemon running 24
hours a day on the {\it www} machine, our external server, in a
{\it stand alone} mode. It does not need to be operated and is
fully automatic. It manages network disconnections
within the external net and/or the internal one.


\subsection{The Connection to the GCN}

The connection to the \g is performed by {\it gspot} through a
TCP/IP connection to a computer at the Goddard Space Flight Center (GSFC).
This computer distributes the alerts from the satellite
experiments through an internet socket connection. {\it gspot} 
acts as a server, while the client, running at the GSFC,
manages the communication of the GRB data the status.\\

The format of the data distributed via \g depends on the broadcasting satellite
and on the kind of package. Currently three satellites participate in the GRB survey:
HETE-2~\cite{HETE}, INTEGRAL~\cite{INTEGRAL} and SWIFT~\cite{SWIFT}. 
The alerts include the UTC, the GRB coordinates (not always), error on coordinates
(not always) and intensity (photon counts) of the burst.
The first notices from HETE-2 and INTEGRAL usually do not include the coordinates.
In few cases only coordinates are distributed in refined notices.
The \sw alerts are predicted to arrive with coordinates between 30-80 sec after the onset of the burst.
The error on the coordinates from the BAT detector will be 4 arcmin which is smaller than the size of one
inner pixel of the \ma camera.\\

In case of alert, {\it gspot} stores the informations and enters into
an {\bf Alarm State}. The duration of the alarm depends on the following parameters:

\begin{itemize}
\item {\bf Darkness of the sky}: The Sun has to be below
the astronomical horizon or have a zenith angle larger than 108$^\circ$.
\item {\bf Position of GRB}: The GRB equatorial
coordinates are transformed into local horizontal coordinates.
The resulting GRB zenith angle has to be smaller than 70$^\circ$. If the Moon is
shining, the maximal zenith angle is reduced to 65$^\circ$.
\item {\bf Position of Moon}: The angular
distance from the GRB to the Moon has to be at least 30$^\circ$. This constant
value of 30$^\circ$ will change in the future as soon as the camera experts
will provide a plot of the safe distance from the Moon vs. Moon phase.
Therefore such dynamical limit for this value will be used.
\end{itemize}

If one or more of these conditions fail, {\it gspot} enters into a
{\color[rgb]{0.9,0.75,0.}\bf Yellow Alarm State} (it means the GRB is not observable at the moment). 
In this case the program saves the alert in a list and calculates when the GRB will become observable for \ma. 
At the moment when the criteria listed above are fulfilled for this burst, and the time interval 
after the burst onset is smaller than 5 hours, {\it gspot} enters into \textcolor{red}{\bf Red Alarm State}.
If all the mentioned conditions are satisfied from the beginning, {\it gspot} enters 
into \textcolor{red}{\bf Red Alarm State} immediately.
If more than one alert is recived and the burst cannot be observed immediately, 
the alert information are saved in a list. 
The software weights the alerts according the total amount of time in which
the GRB will be observable, the delay from the onset of GRB observability,
the intensisty of the burst and the mean GRB zenith angle during its
period of observability.
The best candidate is sent to the CC as soon as {\it gspot} 
enters into the \textcolor{red}{\bf Red Alarm state}, i.e. as soon as such
candidate becomes observable.\\

However, in case of \textcolor{red}{\bf RED Alarm State}, 
if the communication with the CC is available then {\it gspot} sends to it 
the GRB equatorial coordinates (RA/DEC J2000).
For the communication with CC, format defined in~\cite{CONTROL} is used.
At the same time, shifters and the GRB-MAGIC group are contacted.

\subsection{The Interface to the Central Control}

An interface of {\it gspot} sends all the relevant information to the CC.
When {\it gspot} is not in alarm state, standard packages are continuously exchanged between CC and {\it gspot}.
These packages contain the main global status of the two subsystems.
In case of \textcolor{red}{\bf RED alert}, {\it gspot} starts to send special alert packages to the CC
containing information about the GRB.
The exchange of the alert packages continues until:

\begin{itemize}
\item {\it gspot} receives from the CC the confirmation
that the alert notice has been received (CC must send back the alert in order
to perform a cross-check of relevant data);
\item the \textcolor{red}{\bf RED Alarm state} expires because of the
missing of one or more of the needed criteria mentioned above;
\item the alarm state expires after {\bf 5 hours}.
\end{itemize}

In the case of a \textcolor{red}{\bf RED alert} CC shows a pop-up window
with all the important alert information received from the Burst Monitor.
The operator has to confirm the notice by closing the pop-up window.
He can decide whether to stop the current scheduled observation or to point the GRB coordinates.
A new button is displayed in the CC allowing to point the telescope directly
the GRB coordinates.

\subsection{GRB Archive and Emails to the GRB-mailing List}

In case of alert -- even if it does not contain the necessary coordinates -- the
information is  translated into ``human language'' and stored in ASCII files.
At the same time, an e-mail is sent to the MAGIC GRB-mailing list
{\it magic\_grb@mppmu.mpg.de}.

\subsection{The GRB Web Page}

The status of the GRB Alert System and relevant informations about the
current and/or the last alert are displayed on a separate web page.
The page is hosted at the web server in La Palma and can be accessed under:\\

\qquad \qquad http://www.magic.iac.es/site/grbm/\\

The web page updates itself automatically every 10 seconds. In this way
the status of the Burst Alarm System can be checked by the shifters and from outside too.

\subsection{The Acoustic Alert}

A further CC-independent acoustic alarm called {\it phava}
(PHonetic Alarm for Valued Alerts) will be installed
in La Palma soon. It will provide a loud acoustic signal
even if the CC is switched off, so that persons in the counting house
can be noticed about the alert situation. The signal will be on as long as
{\it gspot} remains in alarm state for a minimum of one minute.
The device features also a display with the status of the system and the alert.

\subsection{Summary of Alerts Received Until Now}

Since July 15$^{\mathrm{th}}$, 2004, {\it gspot} has been working stably at La Palma.
It received about 100 alerts from HETE-2 and INTEGRAL, out of which
19 contained GRB coordinates. Time delays to the onset of the burst
were of the order of several minutes to tens of minutes. The Burst Monitor can be considered stable
since November 2004. Since that date we have received the following four significant alerts:\\

\begin{tabular}{lllcccl}
19th & December & 2004 & 1:44 am  & INTEGRAL & ZA $\sim 60^\circ$ & time delay 71 s \\
28th & January  & 2005 & 5:36 am  & HETE-2   & ZA $\sim 65^\circ$ & time delay 73 m \\
\end{tabular}

It's a pitty that weather conditions at La Palma were bad. 

\subsection{Experience from SWIFT GRBs until now}

According to the \sw home page~\cite{SWIFT}, the satellite has detected 20 GRBs since mid-December last year.
The bursts were detected by chance during the commissioning phase. Since February 15$^{\mathrm{th}}$
the satellite sends burst allerts to the \g in real time. The current sample contains five bursts which could
have been observed by \ma. \\

\begin{tabular}{lllccl}
19th & December & 2004 & 1:42 am  & ZA $\sim 65^\circ$ & \\
26th & December & 2004 & 8:34 pm  & ZA $\sim 52^\circ$ &\\
15th & Februar  & 2005 & 2:33 am  & ZA $\sim 17^\circ$ &\\
5th  & March    & 2005 & 8:42 pm  & ZA $\sim 40^\circ$ & time delay 40 s \\
5th  & March    & 2005 & 10:23 pm & ZA $\sim 70^\circ$ & time delay 80 s \\
\end{tabular}

In the first three alerts weather conditions in La Palma were bad. In the last two
a couple of GRBs were detected within two hours by SWIFT. They were observable since
their own onset and for all the following 5 hours. The weather was good, but unfortunately
the Telescope was off-service because of the exceptional events occured in La Palma
during the previous weeks.

\subsection{Comparison between the Satellite Orbits}

Figure~\ref{fig:orbit} shows the orbits of the \sw, \he and \ig satellites.
\sw and \he satellites are situated in a circular orbit with
20.6$^\circ$ and 2$^\circ$ inclination, respectively.
One revolution of \sw and \he satellites lasts about 100\,min.
\ig satellite has a highly eccentric orbit with a revolution period of three sidereal days around the Earth.

\par

It is difficult to draw strong conclusions from the individual satellite orbits.
The orientation of satellites FoV is influenced by the scheduled targets.
However, \sw is the satellite with the largest inclination and overlaps mostly with the FoV of \ma.
This increases the chance to receive {\bf Red Alerts} from this satellite.

\begin{figure}[htp]
\centering
\includegraphics[width=0.6\linewidth]{GCNsatellites.eps}
\caption{Orbits of \sw (top), \he (center) and \ig (bottom) satellites: dot lines
show the orbit while drawn lines show the horizon of the Sun. Here, a typical night at
La Palma is shown. \sw satellite passes over Roque seven times each night.}
\label{fig:orbit}
\end{figure}


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