\section{The Burst Alarm System at La Palma}

{\bf Current status:}

\par

The Burst Alarm System is installed and working since last summer
in La Palma. The duty of the Burst Alarm System
is to perform a full-time survey of the GCN (Gamma-Ray Bursts
Coordinates Network) alerts. Different satellite experiments perform GRB monitoring
in their wide FOV and send immediately the coordinates of the GRBs to the GCN network.
The network send the alerts to registered users and allows other satellites as well as
ground based observatories to observe the GRBs and their afterglows at different wavelengths.
The Burst Alarm System is composed by a core program -
which acts in two ways: on the
one hand it manages the monitoring of the GCN, on the other it manages
the communication with the Central Control (CC). Then it also manages
three communication channels to notice the shifters
about an alert situation. The program is called {\it gspot} (Gamma
Sources Pointing Trigger). 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 GCN}

The connection to {\it GRB Coordinates Network} (GCN)~\cite{GCN} is performed by {\it gspot} through a
TCP/IP connection to a computer at the Goddard Space Flight Center (GSFC). 
This computer distributes the information it receives from the satellite
experiments through the normal internet socket connection. The {\it gspot} on our
side 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 GCN differ between the individual satellites
and the kind of package. There are three satellites participating in the GRB survey:
HETE-2, INTEGRAL and SWIFT. All are sending alerts which include the
UTC, 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 more refined notices.\\

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

\begin{itemize}
\item {\bf darkness of the sky}, determined from the distance of the sun
to the astronomical horizon of 108$^\circ$ zenith;
\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$; in the case that the moon is
shining, this zenith angle limit 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 {\bf Yellow Alarm State}. It means that the GRB is not observable
at the moment. Currently the program does not calculate if and when the GRB will
become observable at La Palma.
If all conditions mentioned above are satisfied,
{\it gspot} enters into a {\bf Red Alarm State}, which means that
the GRB is considered to be observable at the current time.\\

In both cases (in RED and YELLOW alarm state) {\it gspot} establishes the communication
with the Central Control and sends the GRB equatorial coordinates (RA/DEC J2000).
For the communication to CC the format defined in~\cite{CONTROL} is used. In the same time
the shifters and the GRB-MAGIC group is contacted in different ways described in the next sessions.

\subsection{The interface to the Central Control}

An interface to {\it gspot} sends all the relevant information to {\it arehucas}.
In the case of {\bf NO Alarm State} the standard packages, containing the main global status
of the two subsystems, are continuously exchanged between CC and {\it gspot}.
In the alert case {\it gspot} starts to send to CC special alert packages,
containing information about of the GRB and the ''colour'' of the alert.
The exchange of the alert packages continues until the following steps occur:

\begin{itemize}
\item {\it gspot} receives from {\it arehucas} the confirmation
that it has received the alert notice; {\it arehucas} must send the alert back in order 
to perform a cross-check of the relevant data;
\item the alarm state expire after {\bf 5 hours}.
\end{itemize}

At the moment {\it arehucas} informs the shift crew about the alert and takes
further steps only in case of 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 to stop the current scheduled observation and to point the GRB.
A new button in the CC will be displayed and allows to point the telescope to
the GRB coordinates by pushing it.

\subsection{GRB archive and emails to the GRB-mailing list}

In case of an 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.

\subsection{The GRB web page}

The status of the GRB Alert System and relevant informations about the lastest
alerts are displayed on a separate web page. The page is hosted at the web server in La Palma.
The address is the following:\\

\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 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 very soon. It will provide a loud acoustic signal
even if {\it arehucas} is switched off, so that people in the counting house
will be noticed about the alert situation. The signal will be on as long as
{\it gspot} stays in alarm state, and in any case for a minimum of 1 minute.
This device will keep also a display to check the status of the system and the alert.

\subsection{Alerts received until now}

Since July, 15th 2004 {\it gspot} has been working stably at La Palma.
It received about 100 alerts from HETE-2 and INTEGRAL, out of which 
only 20 contained GRB's coordinates. Time delays
were of very the order of of several minutes or even
tens of minutes in most cases. The Burst Monitor can be considered bug-free since 
November 2004. Since all bugs were fixed we received only one red alert from INTEGRAL on December 19th at 1:44 am 
with a delay of 71 seconds. The GRB had a zenith angle of $\sim 60^\circ$. It is a pity that the weather
conditions were very bad during this night.

\subsection{Procedure to be defined}

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

\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 do not
calculate if and when the GRB will become observable.
It would make sense to check if during the period of 5 hours we could point to the burst.
Then, the Alarm System would change to the {\bf Red Alarm State} 
at that time and allow the observation.

\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. 
This feature was implemented in order not to
loose any GRB information. 
Such a situation can occur when the CC is switched off and thus 
cannot receive the alert and if more than one alert happens 
in the late afternoon or in the 5 hours before the beginning 
of the night-shift.
In such a case we propose
to implement a list of the available GRB alerts into {\it gspot} in which every
item expires after: 

\begin{itemize}
\item having been noticed by the CC;
\item the canonical 5 hours.
\end{itemize}

If more than one alert is present in the list, the program
gives a marker to the prioritary GRB -- a decision based on the 
total time of observability within the canonical 5 hours, 
on the intensity of the burst and on the time until the GRB becomes observable.
Such a marker should reflect our estimation of the chances to observe the GRB.
The GRB with the highest marker will be noticed to the Central Control.

\end{itemize}
