\section{The Burst Alarm System at La Palma}

{\bf Current status:}

\par

The Burst Alarm System {\it gspot} (Gamma
Sources Pointing Trigger) is 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 distributes 
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 data concerning the GRBs
and concerning the status of the connection. \\

The format of the data distributed through the \g differ between the individual satellites
and 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
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$.
\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}: The GRB is not observable at the moment.
Currently, the program does not calculate if and when the GRB will become observable for \ma.
If all the  mentioned conditions are satisfied, 
{\it gspot} enters into a \textcolor{red}{\bf Red Alarm State}, meaning that the GRB is observable.\\

In both cases (\textcolor{red}{\bf RED} or {\color[rgb]{0.9,0.75,0.}\bf YELLOW} Alarm State), {\it gspot} establishes the communication with the CC and sends the GRB equatorial coordinates (RA/DEC J2000).
For the communication with CC the format defined in~\cite{CONTROL} is used. At the same time,
the shifters and the GRB-MAGIC group is 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 alert, {\it gspot} starts to send special alert packages to the CC,
containing information about the GRB and the ``color'' of the alert.
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; The CC must send back the alert in order
to perform a cross-check of the relevant data.
\item the alarm state expires after {\bf 5 hours}
\end{itemize}

The CC informs the shift crew about the alert and undertakes
further steps only in case of a \textcolor{red}{\bf red alerts}. 
In this case, a pop-up window
appears with all the alert information received by 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 and to point the GRB.
A new button will be displayed in the CC allowing to point the telescope to
the GRB coordinates.

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

In case of alert -- even if it did 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 grb@mppmu.mpg.de}.

\subsection{The GRB Web Page}

The status of the GRB Alert System and relevant informations about the latest
alerts are displayed on a separate web page. The page is hosted at the web server in La Palma a
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.

\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 1 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
21 contained GRB's 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 then, we have received the following two significant alerts:\\

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

In both cases the 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 16 GRBs since mid-December last year. The bursts were detected by chance during the commissioning phase. Since 15th of February the satellite sends burst allerts to the \g in real time. The current sample contains three bursts which could have been observed by \ma. The coordinates of the last burst from 15th February were send via an
alert within few seconds. Also in this cases the weather conditions did not allow any observation.\\

\begin{tabular}{lllcc}
19th & December & 2004 & 1:42 am & Zd $\sim 65^\circ$ \\
26th & December & 2004 & 8:34 pm & Zd $\sim 52^\circ$ \\
15th & Februar & 2005 & 2:33 am & Zd $\sim 17^\circ$ \\ \\
\end{tabular}

\subsection{Comparison between the Satellite Orbits}

Figure~\ref{fig:orbit} shows the orbits of the \sw, \he and \ig satellites.
The \sw and \he satellites are situated in a circular orbit with
20.6$^\circ$ and 2$^\circ$ inclination, respectively.
One revolution of the \sw and \he satellites last about 100\,min.
The \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 satellites' orbits.
The orientation of the 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 Alarms} from this satellite.

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

\subsection{Routines to Be Defined}

The Burst Alarm System is currently able to provide the minimum
features needed to point and to observe a GRB. However, in order to improve the efficiency
to point and observe GRBs, several procedures have to be defined:

\begin{itemize}
\item {\bf Yellow Alarm strategy}:
The strategy to follow a {\bf Yellow Alarm} is not defined yet.
In such a case, the CC does not undertake any steps,
except confirming the alarm notice to the Burst Monitor. We have not
calculated yet if and when the GRB will become observable.
It would make sense to check if we could point to the burst during the period of 5 hours.
The Alarm System should change to a {\bf Red Alarm State}, then.

\item {\bf Sequence of alerts}:
How to deal with new alerts that are distributed during the time
that {\it gspot} is in alarm state? Currently, {\it gspot}
locks its alert status until it exits the alarm state (see session 2.2).
This feature was implemented to avoid any loss of GRB information.
Such a situation can occur for example if more than one burst alert is sent before
the shift crew launches the CC. 
To solve this problem, we will change the {\it gspot} routine 
by implementing a list of all available GRB alerts.


\par

If more than one alert is present in the list, the program
will weight the possible GRBs according to the following criteria:
(1) the total time of observability within the canonical 5 hours,
(2) the intensity of the burst and
(3) the time until the GRB becomes observable.
The information of the best GRB will be sent to the CC.

\end{itemize}

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