%+
% Name:
%    memo_event_status_bits_1.5b.tex
%
% Usage:
%    latex memo_event_status_bits_1.5b.tex
%
% Description:
%    This document describes the meaning of the STATUS bits of an ACIS evt1
%    or evt1a file.
%
% Input:
%
% Output:
%
% Notes:
%
% History:
%    06 Jul 00, created, Glenn E. Allen
%    24 Jul 00, revised, GEA
%    18 Jul 01, added bit 20, GEA
%    05 Mar 02, changed bit 12/13 description, GEA
%    09 May 02, added bits 23 (v1.4), GEA
%    17 Jul 02, fixed a slight inaccuracy in bit 1 (v1.5), GEA
%    10 Sep 02, updated header (v1.5b), GEA
%-

\documentclass{article}

\usepackage{cxo-memo-logo,gea}
\usepackage[dvips]{graphics}

\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% header

\memobasic{
   Martin Elvis, SDS Group Leader }{
   Glenn Allen, SDS ACIS Scientist }{
   ACIS Event Data STATUS Bits }{
   1.5b }{
   http://space.mit.edu/CXC/docs/docs.html\#evtbits }{
   /nfs/cxc/h2/gea/sds/docs/memos/memo\_event\_status\_bits\_1.5b.tex }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% body

\vspace*{0.3in}
The thirty-two bits of the column STATUS of an ACIS event file (e.g.\ evt1 
or evt1a) are used to indicate various potential problems with the events.  
If one or more of the bits is set to a value of one for an event, the event 
may have a problem and is excluded from the Level 2 ACIS event file (i.e.\ 
evt2).  This memo describes the potential problems associated with each of 
the thirty-two STATUS bits.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% STATUS bits

\section{STATUS bits}

\begin{table}[h]
\begin{center}
\begin{tabular}{|c|c|l|}
\hline
STATUS
   & Integer
   & 
   \\
Bit
   & Representation$^{\dag}$
   & \hfil Condition(s) for which the STATUS bit is set to one \hfil
   \\
\hline
\
   & 
   &
   \\
0
   & 1
   & \parbox[t]{4.47in}{
     The CHIPX and CHIPY coordinates of an event are invalid (e.g.\ the
     coordinates are outside a window, are on an inactive CCD, or are in the
     top-half of a CCD experiencing a ``FEP0'' problem). 
     \\
     }
   \\
1
   & 2
   & \parbox[t]{4.47in}{
     The PHA value of the central pixel of an event island is less than (or,
     in some cases, less than or equal to) one or more of PHA values of the
     eight surrounding pixels in the event island (before the CTI adjustment
     is applied) or is less than the split threshold. 
     \\
     }
   \\
2
   & 4
   & \parbox[t]{4.47in}{
     One or more of the nine pixels of a $3 \times 3$-pixel event island has
     a PHA value $> 4095$ after the bias and the delta overclock values have
     been subtracted.
     \\
     }
   \\
3
   & 8
   & \parbox[t]{4.47in}{
     The sum of the PHA values of the nine pixels of a $3 \times 3$-pixel 
     event island that are $\ge$ the split threshold $\ge 32767$ (i.e.\
     $\gtapprox\ 130$~keV).
     \\
     }
   \\
\hline
\end{tabular}
\end{center}
\end{table}

$^{\dag}$ This integer representation is appropriate for machines that use the
``big-endian'' convention for byte strings, where the first byte of the string
is assumed to contain the highest-order bits.

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

\begin{table}[h]
\begin{center}
\begin{tabular}{|c|c|l|}
\hline
STATUS
   & Integer
   & 
   \\
Bit
   & Representation
   & \hfil Condition(s) for which the STATUS bit is set to one \hfil
   \\
\hline
\
   & 
   &
   \\
4
   & 16
   & \parbox[t]{4.47in}{
     The CHIPX and CHIPY coordinates of an event are the coordinates of a 
     pixel that is identified as ``bad'' in the associated bpix1 file.
     \\
     }
   \\
5
   & 32
   & \parbox[t]{4.47in}{
     The CHIPX and CHIPY coordinates of one or more of the outer eight
     pixels of a $3 \times 3$-pixel event island (or the outer twenty-four
     pixels of a $5 \times 5$-pixel event island) are the coordinates of a
     pixel that is identified as ``bad'' in the
     \\
     }
   \\
6
   & 64
   & \parbox[t]{4.47in}{
     The bias value associated with the CHIPX and CHIPY coordinates of an 
     event $= 4095$.  This condition occurs if the pixel is indentified as 
     ``bad'' or if the pixel is not on the active region of a sub array.
     \\
     }
   \\
7
   & 128
   & \parbox[t]{4.47in}{
     The bias value associated with the CHIPX and CHIPY coordinates of an 
     event is unknown (e.g.\ telemetry was lost).
     \\
     }
   \\
8
   & 256
   & \parbox[t]{4.47in}{
     The bias value associated with the CHIPX and CHIPY coordinates of an 
     event $= 4094$.  This condition indicates that the pixel has a
     bias-parity error.
     \\
     }
   \\
9
   & 512
   & \parbox[t]{4.47in}{
     The overclock value associated with an event is unknown.
     \\
     }
   \\
10
   & 1024
   & \parbox[t]{4.47in}{
     The overclock value associated with an event is not in the nominally-
     expected range of overclock values.
     \\
     }
   \\
11
   & 2048
   & \parbox[t]{4.47in}{
     The mean PHA value of the four corner pixels of a $3 \times 3$-pixel 
     event island $ < -4095$.
     \\
     }
   \\
12 
   & 4096
   & \parbox[t]{4.47in}{
     Bits 12 and 13 are used to indicate the number of pixels that were 
     included in the computation of the mean PHA value of the four corner
     pixels of a $3 \times 3$-pixel event island.  Bits (12,13) have values
     of (0,0), (1,0), (0,1), or (1,1) to indicate that 4, 3, 2, or 1 pixels
     were used to compute the mean value of the corner pixels, respectively.
     Pixels are excluded from the computation if they are indentified
     ``bad'' or have bias-parity errors.
     \\
     }
   \\
13
   & 8192
   & \parbox[t]{4.47in}{
     See STATUS bit 12.
     \\
     }
   \\
14
   & 16384
   & \parbox[t]{4.47in}{
     The mean value of the four corner pixels of a $3 \times 3$-pixel event
     island $= 4095$. This condition indicates that all four of the corner
     pixels are ``bad'' or have bias-parity errors.
     \\
     }
   \\
15
   & 32768
   & \parbox[t]{4.47in}{
     The event is associated with a horizontal ``streak'' on a CCD.  Streaks
     are associated with spurious signals in the read-out electronics.
     \\
     }
   \\
16
   & 65536
   & \parbox[t]{4.47in}{
     Bits 16--19 are used to indicate that an event may be part of a 
     ``cosmic-ray afterglow.'' The bits enumerate the number of consecutive
     frames (including the frame associated with the event) in which events
     have been reported at the same CHIPX and CHIPY location as the given
     event.  For example, if bits 16--19 are 1100, 1010, or 1111, the event
     is part of a sequence of 3, 5, or $\ge 15$ events at the same CHIPX and
     CHIPY location, respectively.
     \\
     }
   \\
17--19
   & ---
   & \parbox[t]{4.47in}{
     See STATUS bit 16.
     \\
     }
   \\
20
   & 1048576
   & \parbox[t]{4.47in}{
     The CTI-adjustment algorithm (if used) did not converge.
     \\
     }
   \\
\hline
\end{tabular}
\end{center}
\end{table}

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

\begin{table}[t]
\begin{center}
\begin{tabular}{|c|c|l|}
\hline
STATUS
   & Integer
   & 
   \\
Bit
   & Representation
   & \hfil Condition(s) for which the STATUS bit is set to one \hfil
   \\
\hline
\
   & 
   &
   \\
21--22
   & ---
   & \parbox[t]{4.47in}{
     Unused.
     \\
     }
   \\
23
   & 8388608
   & \parbox[t]{4.47in}{
     The event is identified as a potential cosmic-ray background event.
     This bit can be set to one only for TIMED VFAINT mode data that was
     processed using the optional \ape\ parameter check\_vf\_pha$=$yes.
     \\
     }
   \\
24--31
   & ---
   & \parbox[t]{4.47in}{
     Unused.
     \\
     }
   \\
\hline
\end{tabular}
\end{center}
\end{table}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% footer

\end{document}
