%+
% Name:
%   memo_pixelrandom_0.2.tex
%
% Usage:
%    latex memo_pixelrandom.tex
%
% Description:
%    This document describes required additions to header keywords
%       in order to accomodate non-pixel-randomized processing. 
%
% Input:
%
% Output:
%
% Notes:
%
% History:
%   24 February 04, created (v0.1), 
%   01 March    04, created (v0.2), 
%-

\documentclass{article}

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

\newcommand{\lsf}{LSFPARM}
\newcommand{\tgres}{tg\_resolve\_events}
\newcommand{\apply}{apply\_tgain}

\begin{document}

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

% 1. Header

\memobasic{
   Arnold Rots, Archive Lead }{
   Bish K. Ishibashi, SDS }{
   Introducing New Keywords for Non-Pixel-Randomized Event files}{
   0.1 }{}{
   /nfs/cxc/h2/bish/CXC\ SDS/RANDOM/memo\_random\_0.2.tex}

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

% 2. Theme

\section{Pixel Randomization}

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

% 3. Description

\subsection{ Description }

Chandra's bore-sight shifts in Lissajous pattern by default. Through 
aspect processing, each event is mapped into a proper place and 
an aspect-corrected image is reconstructed. It is, however, noted earlier
that anomalous aliasing / artifacts remain in the aspect reconstructed image. 
In order to minimize the effect of potentially harmful artifacts, 
uniform pixel randomization of $\pm 0.5$~pix is applied onto CHIP X and Y 
prior to calculating SKY X and Y values. A similar spatial pixel 
randomization is applied in TG coordinate when processed through CIAO 
\tgres. In the same sense, another randomization is being added onto ACIS
energy (PHA) value. This is to mitigate PI spectral aliasing (PHA  
$\pm 0.5$~adu). 

\vspace{1mm}
\noindent
In Repro {\em{III}}, decisions have been made to alter some default options 
for randomization on SKY X/Y and TG R/D, while keeping the PI randomization
as it is. This document describes how we propose to implement additional 
keywords into Level 1 Event products and higher. 

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

% 4. Current Status

\subsection{ Data Randomization }

\noindent
Table~1 shows the current schema for data randomization and proposed changes. 

\begin{table}[b]
  \begin{center}
    \begin{tabular}{lccl}
      \multicolumn{4}{c}{Table~1. Data Randomization } \\
      \hline
      \hline
      \
        Quantity & Present Default  & Proposed Default   & Comment \\
        \hline
        \\
        SKY X/Y  (ACIS) & $\pm 0.5$~pix    & $\pm 0.5$~pix       & Need new development of SER scheme. \\
        SKY X/Y  (HRC)  & $\pm 0.5$~pix    & 0.0~pix             & Randomization adds no merit. \\
        TG  R/D  (ACIS \& HRC) & $\pm 0.5$~pix    & 0.0~pix      & No viable merit in randomization. \\
        \\
        PI energy (ACIS) & $\pm 0.5$~adu   & $\pm 0.5$~adu       & Mitigates PI spectral aliasing \\
        \\
      \hline
    \end{tabular}
  \end{center}
\end{table}


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

% 5. Request for enhancement

\subsection{ Required Additional Header Keywords }

\noindent
To query through CALDB for either randomized or non-randomized calibration 
products, we require additional header keywords to be defined and included 
into appropriate CALDB products (e.g., LSFPARM and gRMF) and processed 
event files at Level 1 (e.g., for SKY X/Y) or higher. To accommodate this 
enhancement, we propose to introduce the following three new keywords (Table~2).

\begin{table}
  \begin{center}
    \begin{tabular}{lccl}
      \multicolumn{4}{c}{Table~2. New Keywords for Randomization } \\
      \hline
      \hline
      \
        Keyword         & Type             & Range               & Description \\
        \hline
        \\
        XY\_RAND        & Float            & [0.0, 0.5]          & Sky X/Y randomization \\
        TG\_RAND        & Float            & [0.0, 0.5]          & Grating Coordinate randomization \\
        \\
        PI\_RAND        & Float            & [0.0, 0.5]          & This may not be necessary now \\
        \\
      \hline
    \end{tabular}
  \end{center}
\end{table}


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

% 6. Affected tools

\section{ Affected CIAO Tools }

\noindent
See Table 3.
 
\begin{table}
  \begin{center}
    \begin{tabular}{lcl}
      \multicolumn{3}{c}{Table~3. Affected Tools } \\
      \hline
      \hline
      \
        Toolname        & Keywords         & Description \\
        \hline
        \\
        \ape\           & XY\_RAND, PI\_RAND & controlled via rand\_pix\_size and rand\_pha \\
        \tgres\         & TG\_RAND         & controlled via rand\_pix\_size \\
        mkgrmf          & TG\_RAND         & query keyword to locate proper CALDB/LSFPARM \\
        \\
      \hline
    \end{tabular}
  \end{center}
\end{table}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}


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

% 8. Finish

\section{ Additional Remarks on Grating Coordinate Randomization }

\noindent
Currently we have an infrastructure that allows users to choose between 
randomized and non-randomized grating coordinate LSFPARM. This is to 
interact with ardlib manually by specifying what LSFPARM products to 
use. However, the use of keywords will make it more user-friendly. 


\end{document}

