%+
% Name:
% memo_cti_correction_4.7.tex
%
% Usage:
% latex memo_cti_correction_4.7.tex
%
% Description:
% This document describes the specification for a CTI correction.
%
% Input:
%
% Output:
%
% Notes:
%
% History:
% 03 Apr 01, created, Glenn E. Allen
% 07 May 01, modified to include the decisions made at the CTI meeting, GEA
% 15 May 01, extensive modifications, GEA
% 04 Jun 01, reverted to power-law algorithm from table look-up to save
% space in the ARD, GEA
% 29 Oct 01, removed the CHIPY portion of the computation of DELTAPHAY
% since the CHIPY component is built into the trap density map, GEA
% 02 Nov 01, changed a VOLUME_Y to VOLUME, GEA
% 14 Dec 01, changed two occurances of PHAS to PHAS_ADJ, GEA
% 17 Dec 01, changed occurances of PHAS to PHAS_ADJ for serial CTI, GEA
%-
\documentclass{article}
\usepackage{cxo-memo-logo}
\usepackage[dvips]{graphics}
\usepackage{gea}
\usepackage{psfig}
\newcommand{\bit}{20}
\newcommand{\chipxmax}{{\rm CHIPXMAX}}
\newcommand{\chipxmin}{{\rm CHIPXMIN}}
\newcommand{\chipymax}{{\rm CHIPYMAX}}
\newcommand{\chipymin}{{\rm CHIPYMIN}}
\newcommand{\cticonverg}{cti\_converge}
\newcommand{\deltphax}{{\rm DELTPHAX}}
\newcommand{\deltphay}{{\rm DELTPHAY}}
\newcommand{\deltphas}{0.1~{\rm adu}}
\newcommand{\devmap}{{\rm DEV\_MAP}n}
\newcommand{\diffx}{{\rm DIFF\_X}}
\newcommand{\diffy}{{\rm DIFF\_Y}}
\newcommand{\keyword}{CTI\_FILE}
\newcommand{\nodeid}{{\rm NODE\_ID}}
\newcommand{\norm}{{\rm NORM}}
\newcommand{\newcol}{{\rm PHAS\_ADJ}}
\newcommand{\numiter}{max\_cti\_iter}
\newcommand{\phas}{{\rm PHAS}}
\newcommand{\phastmp}{{\rm PHAS\_TMP}}
\newcommand{\phazero}{{\rm PHA}_{\rm no}}
\newcommand{\shldx}{{\rm FRCTRLX}}
\newcommand{\shldy}{{\rm FRCTRLY}}
\newcommand{\switch}{{\rm apply\_cti}}
\newcommand{\tool}{acis\_process\_events}
\newcommand{\trapdens}{{\rm TRAPDENS}}
\newcommand{\vol}{{\rm VOLUME}}
\newcommand{\volx}{{\rm VOLUME\_X}}
\newcommand{\voly}{{\rm VOLUME\_Y}}
\newcommand{\xccd}{x_{\rm CCD}}
\newcommand{\yccd}{y_{\rm CCD}}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 1. Header
\memobasic{Martin Elvis, SDS Group Leader}{Glenn Allen, SDS, for the CTI task
group}{Adjusting ACIS Event Data to Compensate for CTI}{4.7}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 2. Introduction
\vspace*{0.3in}
The ACIS instrument teams at PSU and MIT have shown that a significant
improvement in the energy resolution of existing ACIS event data can be
obtained by compensating for some of the effects of the parallel
charge-transfer inefficiency (CTI) of the \fsi\ CCDs
and for the parallel and serial CTI of the \bsi\ CCDs.
To achieve this improvement, charge is added to each $3 \times 3$~pixel
event island and the charge within the event island is redistributed. The
amount of charge added to each event is based on an estimate of the average
amount of charge that is lost as charge packets are clocked across the
charge traps on the ACIS detectors. The average amount of charge lost
depends on the density of charge traps on the detector, the location of the
event on the CCD, and the number of traps that have already been filled by
``precursor events'' in the same CCD column (\ie\ on how many empty traps an
event must cross to get to the read out). We propose to modify \tool\ to
use the algorithm described in section~\ref{proc} to compute the CTI-adjusted
values of PHAS. These adjusted values are contained in a new column called
\newcol. The original, unadjusted values are retained in the column PHAS.
Once the values of \newcol\ are computed, the values of GRADE, FLTGRADE, PHA,
ENERGY, and PI are computed using the column \newcol\ in the usual fashion.
At the present, the calibration data is only appropriate for data obtained
using some of the front-side--illuminated CCDs with frame times of about
3.2~s. Current FEF, GAIN, OSIP, QE, and QEU CALDB files are inappropriate
for data adjusted using this technique. New CALDB files should be produced
for CTI-adjusted data.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 3. Changes to acis_process_events
\section{Changes to \tool}
\label{ape}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Additional Parameters}
\switch,b,a,``no'',``no'',``yes'',``Apply CTI adjustment?''
\\
ctifile,s,h,``CALDB'',,,``ACIS CTI file (NONE | none | CALDB |
$<$filename$>$)''
\\
\numiter,i,h,15,1,20,``Maximum number of iterations for the CTI
adjustment of each event''
\\
cti\_converge,r,h,0.1,0.1,1.0,``The convergence criterion for each
CTI-adjusted pixel in adu''
\vspace*{1.0\baselineskip}
When Catherine Grant tested the PSU CTI-adjustment tool, she found that the
median number of iterations required to satisfy a convergence criterion of
0.1~adu is four. No event required more than ten iterations. Therefore, a
default maximum of fifteen iterations should be sufficient to estimate the
distribution of the charge deposited in the detector. We suggest that the
maximum number of iterations be limited to the range of 1--20. The default
convergence criterion is set to 0.1~adu because this is the default value
used for the PSU CTI-adjustment tool. Since the utility of using values
smaller than 0.1~adu is questionable, the minimum value for the parameter
cti\_converge is 0.1~adu. A maximum value of 1~adu seems reasonable for the
convergence parameter.
Until the instrument team and SDS are satisfied with the algorithm and until
new CALDB files are produced and tested, the CTI adjustment should not be
applied to new data or reprocessed data by default.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Additional Input}
The tool \tool\ must read the CTI ARD file in addition to the other files it
already reads. The format of the CTI ARD file is summarized in
section~\ref{ard}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Additional Output}
If ${\rm \switch} = {\rm ``yes}$,'' the output event file has the same
format as the present Level 1 or 2 ACIS event files except that the file
includes the additional column ``\newcol'' and the additional keyword,
``\keyword.'' The new column contains the real (not integer) CTI-adjusted
values of the charge distribution in the event island. The column named
PHAS contains the original, unadjusted values of PHAS (\ie\ the bias and
overclock-subtracted values of PHAS obtained before any CTI adjustment is
performed). The keyword \keyword\ contains the name of the CTI ARD file
used to process the data. If ${\rm \switch} = {\rm ``no}$,'' no CTI
adjustment is applied, the column \newcol\ is not created, the column PHAS
contains the unadjusted values of PHAS, and ${\rm \keyword} = {\rm ``NONE}$.''
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Processing}
\label{proc}
The tool should produce an error if ${\rm \switch} = {\rm ``yes}$'' and the
input event-data file has ${\rm READMODE} \ne {\rm TIMED}$ or ${\rm DATAMODE}
\ne {\rm FAINT}$, FAINT\_BIAS, or VFAINT. The tool should produce a warning
that the columns GRADE, FLTGRADE, PHA, ENERGY, and PI will not contain
CTI-adjusted information if ${\rm \switch} = {\rm ``yes}$'' and ${\rm
doevtgrade} = {\rm ``no}$.'' The tool should produce a warning if TIMEDEL
is not in the range specified by the corresponding calibration-boundary
(``CBD'') keyword.
If ${\rm \switch} = {\rm ``yes}$,'' the column \newcol\ is created and
populated with the values of the CTI-adjusted contents of PHAS. The column
PHAS contains the unadjusted PHAS information. The original PHAS
information is retained to ensure that users can analyze the unadjusted
distribution of charge in the event island and to provide the input required
if users want to rerun \tool\ with an updated CTI ARD file at a later time.
The algorithm used to compute the CTI-adjusted values of \newcol\ is
described later in this section. After the values of \newcol\ are computed,
the values of GRADE, FLTGRADE, PHA, ENERGY, and PI are computed as usual
from the column \newcol\ (not PHAS). The column PHA has integer values
whether the CTI-adjustment is applied or not. The values of the columns
GRADE, FLTGRADE, and PHA are computed if and only if ${\rm doevtgrade} = {\rm
``yes}$'' (and ${\rm \switch} = {\rm ``yes}$''). The values of the columns
ENERGY and PI are computed if and only if ${\rm calculate\_pi} = {\rm
``yes}$'' (and ${\rm \switch} = {\rm ``yes}$'').
The columns \newcol\ and PHAS are arrays. For TIMED FAINT-mode observations,
the relative CHIPX and CHIPY coordinates associated with \newcol$[i,j]$ are
distributed as shown in figure~\ref{fig1} with $i$ and $j \in [1,3]$. If a
TIMED FAINT-mode event occurs at ${\rm (CHIPX, CHIPY)} = (960,571)$, then
\newcol$[1,2]$ corresponds to the CCD coordinates (959,571) and \newcol$[2,3]$
corresponds to the CCD coordinates (960,572). The algorithm described below
applies only to a $3 \times 3$~pixel event island. For TIMED VFAINT-mode
observations, $i$ and $j \in [1,5]$ and the appropriate $3 \times 3$~pixel
region to use is the central nine pixels of the $5 \times 5$~pixel event
island (\ie\ the region associated with \phas$[i,j]$, where $i$ and $j \in
[2,4]$ instead of $i$ and $j \in [1,5]$). The outer sixteen pixels of the $5
\times 5$~pixel event island are not modified by the CTI-adjustment algorithm.
These sixteen pixels have identically the same values in the columns \newcol\
and \phas.
If ${\rm \switch} = {\rm ``yes}$,'' the following steps describe how to
apply the CTI adjustment. The adjustment is applied to every event in the
input ACIS event-data file. For an event detected on $\ccdid = n$ at a
location $\chipx = \xccd$, and $\chipy = \yccd$,
\begin{enumerate}
\item
Copy the contents of PHAS to \newcol.
\item
\label{ite1}
Copy the values of \newcol\ (not PHAS) to \phastmp.
\item
\label{step3}
For the bottom row of the $3 \times 3$~pixel event island, compute the
effects of parallel CTI. Steps~\ref{step3}--\ref{step5} should be performed
only if the appropriate parallel-CTI trap-density map exists for $\ccdid = n$.
The CTI ARD may not contain some parallel-CTI trap-density maps if the
effects of parallel CTI are not fully calibrated. The bottom row of
$\phas[i,j]$ is given by $i \in [1,3], j = 1$ (fig.~\ref{fig1}). If
$\newcol[i,1] \ge {\rm the\ split\ threshold}$, then
%
\begin{eqnarray}
\diffy[i,1]
& =
& \deltphay_{i,1} +
\nonumber \\
\
&
& \phas[i,1] - \newcol[i,1].
\label{eqn1}
\end{eqnarray}
%
The quantity $\diffy[i,j]$ is an estimate of the amount of charge that
should be added to pixel $[i,j]$ of the event island. The quantity
$\deltphay_{i,j}$ represents the amount of charge lost from pixel $[i,j]$
due to parallel CTI and is a function of the CCD used, the location of an
event on the CCD, and the charge deposited on the CCD.
The value of $\deltphay_{i,j}$ used in equation~\ref{eqn1} is computed as
follows.
\begin{itemize}
\item[i.]
Find the row $m$ in HDU~1 of the appropriate CTI ARD file that satisfies the
conditions
\begin{eqnarray}
\ccdid_{m}
& =
& n,
\\
\chipxmin_{m}
& \le \xccd \le
& \chipxmax_{m},\ {\rm and}
\\
\chipymin_{m}
& \le \yccd \le
& \chipymax_{m},
\end{eqnarray}
where \ccdid, \chipxmin, \chipxmax, \chipymin, and \chipymax\ are the
names of columns in the CTI ARD file (see sec.~\ref{ard}).
\item[ii.]
For the row that satisfies these conditions, find the two non-zero (real!)
values ${\rm PHA}_{k}$ and ${\rm PHA}_{k+1}$ such that
\begin{equation}
0
< {\rm PHA}_{k}
\le \newcol[i,j]
< {\rm PHA}_{k+1},
\end{equation}
where ${\rm PHA}_{k}$ and ${\rm PHA}_{k+1}$ are elements of the column PHA
in the CTI ARD file.
\item[iii.]
Compute the effective ``\vol'' occupied by the charge in pixel $[i,j]$ using
the linear interpolation
%
\begin{eqnarray}
\vol_{i,j}
& =
& \frac{\newcol[i,j] - {\rm PHA}_{k}}{{\rm PHA}_{k+1} - {\rm PHA}_{k}}
\times \bigl(
\voly_{k+1} - \voly_{k}
\bigr) +
\nonumber \\
\
&
& \voly_{k},
\end{eqnarray}
%
where $\voly_{k}$ and $\voly_{k+1}$ are the $k^{\rm th}$ and $(k+1)^{\rm th}$
elements of the column \voly\ in the CTI ARD file (see sec.~\ref{ard}).
This formula is valid if and only if $1 \le k < {\rm NPOINTS}$ (\ie\ if ${\rm
PHA}_{1} \le \newcol[i,j] < {\rm PHA}_{\rm NPOINTS}$, where ${\rm PHA}_{1}$
and ${\rm PHA}_{\rm NPOINTS}$ are the smallest and largest values of the
vector PHA for row $m$, respectively). If $0 < \newcol[i,j] < {\rm PHA}_{1}$,
then use the linear extrapolation
%
\begin{eqnarray}
\vol_{i,j}
& =
& \frac{\newcol[i,j] - {\rm PHA}_{1}}{{\rm PHA}_{2} - {\rm PHA}_{1}}
\times \bigl(
\voly_{2} - \voly_{1}
\bigr) +
\nonumber \\
\
&
& \voly_{1}.
\end{eqnarray}
%
If $\newcol[i,j] \ge {\rm PHA}_{\rm NPOINTS}$, then use the linear
extrapolation
%
\begin{eqnarray}
\vol_{i,j}
& =
& \frac{\newcol[i,j] - {\rm PHA}_{{\rm NPOINTS}-1}}{
{\rm PHA}_{\rm NPOINTS} - {\rm PHA}_{{\rm NPOINTS}-1}} \times
\nonumber \\
\
&
& \bigl(
\voly_{\rm NPOINTS} - \voly_{{\rm NPOINTS}-1}
\bigr) +
\nonumber \\
\
&
& \voly_{{\rm NPOINTS}-1}.
\end{eqnarray}
If $\newcol[i,j] \le 0$, then $\vol_{i,j} = 0$.
\item[iv.]
Find the HDU in the CTI ARD file that has the parallel-CTI trap-density map
for $\ccdid = n$ (see sec.~\ref{ard}). Set $\trapdens[i,j]$ equal to the
value of the map at the position $(\chipx,\chipy) = (x_{i},y_{i})$, where
$x_{i} = \xccd - 1$, $\xccd$, and $\xccd + 1$ for $i = 1$, 2, and 3 and
$y_{i} = \yccd - 1$, $\yccd$, and $\yccd + 1$ for $j = 1$, 2, and 3.
\item[v.]
Compute the value of $\deltphay_{i,j}$:
%
\begin{eqnarray}
\deltphay_{i,j}
& =
& \trapdens_{i,j} \times
\vol_{i,j}.
\end{eqnarray}
%
\end{itemize}
\item
For the middle and top rows of the $3 \times 3$~pixel event island,
compute the effects of parallel CTI. The middle and top rows of
$\phas[i,j]$ are given by $i \in [1,3]$, $j \in [2,3]$ (fig.~\ref{fig1}).
If $\newcol[i,j] \ge {\rm the\ split\ threshold} > \newcol[i,j-1]$, then
%
\begin{eqnarray}
\diffy[i,j]
& =
& \deltphay_{i,j} +
\nonumber \\
\
&
& \phas[i,j] - \newcol[i,j].
\end{eqnarray}
%
If $\newcol[i,j] \ge \newcol[i,j-1] \ge {\rm the\ split\ threshold}$, then
%
\begin{eqnarray}
\diffy[i,j]
& =
& ( \deltphay_{i,j} - \deltphay_{i,j-1} ) +
\nonumber \\
\
&
& \phas[i,j] - \newcol[i,j].
\end{eqnarray}
%
If $\newcol[i,j-1] > \newcol[i,j] \ge {\rm the\ split\ threshold}$, then
%
\begin{eqnarray}
\diffy[i,j]
& =
& \shldy{n} \times ( \deltphay_{i,j} - \deltphay_{i,j-1} ) +
\nonumber \\
\
&
& \phas[i,j] - \newcol[i,j],
\end{eqnarray}
%
where $\shldy{n}$ is the name of a keyword in the CTI ARD file (see
sec.~\ref{ard}) and represents the fraction of the trapped charge that is
released in the first pixel following the pixel which lost the charge.
\item
\label{step5}
Use the estimate of the effects of parallel CTI to adjust the $3 \times
3$~pixel event island \newcol. For $i$ and $j \in [1,3]$,
%
\begin{equation}
\newcol[i,j]
=
\newcol[i,j] + \diffy[i,j].
\end{equation}
%
Pixels whose amount of charge $<$ the split threshold are not modified.
These pixels have the same values in the columns PHAS and \newcol.
\item
\label{step6}
For the column of a $3 \times 3$~pixel event island that is closest to the
serial read-out node, compute the effects of serial CTI.
Steps~\ref{step6}--\ref{step8} should be performed only if the appropriate
serial-CTI trap-density map exists for $\ccdid = n$. The CTI ARD may not
contain some serial-CTI trap-density maps if the effects of serial CTI are not
fully calibrated.
\begin{itemize}
\item[i.]
For $\nodeid = 0$, $i = 1$ and $j \in [1,3]$. If $\newcol[1,j] \ge {\rm the\
split\ threshold}$, then
%
\begin{eqnarray}
\diffx[1,j]
& =
& \deltphax_{1,j} +
\nonumber \\
\
&
& \phas[1,j] - \newcol[1,j].
\end{eqnarray}
\item[ii.]
For $\nodeid = 1$, $i = 3$ and $j \in [1,3]$. If $\newcol[3,j] \ge {\rm the\
split\ threshold}$, then
%
\begin{eqnarray}
\diffx[3,j]
& =
& \deltphax_{3,j} +
\nonumber \\
\
&
& \phas[3,j] - \newcol[3,j].
\end{eqnarray}
\item[iii.]
For $\nodeid = 2$, $i = 1$ and $j \in [1,3]$. If $\newcol[1,j] \ge {\rm the\
split\ threshold}$, then
%
\begin{eqnarray}
\diffx[1,j]
& =
& \deltphax_{1,j} +
\nonumber \\
\
&
& \phas[1,j] - \newcol[1,j].
\end{eqnarray}
\item[iv.]
For $\nodeid = 3$, $i = 3$ and $j \in [1,3]$. If $\newcol[3,j] \ge {\rm the\
split\ threshold}$, then
%
\begin{eqnarray}
\diffx[3,j]
& =
& \deltphax_{3,j} +
\nonumber \\
\
& \
& \phas[3,j] - \newcol[3,j].
\end{eqnarray}
\end{itemize}
The quantity $\diffx[i,j]$ is an estimate of the amount of charge that
should be added to pixel $[i,j]$. The quantity $\deltphax_{i,j}$ represents
the amount of charge lost from pixel $[i,j]$ due to the effects of serial
CTI and is a function of the CCD used, the location of an event on the CCD,
and the charge deposited on the CCD. This quantity is computed using the
same linear interpolation (and extrapolation) method used to compute
$\deltphay_{i,j}$, where \voly\ is replaced with \volx\ and the parallel-CTI
trap-density map for $\ccdid = n$ is replaced with the serial-CTI trap-density
map for the CCD.
\item
For the two columns of a $3 \times 3$~pixel event island that are farthest
from the serial read-out node, compute the effects of serial CTI.
\begin{itemize}
\item[i.]
For $\nodeid = 0$, $i \in [2,3]$ and $j \in [1,3]$. If $\newcol[i,j] \ge
\newcol[i-1,j] \ge {\rm the\ split\ threshold}$, then
%
\begin{eqnarray}
\diffx[i,j]
& =
& ( \deltphax_{i,j} - \deltphax_{i-1,j} ) +
\nonumber \\
\
&
& \phas[i,j] - \newcol[i,j].
\end{eqnarray}
%
If $\newcol[i,j] \ge {\rm the\ split\ threshold}$ and $\newcol[i,j] <
\newcol[i-1,j]$, then
%
\begin{eqnarray}
\diffx[i,j]
& =
& \shldx{n} \times ( \deltphax_{i,j} - \deltphax_{i-1,j} ) +
\nonumber \\
\
&
& \phas[i,j] - \newcol[i,j].
\end{eqnarray}
%
\item[ii.]
For $\nodeid = 1$, $i \in [1,2]$ and $j \in [1,3]$. If $\newcol[i,j] \ge
\newcol[i+1,j] \ge {\rm the\ split\ threshold}$, then
%
\begin{eqnarray}
\diffx[i,j]
& =
& ( \deltphax_{i,j} - \deltphax_{i+1,j} ) +
\nonumber \\
\
&
& \phas[i,j] - \newcol[i,j].
\end{eqnarray}
%
If $\newcol[i,j] \ge {\rm the\ split\ threshold}$ and $\newcol[i,j] <
\newcol[i+1,j]$, then
%
\begin{eqnarray}
\diffx[i,j]
& =
& \shldx{n} \times ( \deltphax_{i,j} - \deltphax_{i+1,j} ) +
\nonumber \\
\
&
& \phas[i,j] - \newcol[i,j].
\end{eqnarray}
%
\item[iii.]
For $\nodeid = 2$, $i \in [2,3]$ and $j \in [1,3]$. If $\newcol[i,j] \ge
\newcol[i-1,j] \ge {\rm the\ split\ threshold}$, then
%
\begin{eqnarray}
\diffx[i,j]
& =
& ( \deltphax_{i,j} - \deltphax_{i-1,j} ) +
\nonumber \\
\
&
& \phas[i,j] - \newcol[i,j].
\end{eqnarray}
%
If $\newcol[i,j] \ge {\rm the\ split\ threshold}$ and $\newcol[i,j] <
\newcol[i-1,j]$, then
%
\begin{eqnarray}
\diffx[i,j]
& =
& \shldx{n} \times ( \deltphax_{i,j} - \deltphax_{i-1,j} ) +
\nonumber \\
\
&
& \phas[i,j] - \newcol[i,j].
\end{eqnarray}
%
\item[iv.]
For $\nodeid = 3$, $i \in [1,2]$ and $j \in [1,3]$. If $\newcol[i,j] \ge
\newcol[i+1,j] \ge {\rm the\ split\ threshold}$, then
%
\begin{eqnarray}
\diffx[i,j]
& =
& ( \deltphax_{i,j} - \deltphax_{i+1,j} ) +
\nonumber \\
\
&
& \phas[i,j] - \newcol[i,j].
\end{eqnarray}
%
If $\newcol[i,j] \ge {\rm the\ split\ threshold}$ and $\newcol[i,j] <
\newcol[i+1,j]$, then
%
\begin{eqnarray}
\diffx[i,j]
& =
& \shldx{n} \times ( \deltphax_{i,j} - \deltphax_{i+1,j} ) +
\nonumber \\
\
&
& \phas[i,j] - \newcol[i,j],
\end{eqnarray}
%
where $\shldx{n}$ is the name of a keyword in the CTI ARD file (see
sec.~\ref{ard}) and represents the fraction of the trapped charge that is
released in the first pixel following the pixel which lost the charge.
\end{itemize}
\item
\label{step8}
Use the estimate of the effects of serial CTI to adjust the $3 \times
3$~pixel event island \newcol. For $i$ and $j \in [1,3]$,
%
\begin{equation}
\newcol[i,j]
=
\newcol[i,j] + \diffx[i,j].
\end{equation}
%
Pixels whose amount of charge $<$ the split threshold are not modified.
These pixels have the same values in the columns PHAS and \newcol.
\item
Repeat steps \ref{ite1}--\ref{step8} until the absolute values of $\newcol[i,j]
- \phastmp[i,j]$ are less than the value of the parameter \cticonverg\ for all
pixels in the $3 \times 3$~pixel event island (\ie\ until the changes in
each of the values of $\newcol[i,j]$ from one iteration to the next are less
than the value of the parameter \cticonverg). The maximum number of times that
steps \ref{ite1}--\ref{step8} should be performed is specified by the
parameter \numiter. If the CTI-adjustment process does not converge after
\numiter\ iterations, set the values of \newcol\ to be the values obtained
during the last iteration and set STATUS bit \bit\ (of bits 0--31) equal to
one.
\item
If ${\rm doevtgrade} = {\rm ``yes}$,'' compute the values of GRADE, FLTGRADE,
and PHA as usual. If $\switch = {\rm ``yes}$,'' use the values of \newcol\
instead of the values of PHAS to compute the values of GRADE, FLTGRADE, and
PHA. Otherwise, use the values of PHAS to compute the values of GRADE,
FLTGRADE, and PHA. The values of PHA are integers in either case.
\item
If ${\rm calculate\_pi} = {\rm ``yes}$,'' compute the values of ENERGY and
PI as usual.
\item
Write out the results. Write out the column \newcol\ only if ${\rm
apply\_cti} = {\rm ``yes}$.''
\end{enumerate}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 4. New CTI ARD
\section{New CTI ARD}
\label{ard}
Since the effects of CTI are temperature dependent, a different CTI ARD file
is required for each of the different focal-plane temperatures. The CTI ARD
files have the following structure.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{HDU 1 Keywords}
\begin{itemize}
\item
\shldx$n$
\item
\shldy$n$
\end{itemize}
The keywords $\shldx{n}$ and $\shldy{n}$ represent the fraction of the
trapped charge that is released in the first pixel following the pixel which
lost the charge.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{HDU 1 Columns}
\begin{itemize}
\item
\ccdid
\item
\chipxmin
\item
\chipxmax
\item
\chipymin
\item
\chipymax
\item
NPOINTS
\item
PHA (a vector with NPOINTS elements)
\item
\volx\ (a vector with NPOINTS elements)
\item
\voly\ (a vector with NPOINTS elements)
\end{itemize}
The columns \ccdid, \chipxmin, \chipxmax, \chipymin, and \chipymax\ are
used to define a complete set of spatially-separate regions on the ACIS CCDs.
The pulse-height--dependent effects of serial and parallel CTI are tabulated
for each region in the columns PHA, \volx, and \voly. These three columns
are vector columns. Each row of HDU~1 corresponds to one region of an ACIS
CCD and has NPOINTS PHA, \volx, and \voly\ elements.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{HDUs 2--21}
Each one of these twenty extensions contains either a parallel or serial
trap-density map for one of the ten ACIS CCDs. The serial and parallel-CTI
trap-density maps are recorded separately for each CCD. The trap density
of each of the $1024 \times 1024$ pixels in a map is the mean trap density
for the pixel multiplied by the \chipy\ coordinate of the pixel (\ie\ the
integrated trap density along the column associated with the pixel). The
trap densities are stored as two-byte integers with appropriate keywords
BZERO and BSCALE in the headers of each extension. (The trap ${\rm density} =
{\rm BZERO} + {\rm BSCALE} \times {\rm the}$ value of the trap density in the
image.) The use of two-byte integers instead of four-byte real numbers
helps reduce the size of the ARD file.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Size of File}
The CTI ARD files are relatively large. Each row of HDU~1 has six two-byte
integers and three four-byte real vectors with NPOINTS elements each. If
the CTI ARD contains information for one region (the entire CCD) on each of
the ten ACIS CCDs and if ${\rm NPOINTS} = 100$, the binary table of HDU~1
comprises $10 \times 1 \times (6 \times 2 + 3 \times 4 \times 100)\ {\rm
bytes} = 12.1$~kb of information. The size of each of the twenty trap-density
maps is 2.1~Mb (\ie\ $1024 \times 1024\ {\rm pixels} \times 2\ {\rm bytes/
pixel}$). Unless the number of regions per CCD becomes much larger than one,
the size of HDU~1 is much smaller than the size of the trap-density maps and
the size of one CTI ARD file is 42~Mb (\ie\ $20\ {\rm hdus} \times
2.1$~Mb/hdu).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 5. Figures
\begin{figure}
\hfil
\hbox{\psfig{file=memo_cti_correction_fig1.eps2,width=5.50in}}
\hfil
\caption{The relative CHIPX and CHIPY coordinates of the nine elements of a $3
\times 3$ ACIS event island (\ie\ the nine elements of PHAS and \newcol\ for
TIMED FAINT-mode events).
\label{fig1}}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 6. Footer
\vfill
\mfile{/nfs/wiwaxia/h2/gea/sds/docs/memos/memo\_cti\_correction\_4.7.tex}
\murl{http://space.mit.edu/\~{}gea/docs/memo\_cti\_correction\_4.7.ps}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 7. Finish
\end{document}