%+
% Name:
%   bias_repair_1.0.tex
%
% History:
%   2009 Aug 12, created (v1.0), Glenn E. Allen
%-

\documentclass{article}

% \usepackage{changebar}
\usepackage{cxo-memo-logo}
\usepackage[dvips]{graphics}
\usepackage{epsfig}
\usepackage{gea}

\begin{document}

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

% 1. Header

\memobasic{
   Jonathan McDowell, SDS Group Leader }{
   Glenn E.\ Allen, SDS }{
   Bias repair }{
   1.0 }{
   http://space.mit.edu/CXC/docs/docs.html\#bias\_rep }{
   /nfs/cxc/h2/gea/sds/docs/memos/bias\_repair\_1.0.tex }

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

% 2. Description

\section{ Introduction }

Biases can be adversely affected for a number of reasons, including the
interaction of charged particles in the detector, the transmission of
optical light through the optical-blocking filter, and the loss of part or
all of the bias telemetry.  In order to produce the most accurate ACIS event
data possible, biases may have to be repaired or replaced.  If a problem
affects an entire CCD, then replacement of the bias for the CCD is
necessary.  The following describes how to replace a bias for one
observation with a modified version of a bias from another observation.

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

% 3. Replacement

\section{ Replacement }

The following steps are performed to replace the bias for a CCD with another
bias for the same CCD.

\begin{enumerate}

  \item
    Copy a suitable bias $B$ to be used as a replacement.

  \item
    For the first node of the bias (i.e. columns 1--256), modify the values
    of every pixel in the node such that 
    %
    \begin{equation}
      B' = B - {\tt INITOCLA} + {\tt INITOCLA}',
    \end{equation}
    %
    where {\tt INITOCLA} is a keyword in the header of the replacement bias
    and ${\tt INITOCLA}'$ is a keyword in the header of the bias being
    replaced.
    %
    \label{step02}

  \item
    Repeat step~\ref{step02} for the other three nodes, using {\tt
    INITOCLB}, {\tt INITOCLC}, and {\tt INITOCLD}, instead of {\tt
    INITOCLA}, for columns 257--512, 513--768, and 769--1024, respectively.

  \item
    Process the ACIS event data using the replacement bias $B'$.

  \item
    Examine the pulse-height information of the event data after it has been
    processed with the replacement bias.  If ${\tt DATAMODE} = {\tt FAINT}$,
    then prepare a histogram of the pulse heights of the 4 corner pixels for
    every event on the first node.  The peak of the distribution should be
    at a pulse height of 0 adu.  If it is not, then adjust the values of the
    bias $B'$ for the node and reprocess.  Repeat this process for the other
    three nodes on the CCD.  Note that if ${\tt DATAMODE} = {\tt VFAINT}$,
    then prepare a histogram using the pulse heights of the outer 16 pixels
    instead of the 4 corner pixels. 
    %
    \label{step05}

  \item
    Repeat steps~\ref{step02}--\ref{step05} until the condition specified in
    step~\ref{step05} is satisfied.

\end{enumerate}

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

% 4. Caveats

\section{ Caveats }

\begin{enumerate}

  \item
     If the bias being adjusted suffers from a light leak, then some events
     near the event threshold will have been lost and cannot be recovered.

\end{enumerate}

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

% 5. Finish

\end{document}

