%+
% Name:
%    memo_bpix_status_bits_1.1.tex
%
% Usage:
%    latex memo_bpix_status_bits_1.1.tex
%
% Description:
%    This document describes the meaning of the STATUS bits of an ACIS bpix1
%    file.
%
% Input:
%
% Output:
%
% Notes:
%
% History:
%    10 Sep 02, created, Glenn E. Allen
%-

\documentclass{article}

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

\begin{document}

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

\memobasic{
   Martin Elvis, SDS Group Leader }{
   Glenn E.\ Allen, SDS ACIS Scientist }{
   ACIS Bad Pixel STATUS Bits }{
   1.1 }{
   http://space.mit.edu/CXC/docs/docs.html\#bpixbits }{
   /nfs/cxc/h2/gea/sds/docs/memos/memo\_bpix\_status\_bits\_1.1.tex }

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

\vspace*{0.3in} 
The sixteen bits of the column STATUS of an ACIS bad pixel file (\eg\
*\_bpix1.fits) are used to describe why a pixel or column is designated as
``bad.'' Events that occur on a bad pixel have a STATUS bit set to one in
the Level 1 event data file and are excluded from the Level 2 event data
file.  Since a bad pixel file for an observation is the union of pixels and
columns identified as bad for many observations in a bad pixel ARD file and
pixels that are identified as bad for the observation (\eg\ are identified
as such in the bias map(s) for the observation), the Level 1 bad pixel file
(not the bad pixel ARD file in the CALDB) should be used to produce an
instrument map and an imaging or grating ARF for the observation.

Unless otherwise indicated, the descriptions in the table below apply to
TIMED mode observations.  For continuous-clocking mode observations, bad
pixels (and columns) are considered bad columns.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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 pixel is identified as bad in the CALDB bad pixel ARD file.
     \\
     }
   \\
1
   & 2
   & \parbox[t]{4.47in}{
     The column is identified as bad in the CALDB bad pixel ARD file.
     \\
     }
   \\
2
   & 4
   & \parbox[t]{4.47in}{
     A bias-parity error occurred for the pixel.
     \\
     }
   \\
3
   & 8
   & \parbox[t]{4.47in}{
     The bias value for the pixel is 4095.  This condition indicates that
     the pixel is identified as bad in the onboard bad pixel list or is
     outside the region for which events can be reported.
     \\
     }
   \\
\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 bias value for the pixel is 4094, which indicates that a
     bias-parity error occurred for the pixel.
     \\
     }
   \\
5
   & 32
   & \parbox[t]{4.47in}{
     This bit is used to identify the columns along the outer edge of a CCD
     at CHIPX = 1 and 1024.  No events can be reported for these columns.
     \\
     }
   \\
6
   & 64
   & \parbox[t]{4.47in}{
     For TIMED mode observations, this bit is used to identify the rows
     along the outer edge of a CCD at CHIPY = 1 and 1024.  No events can be
     reported for these rows.
     \\
     }
   \\
7
   & 128
   & \parbox[t]{4.47in}{
     Unused.
     \\
     }
   \\
8
   & 256
   & \parbox[t]{4.47in}{
     For TIMED FAINT, TIMED VFAINT, and continuous clocking mode
     observations, this bit is used to identify the eight pixels that
     surround a bad pixel (and a pixel in a bad column). This condition does
     not apply to a pixel or column if only one (or more) of the bad pixel
     STATUS bits 5, 6, 11, 12, or 13 is set to one.
     \\
     }
   \\
9
   & 512
   & \parbox[t]{4.47in}{
     For TIMED VFAINT mode observations, this bit is used to identify the
     rows and columns that are immediately adjacent to the outer edge of a
     CCD. (\ie\ CHIPX = 2 and 1023 and CHIPY = 2 and 1023).
     \\
     }
   \\
10
   & 1024
   & \parbox[t]{4.47in}{
     This bit is used only for TIMED VFAINT mode observations.  It is used
     in a similar fashion as bit 8.  For a bad pixel (or a pixel in a bad
     column), this bit is set to one for the sixteen pixels that surround
     the eight pixels for which bit 8 is set to one. This condition does not
     apply to a pixel or column if only one (or more) of the bad pixel
     STATUS bits 5, 6, 11, 12, or 13 is set to one.
     \\
     }
   \\
11
   & 2048
   & \parbox[t]{4.47in}{
     This bit is used to identify the columns at the mid-chip node boundary
     (\ie\ CHIPX = 512 and 513).  The events reported for these columns are
     often produced by cosmic rays instead of X rays.
     \\
     }
   \\
12 
   & 4096
   & \parbox[t]{4.47in}{
     This bit is used to identify the columns at the quarter-chip node
     boundaries (\ie\ CHIPX = 256, 257, 768, and 769).  The events reported
     for these columns are often produced by cosmic rays instead of X rays.
     \\
     }
   \\
13
   & 8192
   & \parbox[t]{4.47in}{
     This bit is used to identify the region affected by the ``FEP0'' problem.
     \\
     }
   \\
14--15
   & ---
   & \parbox[t]{4.47in}{
     Unused.
     \\
     }
   \\
\hline
\end{tabular}
\end{center}
\end{table}

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

\end{document}
