% Time-stamp: <1999-05-27 13:09:06 dph> 
% MIT Directory: ~dph/h1/ASC/TG/Flight/L15_ICD/
% CfA Directory: /dev/null
% File: ICD_L1.5.tex
% Author: D. Huenemoerder
% Original version: 971213 based on HRC L1
%
% (this header is ~dph/libidl/time-stamp-template.el)
% to auto-update the stamp in emacs, put this in your .emacs file:
%      (add-hook 'write-file-hooks 'time-stamp)
%====================================================================

\documentclass[twoside]{article}

\usepackage[dvips]{graphics}
\usepackage[outerbars,dvips]{changebar}
\usepackage{fancyhdr}
\pagestyle{fancy}

\textwidth=6.5in
\textheight=8.9in
\topmargin=-0.5in
\oddsidemargin=0in
\evensidemargin=0in


%%%%%%%%%%%%%%%%%%%%%% BEGIN dph useful macros %%%%%%%%%%+++++++++++++ 

%%% Normally, these live in dph.sty, but to make this self-contained
%%% (mostly), I've inserted them here.

%%     suppress badness messages %%%%%%%%%%%%
\tolerance=10000 \hbadness=10000 \vbadness=10000

%%% Suppress widows and orphans! %%%
\widowpenalty=1000 \clubpenalty=1000  

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% a hack for marginal comments.
% doesn't work in certain environments (like tabular)
% easily runs out of room if margins are small

%\marginparwidth 1.5in    %% adjust size of margin to give room for remarks
%\marginparsep 2em                            

\newcommand{\Skinny}{
  \textwidth=5in\textheight=8.5in
  \oddsidemargin=0.5in
%  \evensidemargin=1in
%  \marginparwidth 2.0in                           %% adjust size of margin to
%  \marginparsep 0.2in                             %  give room for remarks
  \evensidemargin=1.2in
  \marginparwidth 1.5in                           %% adjust size of margin to
  \marginparsep 0.1in                             %  give room for remarks
  }

\newcommand{\Remark}[1]{\marginpar
%   {\fbox{\parbox{1.7in}{\raggedright\scriptsize#1}}}}
   {\fbox{\parbox{1.33in}{\raggedright\scriptsize#1}}}}

\newcommand{\Putline}{
%  \advance\textwidth-26pt
  \rule{\the\textwidth}{1pt}
%  \advance\textwidth+26pt
  }

\newcommand{\Note}[1]{
\begin{changemargin}{0.25in}{0in}
\advance\textwidth-26pt
\parbox{\textwidth}{      % testing...
\hfill\Putline\newline
%\parbox{\textwidth}{\small\sf#1}\\
{\small\sf#1}\\            % testing...
\Putline\newline
}       % testing...
\advance\textwidth+26pt
\end{changemargin}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \putstring{x}{y}{angle}{scale}{gray}{string}
% gray: 0=black, 1=white

\newcommand{\putstring}[6]{
\special{!userdict begin /bop-hook{gsave #1 #2 translate
#3 rotate /Times-Roman findfont #4 scalefont setfont
0 0 moveto #5 setgray (#6) show grestore}def end}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% another putstring, but using eop-hook (what's then general ps solution?)
% \eputstring{x}{y}{angle}{scale}{gray}{string}
% gray: 0=black, 1=white

\newcommand{\eputstring}[6]{
\special{!userdict begin /eop-hook{gsave #1 #2 translate
#3 rotate /Times-Roman findfont #4 scalefont setfont
0 0 moveto #5 setgray (#6) show grestore}def end}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%    To change the margins of a document within the document,
%    modifying the parameters listed on page 163 will not work. They
%    can only be changed in the preamble of the document, i.e, before
%    the \begin{document} statement. To adjust the margins within a
%    document we define an environment which does it:
      \newenvironment{changemargin}[2]{\begin{list}{}{
         \setlength{\topsep}{0pt}\setlength{\leftmargin}{0pt}
         \setlength{\rightmargin}{0pt}
         \setlength{\listparindent}{\parindent}
         \setlength{\itemindent}{\parindent}
         \setlength{\parsep}{0pt plus 1pt}
         \addtolength{\leftmargin}{#1}\addtolength{\rightmargin}{#2}
         }\item }{\end{list}}
%    This environment takes two arguments, and will indent the left
%    and right margins by their values, respectively. Negative values
%    will cause the margins to be widened, so
%    \begin{changemargin}{-1cm}{-1cm} widens the left and right margins
%    by 1cm.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\Header}[2]{
\pagestyle{myheadings}                   %%%%%%%%%%
\markboth{\bf \qquad #1 \hfill #2 \qquad}%%%%%%%%%%
         {\bf \qquad #1 \hfill #2 \qquad}%%%%%%%%%%
}

%%%%%%%%%%%%%%%%%%%%%% END dph useful macros %%%%%%%%%%--------------


%%%
%%% Look for occurrences of five pound characters: #####, to locate places
%%% where updates are necessary
%%%

%%%
%%% revision info
%%%
\newcommand{\Revision}{\mbox{\em%
%%%
%%% ##### Update the revision information
%%%
%Revision 0.0---23 Dec 1997 % my first draft, uncirculated
%Revision 0.9; 23 Dec 1997 % my first draft, for circulation, after
                           % which it will become:
%Revision 1.0---02 Feb 1998 % reviewed, updated.
%Revision 1.1---18 Feb 1998 % reviewed, updated.
%Revision 1.2---20 Feb 1998 % A.Rots; region extension, TNULLi
%Revision 1.3---27 Apr 1998 % misc edits, as per aa,wlm.
%Revision 1.4---2 July 1998 % more misc edits, as per aa,wlm, arots.
%Revision 1.4 (DRAFT) ---22 Oct 1998 % more misc edits, as perjdp,aa,wlm.
%Revision 1.5 --- 26 Feb 1999 % more misc edits, as per aa,wlm.
Revision 1.6 --- 27 May 1999 % more misc edits, as per aa,wlm,ar.
}}

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

\Skinny
%\Header{L1.5 to ASC Archive ICD /}{\Revision}

\lhead{L1.5 to CXC Archive ICD}
\rhead{\Revision}
\lfoot{Formatted on \today}
\rfoot{File: ICD\_L1.5.tex}

\begin{document}

% \putstring{x}{y}{angle}{scale}{gray}{string}
% gray: 0=black, 1=white
%\putstring{70}{40}{90}{40}{0.90}{D R A F T -DRAFT- D R A F T}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% title stuff, no need to change anything
%%%

\begin{titlepage}

\begin{changemargin}{-1in}{-1in}

  \begin{center}
%    {\huge\bf AXAF Science Center}
    {\huge\bf Chandra X-Ray Center}

    \vspace*{0.1in}
    \leavevmode{\scalebox{0.17}{\includegraphics{asc_logo.eps}}}
    \vspace*{0.1in}

    {\LARGE\bf Grating Data Products:}

    \vspace*{0.1in}
    {\LARGE\bf Level 1.5 to CXC Archive Interface Control Document}
    ({\tt http://TBD.harvard.edu/TBD/ICD\_L1.5.ps.gz})\footnote{
    {Current DRAFT version can be found at: \tt http://space.mit.edu/ASC/docs/ICD\_L1.5.ps.gz}}
    \vspace*{0.2in}

    \Revision

  \end{center}

  \vfill

\begin{center}
  \begin{tabular}{lll}
    Submitted: & \rule{3.25in}{0.01in} & \rule{0.55in}{0.01in} \\
    & David Huenemoerder & Date   \\
    & Grating Scientist, CXC Science Data Systems & \\[0.25in]
%
    Concurred: & \rule{3.5in}{0.01in} & \rule{0.75in}{0.01in} \\
    & Arnold Rots & Date   \\
    & Archive Scientist, CXC Data Systems & \\[0.25in]
%
    Concurred: & \rule{3.5in}{0.01in} & \rule{0.75in}{0.01in} \\
    & Kenny Glotfelty & Date   \\
    & CXC Data Systems Group Leader, L1.5 Pipelines & \\[0.25in]
%
    Concurred: & \rule{3.5in}{0.01in} & \rule{0.75in}{0.01in} \\
    & Janet DePonte & Date   \\
    & Manager, CXC Data Systems & \\[0.25in]
%
    Concurred: & \rule{3.5in}{0.01in} & \rule{0.75in}{0.01in} \\
    & Martin Elvis & Date   \\
    & Manager, CXC Science Data Systems & \\[0.25in]
%
    Approved:  & \rule{3.5in}{0.01in} & \rule{0.75in}{0.01in} \\
    & Harvey Tananbaum & Date   \\
    & Director, CXC & \\
  \end{tabular}
  \end{center}

\end{changemargin}

\end{titlepage}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% update info
%%%
\pagenumbering{roman}\setcounter{page}{2}

%%%
%%% ##### update as necessary
%%%

\begin{center}
\begin{tabular}{|c|c|c|p{3.0in}|} \hline
\multicolumn{4}{|c|}{}\\[1mm]
\multicolumn{4}{|c|}{\bf Document and Change Control Log}\\[3mm]\hline
{\bf Date} & {\bf Version} & {\bf Section} & {\bf Status} \\ \hline
%
23 Dec 97
  &0.9
  &all
  &Initial Draft \\
%
3 Feb 98 
  &1.0
  &all
  &Revisions as per review by DS\\
%
18 Feb 98 
  &1.1
  &all
  &Revisions as per comments of AR, JCM, JHK, AD; generic FITS material
   removed and referenced to ASC FITS document.  Added FITS region
   specifications. Specified HRC columns to drop.\\
%
20 Feb 98
  &1.2
  &all
  &Minor edits, as per AR comments.  Major changes to REGION section:
  cast as BINTABLE extension instead of a file.  Added TNULL$i$
  keywords to grating columns as appropriate.\\
%
27 Apr 98
  &1.3
  &all
  &Various edits as per A.Alexov, W.McLaughlin comments.  Fixed inconsistency
  in tg\_part labels.  Added schematic figure showing region
  specification. Updated file-naming convention.\\
%
2 July 98
  &1.4
  &all
  &More miscellaneous edits; new unresolved issues (regions).  For
  release and signatures.
\\
%
22 Oct 98
  &1.4
  &all
  &More miscellaneous edits, as per markup by JdP, AA, WLM. Added
  change-bars. 
\\
%
09 Feb 99 %%% ccc
  &1.5
  &all
  & Changed ASC's to CXC's, except in FITS keywords and document references.  
  Updated applicable document referenced versions.
  Other misc edits: updated CONTENT as per ASC-FITS.
  Added source-table.
\\
%
27 May 99
  &1.6
  &all
  & 
  Updated applicable document referenced versions.
  Other misc edits: updated as per content.txt:\newline
  Change-Order \#'s: 0022, 0036, 0037, 0038, 0039, 0040.
\\\hline
%
\end{tabular}
\end{center}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Standard Explanation of changebars:------
\cbstart       %  V1.5 --> V1.6
Marginal ``changebars'', such as the one on this paragraph, indicate
sections which have been revised from the previous version of the
document (whether draft or official).
\cbend         %  V1.5 --> V1.6

A box in the margin (an example is somwhere near this sentence)
indicates a deletion.
\cbdelete[1em] %  V1.5 --> V1.6

Sometimes changebar-insertion get confused, and they will be on the
wrong margin or run diagonal through text; please note that these are
annoying formatting errors, and not strike-outs!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Unresolved Issues}

The following is a list of unresolved, un-reviewed, or un-implemented
items: 

\begin{enumerate}


%\item 980702: The ASCII region specification is being updated to be
%             more general (page~\pageref{pg:asciireg}).  Need a
%             reference for the generalized ASCII region.

% \item 980702: Region extension may be made a separate file.

% \item 980427: Need data-model keywords on region extension.
%  (page~\pageref{pg:fitsregion}) 
  
%\cbstart  %%%%%%% --> V1.4
%\item 981020: ``Missing'' data for {\tt TG\_R, TG\_D} (see
%  Page~\pageref{pg:NaN}) are currently stored as the value $0$.  They
%  should be the IEEE representation, $NaN$ (Not a Number), which is
%  the FITS convention for representation of missing or undefined real
%  values.  This should migrate in the next release, but it should
%  cause no problems since there is redundant information to indicate
%  that the coordinates are not really 0.0.  
%\cbend  %%%%%%% --> V1.4

%\cbstart  %%%%%%% --> V1.4
%\item 981021: FITS Region headers are not written as advertised (see
%  page~\ref{pg:regionext})  The L1.5 pipeline will patch them in, but
%  tools will not write the header components until the next release
%  (Jan98?).  
%\cbend  %%%%%%% --> V1.4

%\item 980427: Need full region header sample
%  (page~\pageref{pg:fitsregionsample}) 

%\item 990208: Need clarification on region coordinate systems
%  (page~\pageref{pg:regcoord}).

%\item 990209: uncertainty of 1 pixel in maximum of GDP coordinates.
%  (Page~\pageref{pg:gdpmax}).

%\item 990209: TYPE of radial coordinates in region need to be
%  specifed. (page~\pageref{pg:radialcoord}).

\item 990226 Some {\tt TNULL} values specified as $NaN$ are
  implemented as 0.0 ({\tt TG\_R, TG\_D, TG\_MLAM, TG\_LAM}; see
  p.~\pageref{pg:NaN}).  The zeroes should be unambiguous in
  conjunction with other parameters, but implemention will eventually
  change to $NaN$.

\end{enumerate}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\Note{Formatting NOTE:
%  Text formatted between horizontal rules (like this block) provide
%  some historical context regarding alternative choices considered, 
%  which may still be debated.
%}
%\Remark{Items boxed in the right margin (like this) are questions to
%be answered or TBD's to be replaced.}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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








%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% table of contents, list of tables
%%%

\clearpage
\tableofcontents
%\clearpage
\listoftables
\listoffigures

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

\pagenumbering{arabic}
\clearpage
\section{Introduction}

This document describes the interface to be employed in transferring
the products of grating (HETG, the High Energy Transmission Grating,
or LETG, the Low Energy Transmission Grating) obervations Standard
Data Processing from the CXC Level 1.5 processing pipeline to the CXC
Data Archive, according to the requirements stipulated in the ``ASC
Data System Requirements'' (Applicable Document~\ref{appdoc:se03}).
%


\subsection{Purpose}

TG (generically referring to HETG and LETG Transmission Grating
instruments) Level 1.5 processing, described in Applicable
Document~\ref{appdoc:se03}, consists of event processing of HRC or
ACIS Level 1 products (which are described in Applicable
Documents~\ref{appdoc:hrcicd} and~\ref{appdoc:acisicd}) to add
grating-specific coordinates and associated values. Level 1.5 denotes
an intermediate stage between Level 1 (primarily re-formatting and
coordinate transformations) and Level 2 (primarily source analysis),
since some minimal analysis is necessary on grating observations
before coordinate transformations can be done (e.g., source
detection).  This document describes the {\em additional} structure
and content of the resulting event files and of region and summary
files that are generated from Level 1 products during Level 1.5
processing.


\subsection{Scope}

This interface shall apply to all TG-specific data products that are
generated by CXC Level 1.5 pipelines and distributed to the CXC Data
Archive during the course of the CXO mission (see Applicable
Document~\ref{appdoc:se03} and the ``ASC Data System Software
Design,'' Applicable Document~\ref{appdoc:ds01}).

%\clearpage
%
\subsection{Applicable Documents}
The Applicable Documents required for background and detail on
grating Level 1.5 products are as follows:
\begin{enumerate}
%
%\item\label{appdoc:data-prod} 
%  AXAF Data Products Guide\newline
%  {\tt http://hea-www.harvard.edu/asclocal/sds/CDR2/dp.ps}
%%
\item\label{appdoc:coord}
%\cbstart  %%%%%%% --> V1.4
\cbstart       %  V1.5 --> V1.6
 ASC Coordinates: Rev 5.0\newline
%\cbend  %%%%%%% --> V1.4
 {\tt http://hea-www.harvard.edu/asclocal/sds/docs/jcmdocs/ps/SDS02.ps}
\cbend         %  V1.5 --> V1.6
%
\item\label{appdoc:se03}
 ASC AMO-2400 (SE03) \newline
 ASC Data System Requirements (ASC.302.93.0008)
%
\item\label{appdoc:ds01}
 ASC AMO-2401 (DS01) \newline
 ASC Data System Software Design (ASC.500.93.0006)
%
%\item\label{appdoc:fitsdef}
% NOST 100-1.1, Definition of the Flexible Image Transport System
%                    (FITS)\newline
%                    {\tt http://www.cv.nrao.edu/fits/}
%%
%\item\label{appdoc:fitsstd}
% HEASARC FITS Standards:\newline
%{\tt http://heasarc.gsfc.nasa.gov/docs/heasarc/ofwg/ofwg\_intro.html}
%%

%\cbstart  %%%%%%% --> V1.5
\item\label{appdoc:ascfits}
%\cbstart  %%%%%%% --> V1.4
%  ASC FITS File Designers' Guide (ASC-FITS-1.2)\newline
\cbstart       %  V1.5 --> V1.6
  ASC FITS File Designers' Guide (ASC-FITS-2.0.0)\newline
\cbend         %  V1.5 --> V1.6
%\cbend  %%%%%%% --> V1.4
  {\tt http://hea-www.harvard.edu/$\sim$arots/asc/fits/ascfits.ps}
%\cbend  %%%%%%% --> V1.5

%
%\cbstart  %%%%%%% --> V1.5
\item\label{appdoc:hrcicd} 
 HRC Data Products:\newline
\cbstart       %  V1.5 --> V1.6
 Level 1 to CXC Archive Interface Control Document (Rev.\ 1.6)\newline
% {\tt http://hea-www.harvard.edu/asclocal/sds/ICD/l1icd.ps.gz}
%\Remark{TBS: HRC ICD version}
 {\tt http://hea-www.harvard.edu/asclocal/icd/HRC\_Level1/hrcl1icd\_16.ps}
\cbend         %  V1.5 --> V1.6
%\cbend  %%%%%%% --> V1.5

%
\item\label{appdoc:acisicd}
\cbstart       %  V1.5 --> V1.6
 ACIS Data Products:\newline 
%\cbstart  %%%%%%% --> V1.4
    Level 1 to ASC Archive Interface Control Document (Rev.\ 1.9)\newline
%\cbend  %%%%%%% --> V1.4
 {\tt http://hea-www.harvard.edu/asclocal/icd/ACIS\_Level1/acis\_l1\_1.9.ps}
\cbend         %  V1.5 --> V1.6
%


\item\label{appdoc:ascfiles}
%\cbstart  %%%%%%% --> V1.5
  \cbstart       %  V1.5 --> V1.6
% FITS File Names for the AXAF Archive (version on 1999-01-26T18:20:00):\newline 
% {\tt http://hea-www.harvard.edu/$\sim$arots/asc/archive/files.html}
Guide to AXAF Data Products (content.txt; v 2.1), section 
``FITS File Naming Convention for the AXAF Archive''\newline
 {\tt http://hea-www.harvard.edu/$\sim$arots/asc/fits/content.txt}
\cbend         %  V1.5 --> V1.6
%\cbend  %%%%%%% --> V1.5
%

\item\label{appdoc:regfiles}
FITS REGION Binary Table Design (ASC-FITS-REGION-1.0)\newline
{\tt http://hea-www.harvard.edu/$\sim$arots/asc/fits/region.ps}
%

%\cbstart  %%%%%%% --> V1.5
\item\label{appdoc:ardicd}
Analysis Reference Data for: \newline
Exposure Maps and Grating Levels 1.5-2 Pipelines\newline
(Revision 1.2) \newline
{\tt http://hea-www.harvard.edu/asclocal/icd/ARD/Rev1.2/ARD\_ICD1.2.ps}
%\cbend  %%%%%%% --> V1.5

%
%\cbstart   %%%% ---> V.1.5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item\label{appdoc:detect}
Data Products Interface Document: Detect tools
(Revision 1.3 DRAFT) \newline
{\tt http://hea-www.harvard.edu/asclocal/icd/Detect/detecticd\_13.ps}
%\cbend   %%%% ---> V.1.5  %%%%%%%%%%%%%%%%%%%%%%%%%%%%

%
\end{enumerate}

% synopsis for editing purposes...
%
%   1 appdoc:data-prod AXAF Data Products Guide
%   2 appdoc:coord     AXAF Coordinate Systems
%   3 appdoc:se03      ASC AMO-2400 (SE03)
%   4 appdoc:ds01      ASC AMO-2401 (DS01)
%   5 appdoc:fitsdef   NOST 100-1.1, Definition of the FITS
%   6 appdoc:fitsstd   HEASARC FITS Standards:
%   7 appdoc:ascfits   ASC FITS Designers' Guide
%   8 appdoc:hrcicd    HRC Data Products Guide:
%   9 appdoc:acisicd   ACIS Data Products Guide:
%  10 appdoc:ascfiles  filename convention
%  11 appdoc:ardicd    analysis reference data


%\clearpage
%
\subsection{Functional Description}

\subsubsection{Data Content Summary}

TG data sets generated by the Level 1.5 processing pipeline shall
consist of data files conforming to the FITS format 
%
%(Applicable Document~\ref{appdoc:fitsdef}) 
%and further conforming to HEASARC
%standards (Applicable Document~\ref{appdoc:fitsstd}) and 
%
as described the ``ASC FITS File Designers' Guide'' (Applicable
Document~\ref{appdoc:ascfits}) and references therein.  These files
contain header keyword entries and binary table (BINTABLE) extensions.
Following rules outlined in the ASC FITS Guide,
all these files will contain a null primary header followed by a main
binary table (the ``principal HDU'') and auxiliary extensions
(``auxiliary HDU'').

Any other types of files will either be of types in common use (e.g.,
PostScript), or fully described here (e.g., ASCII region files of
IRAF/PROS). 


\subsubsection{Recipients and Utilization}

The primary recipients of TG Level 1.5 data products, via distribution
from the archive, are CXO observers, who will utilize these data
products for scientific data analysis. The CXC may also make use of
specific Level 1.5 data products for instrument calibration,
instrument and/or spacecraft monitoring and trends analysis, and
validation and verification of the Level 0, Level 1, and Level 1.5
software and of the data products themselves. Level 1.5 data products
will also be used in Level 2 (standard data analysis) pipelines, the
products of which will be used for all of the above purposes.

\subsubsection{Pertinent Relationships with Other Interfaces}

Changes to the definition of HRC or ACIS Level 1 data products, as
described in Applicable Documents~\ref{appdoc:hrcicd}
and~\ref{appdoc:acisicd}, may affect the Level 1.5 
data products described in the current document.

\subsection{Assumptions and Constraints}

For each TG science event run reported in the CXO telemetry stream,
Level 1.5 processing shall generate a set of product files as
described in Section~\ref{sec:labeling}.  The products depend upon
possibly time-dependent calibration data for coordinate
transformations and region definitions.

The natural subdivision of TG Level 1.5 processing is the Observation
Interval (ObI). Each ObI may span several TG science runs, which are
the atomic unit of the scientific instrument's telemetry.  TG data
will therefore be processed by ObI by the Level 1.5 pipeline.
The pipeline will accept a list of one or more ObIs and process each
independently. 


\subsection{Products Not Covered}

TG Level 1.5 products that are used for maintenance and diagnostic
purposes (those that are not supplied to the user for scientific data
analysis), or which are generic CXO Level 1.5 products (those parts
of the product which are common to ACIS and HRC Level 1 products), are
not currently included within the interface defined by this document.

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

%\clearpage
%
\section{Detailed Interface Specifications}

\subsection{Labeling and Identification}\label{sec:labeling}

The data files generated by the Level 1.5 processing pipeline shall be
assigned external names as defined by the following general convention,
(specified in ``FITS File Names for the AXAF Archive'', 
Document~\ref{appdoc:ascfiles}):
{\tt <i><s><t><v>\_[<f>\_]<c><l>[<sl>].<type>}
where the mnemonics are:

\begin{verse}
{\tt <i>}     instrument: ``acis'', ``hrci", ``hrcs'', \ldots\\
{\tt <s>}    data source: ``x'', ``f'', ``t'', ``b'', ``s'', ``u''\\
{\tt <t>}     TSTART (integer part): ``\#\#\#\#\#\#\#\#\#''\\
{\tt <v>}     processing run (version): ``N\#\#\#''\\
{\tt <f>}     optional discriminator (e.g., FEP Id)\\
{\tt <c>}     contents: ``evt'', ``prf'', ``hst'', ``src'', ``win'', ``bias'', \ldots\\
{\tt <l>}     processing level: single digit: ``0'', ``1'', ``2''\\
{\tt<sl>}    sublevel: single lower case letter; e.g., 1.5 is ``1a''\\
{\tt <type>}  superfluous: usually ``fits''\\
\end{verse}
%

%\cbstart  %%%%%%% --> V1.4
Relevant values for instrument ({\tt <i>}) are {\tt aciss} or {\tt hrcs};
%\cbend  %%%%%%% --> V1.4
for data source ({\tt <s>}) is ``f'' for flight. The appropriate
designation for the file contents, processing level, 
and sublevel ({\tt <c><l><sl>}) is {\tt \_evt1a}.  The spatial-spectral
extraction region mask is encoded as an extension in the Level 1.5
FITS file, but may optionally be provided as an ASCII file following
the above conventions, but with a {\tt <type>} equal to {\tt reg}.
%\cbstart  %%%%%%% --> V1.4 
({\tt <root>\_evt1a.reg} if ASCII, {\tt <root>\_reg1a.fits}
if a separate FITS file.)
%\cbend  %%%%%%% --> V1.4

%\cbstart  %%%%%%% --> V1.5

The source table which holds candidate zero-order centroid sky
positions is a separate FITS binary table whose name is of the form
{\tt <root>\_src1a.fits}. 

%\cbend  %%%%%%% --> V1.5

No additional non-instrument-specific data products are output by the TG
Level 1.5 processing pipeline.

%\cbdelete[1em]
%%\cbstart  %%%%%%% --> V1.4
%\Note{Note: The next version will specify a grating zero-order
%  detection source table.}
%\cbend  %%%%%%% --> V1.4



\subsection{Substructure Definition and Format}

The ``ASC FITS Designers' Guide'' (Applicable
Document~\ref{appdoc:ascfits}) defines and lists header components for
the primary header and for all binary table extensions.  Since grating
data are always obtained with either the HRC or ACIS detectors, file
content is also described in detail by the HRC and ACIS Level 1
Interface Control Documents (Applicable Documents~\ref{appdoc:hrcicd}
and ~\ref{appdoc:acisicd}).


%
\subsection{Source Table ({\tt *\_src1a.fits})}
%\cbstart   %%%% ---> V.1.5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\cbend  %%%%%%% --> V1.5

The grating spectral diffraction coordinates have their origin at the
%\cbstart   %%%% ---> V.1.5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
zero-order image centroid.  These are determined by a detection
algorithm and stored in a table.  The detection differs from the
imaging mode in that sources are detected in each observation interval
independently, positions compared, and merged into a single list with
a source-identifier assigned.  The basic structure of the
cell-detection output can be found in ``Data Products Interface
Document: Detect tools'' (Document~\ref{appdoc:detect}).  The only
addition for grating detection is a column called {\tt TG\_SRCID}, and
modification of the content descriptor keywords, which are as follows:

%\cbend   %%%% ---> V.1.5  %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{center}

%\cbstart   %%%% ---> V.1.5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{tabular}{|l|}\hline
  \verb@EXTNAME = 'SRCLIST  '           / Grating source list@\\
  \verb@CONTENT = 'TGSRC   '@\\
  \verb@HDUNAME = 'SRCLIST '@\\
  \verb@HDUCLASS= 'OGIP    '@\\
  \verb@HDUCLAS1= 'SRCLIST '@\\
%
  \verb@TTYPEn  = 'TG_SRCID'           / Source identifier@\\
  \verb@TFORMn  = '1I      '           / @\\
  \verb@TLMINn  = 0                    / @\\\hline
%
\end{tabular}

%\cbend  %%%%%%% --> V1.5

\end{center}
($n$ is to be replaced by the appropriate column number).
%


\subsection{Event Data Files ({\tt *\_evt1a.fits})}

\subsubsection{HDU Components}

%\cbstart   %%%% ---> V.1.5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
The following table describes the file structure by Header-Data Unit
number, type, extension name, content, and HDU classes.  An asterisk
(*) denotes the ASC principal HDU.  The HDUNAME is identical to
EXTNAME. 
%\cbend   %%%% ---> V.1.5  %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\medskip
{%\small
\noindent\begin{tabular}{llccp{0.825in}p{1.5in}}

%\cbstart   %%%% ---> V.1.5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
\sc hdu              %%%%%%%%%%%% This is the table prototype.
& {\sc type}
& {\sc extname}
& {\sc content}
& {\sc hduclass}
& Description\\\hline
%\cbend  %%%%%%% --> V1.5
%
%\cbstart  %%%%%%% --> V1.5
0
&\sc null
&\sc n/a
&\sc n/a
&\sc n/a
& {\sc null} primary.
\\
%\cbend  %%%%%%% --> V1.5
%
%\cbstart  %%%%%%% --> V1.5
1*
&\sc evt
&\sc events
&\sc tgevt1
\cbstart       %  V1.5 --> V1.6  --------------------
&\sc ogip \newline events \newline all \newline resolved 
\cbend         %  V1.5 --> V1.6  --------------------
& {\small Event table with diffraction coordinates and attributes.}
\\
%\cbend  %%%%%%% --> V1.5
%
%\cbstart  %%%%%%% --> V1.5
 2 
 &\sc 
 &\sc gti
 &\sc gti
 &\sc ogip\newline gti\newline all
 & Good-Time Intervals table
 \\
%\cbend  %%%%%%% --> V1.5
%
%\cbstart  %%%%%%% --> V1.5
 3 
 &\sc tgm
 &\sc region
 &\sc tgmask1
\cbstart       %  V1.5 --> V1.6
 &\sc asc\newline region\newline tg
\cbend         %  V1.5 --> V1.6
 & Sky region enclosing diffracted photons.
 \\\hline
%\cbend  %%%%%%% --> V1.5

%
\end{tabular}
} % close \small


\subsubsection{HDU Header Components}\label{sec:hdrcomps}

%\cbstart   %%%% ---> V.1.5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%

The ``ASC FITS Designers' Guide'' (Applicable Document
~\ref{appdoc:ascfits}) defines and lists general header components for
the primary header and for all extensions.  The components for
each HDU are:

%\cbend   %%%% ---> V.1.5  %%%%%%%%%%%%%%%%%%%%%%%%%%%%

%

\begin{enumerate}

  \setcounter{enumi}{-1}

%\cbstart   %%%% ---> V.1.5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\item Primary HDU: (Null)
  \begin{verse}
  Image mandatory\\
  Null configuration control\\
  Short timing\\
  Short observation\\
  \end{verse}

\item Principal table HDU: EVENTS
  \begin{verse}
  Bintable mandatory\\
  Table coordinates\\
  Full configuration control\\
  Full observation\\
  Full timing\\
  \end{verse}

%\cbend   %%%% ---> V.1.5  %%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\cbstart   %%%% ---> V.1.5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\item Auxiliary table HDU: GTI
  \begin{verse}
  Bintable mandatory\\
  Table coordinates\\
  Short configuration control\\
  Short timing\\
  Short observation\\
  \end{verse}

%\cbend   %%%% ---> V.1.5  %%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\cbstart   %%%% ---> V.1.5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item Auxiliary table HDU: REGION
  \begin{verse}
  Bintable mandatory\\
  Short configuration control\\
  table coordinate system\\
  Short timing\\
  Short observation\\
  \end{verse}
%\cbend   %%%% ---> V.1.5  %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{enumerate}


\subsubsection{Header/Trailer Description Details}

Table~\ref{tab:headerkeywords} shows the associated keywords that differ from
ACIS or HRC L1 files to specify the TG Level 1.5 products.
%
\begin{table}[h]
\begin{tabular}{|l|}\hline
\verb@GRATING = 'HETG    '            / HETG, LETG or NONE@\\
%\cbstart  %%%%%%% --> V1.5
\verb@CONTENT = 'TGEVT1   '           / @\\
\verb@HDUCLASS= 'OGIP     '           / @\\
%\cbend  %%%%%%% --> V1.5
\verb@HDUCLAS1= 'EVENTS  '            / @\\
\verb@HDUCLAS2= 'ALL     '            / @\\
\verb@HDUCLAS3= 'RESOLVED'            / CXC definition for TG coord. events@\\
\verb@HDUSPEC = 'Grating Data Products: Level 1.5 ICD, V1.1' / ICD ref. @\\
\verb@HDUDOC  = 'ASC-FITS-1.0: McDowell, Rots: ASC FITS Designers Guide' /@\\\hline
\end{tabular}
\caption[Level 1.5-specific Keywords]
{\em Level 1.5 - specific FITS Header Keywords}
\label{tab:headerkeywords}
\end{table}
%

The binary tables are further described by an extension header that
immediately follows the keyword header (since the primary data unit is
empty).   In the file definition tables that follow, only the associated
fields added to the Level 1 products by Level 1.5 processing or which
require additional explanation are defined.
%

\clearpage
\begin{table}[h]
\begin{center}
\begin{tabular}{|l|}\hline
%
\cbstart       %  V1.5 --> V1.6  --------------------
\verb@ACSYS1  = 'ASC-GDP-1.1'         / (optional) grating diffraction pixel@\\
\cbend         %  V1.5 --> V1.6  --------------------
\verb@TCTYP1  = 'GDPX       '         / Grating Diffraction Pixels@  \\
\verb@TCRVL1  =                0.0    / Nominal angle@ \\
\cbstart       %  V1.5 --> V1.6  --------------------
\verb@TCRPX1  =            32768.5    / Reference pixel@ \\
\verb@TCDLT1  = 4.2777777777e-5       / [degrees/pixel]@\\
\verb@TDBIN1  = 1                     / default [pixels/bin]@\\
\cbend         %  V1.5 --> V1.6  --------------------
\verb@TCUNI1  = 'deg'                 / Unit of GDP@\\\hline
%
\cbstart       %  V1.5 --> V1.6  --------------------
\verb@ACSYS2  = 'ASC-GDP-1.1'         / (optional) grating diffraction pixel@\\
\cbend         %  V1.5 --> V1.6  --------------------
\verb@TCTYP2  = 'GDPY       '         / Grating Diffraction Pixels@  \\
\verb@TCRVL2  =                0.0    / Nominal angle@ \\
\cbstart       %  V1.5 --> V1.6  --------------------
\verb@TCRPX2  =            16384.5    / Reference pixel@ \\
\verb@TCDLT2  = 4.27777777777e-5      / [degrees/pixel]@\\
\verb@TDBIN2  = 1                     / default [pixels/bin]@\\
\cbend         %  V1.5 --> V1.6  --------------------
\verb@TCUNI2  = 'deg'                 / Unit of GDP@\\\hline
%
\end{tabular}
\caption[Special Keywords for TG Columns with coordinate systems]
{\em Special Keywords for TG Columns with coordinate systems.
Grating coordinates can be specified either by angle, wavelength, or
pixel.  The pixel system requires a coordinate system. (Column numbers
and keyword values are representative and not to be taken as a literal requirement.)}
\label{tab:coordkeywords}
\end{center}
\end{table}
%

\subsubsection{Keywords Describing Calibration Data}

Resolution of HETGS (HETG + ACIS-S) photons into diffraction orders
requires application of the calibration from wavelength to
pulse-height (PI, for Pulse-Invariant signal), and information on the
distribution of the response.  To do this, a special table is read,
which was in turn generated from the CCD response matrices (RMFs), for
a given fractional enclosed energy.  Subsequent processing will
%\cbstart       %  V1.3 --> V1.4
require knowledge of this filter, so a keyword is stored in the event
extension header, as defined in Table~\ref{tab:rmfkeys}.
%\cbend         %  V1.3 --> V1.4

%\cbstart  %%%%%%% --> V1.4
%\cbdelete[1em] %  V1.3 --> V1.4
% In locating and classifying events, a spatial mask is used.  The size
% of the mask uses a table of the zero-order (spatial) size versus
% off-axis angle.  This table's name  is also recorded in the header.
%\cbend  %%%%%%% --> V1.4

%\cbstart  %%%%%%% --> V1.5
Specifications of calibration files can be found in the Analysis
Reference Data ICD (Document~\ref{appdoc:ardicd}).
%\cbend  %%%%%%% --> V1.5

%
\begin{table}[h]
\begin{center}
\begin{tabular}{|l|}\hline
\verb@COMMENT Order-sorting lookup tables: @\\
\verb@COMMENT   Tables of Energy_lo and Energy_hi vs E used for order-sorting, @\\ 
\verb@COMMENT   constructed for a specific fractional enclosed probability@\\
\verb@COMMENT Reference ICD for file definition is: ARD ICD v1.1.@\\
\verb@COMMENT @\\
%\cbdelete[1em] %  V1.3 --> V1.4
\verb@ACISDE='acis_95_V0.0.fits'           /E_lo, E_hi vs energy table vs CCD@\\\hline
%\verb@ACISDPIF='acis_fi_95_V0.0.fits'     /delta-PI vs energy table, FI CCD@\\
%\verb@ACISDPIB='acis_bi_95_V0.0.fits'     /delta-PI vs energy table, BI CCD@\\\hline
% \verb@COMMENT @\\
% \verb@COMMENT Mask PSF-size table: @\\
% \verb@COMMENT   Table of spatial PSF sigma vs off-axis angle used for @\\ 
% \verb@COMMENT   grating mask generation; @\\
% \verb@COMMENT Reference ICD for file definition is: ARD ICD v1.1.@\\
% \verb@COMMENT @\\
% \verb@PSFSIGMA='psf_sigma.fits'     /psf sigma table vs off-axis angle@\\ \hline
%
\end{tabular}
\caption[Calibration Keywords]{\em Special Keywords describing
  calibration files. The name is an example, and is determined at
  file-creation time by a parameter.} 
\label{tab:rmfkeys}
\end{center}
\end{table}

%\cbdelete[1em]  %%%%%%% --> V1.4 % got rid of BI table name; changed keyword on FI
%

%\cbstart  %%%%%%% --> V1.4
%\Note{Note: added PSF sigma table keyword. Deleted 2nd PI-limit-table;
%  changed PI-limit to Energy-limit.}
%\cbend  %%%%%%% --> V1.4


\subsubsection{Level 1.5 Column Descriptions}

During Level 1.5 processing, event coordinates undergo several
transformations.  Given a zero-order centroid in sky coordinates, a
region angle, and region width, events within each region are given
several new coordinates (for CXO coordinate system details, see
Applicable Document~\ref{appdoc:coord}).  Proper interpretation of the
spectrum requires consistent selection on several coordinates.  For
example, a $(TG\_R, TG\_D)$ image should only be made for a selection
on $TG\_SRCID$.
%
\begin{description}
%
\item[$TG\_SRCID$ ] is the source number, as output from the detection
  algorithm.  There is a limit of 10 sources per L1.5 event-list (but
  the actual IDs can be greater than 10, as determined by detect
  algorithms). 
  A $TG\_SRCID$ of 0 means background ---
  the photon has not been associated with a detected source.
  (The maximum of 10 was a compromise between implementation
  efficiency and a feasible maximum number of sources for a grating
  observation; 32-bits were allocated, with 3 bits per source.) 

%\cbstart  %%%%%%% --> V1.4
% \Note{981021 Note: The current implementation renumbers the source ID
%   from detect to be less than 11.  This will be fixed in the next
%   release, as per the paragraph above: source ID's will be identical
%   to the detect product, though limited to 10 or fewer sources.}
%\cbend  %%%%%%% --> V1.4

%
\item[$TG\_PART$ ] identifies the region of the spectrum of which the
  photon is a part.  This can have only specific values as follows:
  \begin{description}
  \item[0:  ] zero order;
  \item[1:  ] HEG part of the spectrum;
  \item[2:  ] MEG part;
  \item[3:  ] LETG photon;
  \item[4--7:  ] LETG/HESF parts of the spectrum;
  \item[99:  ] background.
  \end{description}
  
The region components are shown in a schematic image in
Figure~\ref{fig:regions}. 
\begin{figure}
%\cbstart  %%%%%%% --> V1.4
   \leavevmode{\scalebox{0.85}{\includegraphics{HETGS_parts.eps}}}
   \leavevmode{\scalebox{0.85}{\includegraphics{LETGS_parts.eps}}}
%\cbend  %%%%%%% --> V1.4

   \caption[HETG/LETG regions]{\it This is a schematic representation of
   the grating region showing the different parts of the spectrum.
   On the top is the HETG specification, and on the bottom, LETG.  For
   the LETG, the parts, 4--7 are optional, only being required if the
   HESF is in the beam.  Scales are arbitrary.  There has been a small
   rotation applied, to emphasize the fact that in sky coordinates,
   the spectrum can have any orientation. It is also possible that the
   zero-order be off the detector.  In this case, there will be no
   zero-order photons, but it's position and region are still required
   for the coordinate system origin.}
 \label{fig:regions}
 \end{figure}

%
\item[$TG\_R$: ] diffraction angle, parallel to the dispersion. For an
  on-axis source, the angle ranges from $-0.5$ to $+0.5$ degrees for
  HETGS, and about twice that for LETGS.  Offset-pointing can increase
  the range somewhat.

  For background or zero-order photons, $TG\_R$ is undefined, and
  stored as $NaN$.
\label{pg:NaN}
%
\item[$TG\_D$: ] cross-dispersion (spatial) angle.  For an on-axis
  source, this ranges from about $-0.1$ to $0.1$ degrees for HETGS or
  LETGS.  In practice, it is generally restricted to much less
  ($-0.001$ to $0.001$ degrees), though in backup modes (e.g.,
  HETG/HRC-I), it could conceivably be as large as 1 degree.

  For background or zero-order photons, $TG\_D$ is undefined, and
  stored as $NaN$.
%
\item[$TG\_MLAM$:  ] The diffraction order times the wavelength.  This
  can range from about $-200$\AA\ to $200$ \AA\ for on-axis data (LETGS).
  Off-axis pointing theoretically allows $-400$ to $400$ \AA\ (though with
  a severe penalty in resolution!)

  For background or zero-order photons, $TG\_MLAM$ is undefined, and
  stored as $NaN$.
%
\item[$TG\_M$: ] The diffraction order, if resolved.  This is a small
  integer, not likely to be of absolute value greater than 10 for
  HETG/ACIS-S.  The value, $99$,
  is used as a flag for ``unresolved'' or background photons.
  
  For LETGS photons (detector is HRC, $TG\_PART$ is 3-7), $TG\_M$ will
  be either $+1$ or $-1$ (since HRC cannot resolve the orders via a
  pulse-height).  

  The physically meaningful geometric limit set by the
  ACIS-S array with HETG is about $\pm62$.  This is for a 10 keV
  photon observed with the aim-point at one end of the ACIS-S array,
  and the detected photon at the other end.  It is not a likely
  scenario, but is used to define allowed physically conceivable data
  ranges. 
%
\item[$TG\_LAM$:  ] Photon wavelength, if resolved.
  
  For LETGS events ($TG\_PART$ is 3--7), $TG\_LAM$ will be set to the
  first-order wavelength at that position.

  For background or zero-order photons, $TG\_LAM$ is undefined, and
  stored as $NaN$.
%
\item[$TG\_SMAP$:  ] Source map.  This is a bitmap which matches photons
  to multiple sources.  This is partially redundant with $TG\_SRCID$,
  but is used in the case of multiple sources observed with HETG in
  which MEG and HEG parts from different sources cross.  Then, if
  photons cannot be resolved to a specific source (e.g., it could
  resolve to either of two sources), the bits will indicate which
  sources it could belong to.

  Ten bits are allocated for the up-to-ten sources in the region
  specification. The least significant bit is assigned to the first
  source in the region, the next-to-least significant to the next
  source, etc.  Note that the sources themselves may not be numbered
  sequentially from 1 to 10.  Thus, if the region specification has
  three sources enumerated 1, 3, and 4, then if a photon could not be
  resolved between source 1 and 4, the bitmap would have the binary
  value, 101. To continue the example, consider the following table:
\begin{center}
\begin{tabular}{ccc}
   source \#&      tg\_srcid&  smap bits\\
     1&                1&         001\\
     2&                3&         010\\
     3&                4&         100\\
\end{tabular}
\end{center}
The first three sources in the region have ID's of 1, 3, and 4.  Each
gets a bit of the $TG\_SMAP$ field.  Any photons which are un-resolved
between different sources (and are {\em not} background), have
%\cbstart  %%%%%%% --> V1.4
$TG\_SMAP$ set to the ``bitwise OR'' of the appropriate ``smap bits''.
%\cbend  %%%%%%% --> V1.4
%
\item[$GDPX$, $GDPY$] (optional) refer to coordinates in Grating
  Diffraction Pixels.  These are analogous to $TG\_R$ and $TG\_D$.
%\cbstart  %%%%%%% --> V1.4
  They are intermediate coordinates.
%\cbend  %%%%%%% --> V1.4

  For background or zero-order photons, $GDPX$ and $GDPY$ are
  undefined, and stored as $0$.
%
\end{description}
%

%
\clearpage

%\cbstart  %%%%%%% --> V1.5
\begin{table}[ht]\label{pg:NULLi}
\begin{center}

{\small
%\begin{tabular}{|c|c|c|c|p{0.5in}|c|c|p{1.in}|}
\begin{tabular}{|c|c|c|c|p{0.5in}|c|c|}
\hline
 & & & & & &\\
\sc  ttype
 & \sc tunit
 & \sc tform 
 & \sc tlmin
 & \sc tlmax
 & \sc tdbin
 & \sc tnull\\
% & \multicolumn{1}{|c|}{Comment}\\
 & & & & & &\\\hline
%
\sc  tg\_r
 & deg
 &\sc  1d $|$ 1e
 & $-2.0$
 & $2.0$
 & $1.593E-4$
 & $NaN^*$
% & Diffraction angle. \\\hline
 \\\hline
%
\sc  tg\_d
 & deg
 &\sc  1d $|$ 1e
 & $-2.0$
 & $2.0$
 & $1.593E-4$
 & $NaN^*$
% & Cross-dispersion angle \\\hline
 \\\hline
%
\sc  tg\_mlam
 & angstrom
 & \sc 1d $|$ 1e
 & $-400.0$
 & $400.0$
 & $2.0E-3$
 & $NaN^*$ 
% & m * lambda \\\hline
 \\\hline
%
\sc  tg\_m
 & 
 & \sc 1i
 & $-62$
 & $62$
 &\sc  n/a
 & 99
% & diffraction order (m) \\\hline
 \\\hline
%
\sc  tg\_lam
 & angstrom
 & \sc 1d $|$ 1e
 & 0.0 & 400.0
 & $2.0E-3$
 & $NaN^*$
% & wavelength (lambda) \\\hline
 \\\hline
%%
\sc  tg\_part
 & 
 & \sc 1i
 & 0
 & 99
 & \sc n/a
 & \sc n/a
% & component index (HEG, MEG, LEG, HESF regions) \\\hline
 \\\hline
%
\sc  tg\_smap
 & 
 & \sc 1i
 & 0
 & 32767
 & \sc n/a
 & \sc n/a
% & source map; source 1 to 10 flags, bits 1-10 (least to most significant) \\\hline
 \\\hline
%
\sc  tg\_srcid
 & 
 & \sc 1i
 & 0
\cbstart       %  V1.5 --> V1.6
 & \sc 32767
\cbend         %  V1.5 --> V1.6
 & \sc n/a
 & \sc n/a
% & source ID, index from detect table \\\hline
 \\\hline
%
\sc  gdpx
 & pixel
 & \sc 1j
 & 1
\cbstart       %  V1.5 --> V1.6  --------------------
 & 65535
\cbend         %  V1.5 --> V1.6  --------------------
 & 10
 & 0
% & grating diffraction pixel, dispersion direction\\\hline
\\\hline
%
\sc  gdpy
  & pixel
  &\sc  1j
  & 1
\cbstart       %  V1.5 --> V1.6  --------------------
  & 32767
\cbend         %  V1.5 --> V1.6  --------------------
  & 10
  & 0
%  & grating diffraction pixel, cross-dispersion  \\\hline
  \\\hline
\label{pg:gdpmax}
%
\ & \multicolumn{6}{|c|}{\ }\\
%
\sc ttype
  & \multicolumn{6}{|c|}{FITS Comment Field}\\\hline
%
\sc tg\_r
& \multicolumn{6}{|l|}{Diffraction angle, relative to zero-order centroid}\\\hline
%
\sc  tg\_d
 & \multicolumn{6}{|l|}{Cross-dispersion angle} \\\hline
%
\sc  tg\_mlam
 & \multicolumn{6}{|l|}{Order times wavelength (m * lambda)} \\\hline
%
\sc  tg\_m
 & \multicolumn{6}{|l|}{Diffraction order (m)} \\\hline
%
\sc  tg\_lam
 & \multicolumn{6}{|l|}{wavelength (lambda)} \\\hline
%
\sc  tg\_part
 & \multicolumn{6}{|l|}{component index (HEG, MEG, LEG, HESF regions)} \\\hline
%
\sc  tg\_smap
& \multicolumn{6}{|l|}{source map; flags for up to 10 sources} \\\hline
%
\sc  tg\_srcid
 & \multicolumn{6}{|l|}{source ID, index from detect table} \\\hline
%
\sc  gdpx
 & \multicolumn{6}{|l|}{grating diffraction pixel, dispersion direction}\\\hline
%
\sc  gdpy
  & \multicolumn{6}{|l|}{grating diffraction pixel, cross-dispersion direction}  \\\hline
%
\end{tabular}
%
}   % close \small
\caption[FITS Event Bintable Contents]{\em FITS Event Data File binary
  table contents (one entry per event). ``N/A'' means ``Not
  Applicable''.  Where the {\tt TFORM} is given as ``$1D|1E$'', the
  default is the first form (``$1D$'').  \newline $^*$ ``$NaN$'' is the IEEE
  standard for ``Not A Number''.  It is not actually indicated in the
  header, but implied as a missing or undefined by the FITS standard.
  }
\label{tab:evtcontents}
\end{center}
\end{table}%
%\cbend  %%%%%%% --> V1.5
%

\subsubsection{Columns Dropped from Level 1 Files}
%
There are some columns in Level 1 input files which are seldom used,
so it is not necessary to carry them into Level 1.5.  They will always
be available in Level 1 products.
%
\paragraph{HRC columns to omit:  } 

{\tt
\begin{verse}
 CRSV\\
 CRSU\\
 AMP\_SF\\
 AV1\\
 AV2\\
 AV3\\
 AU1\\
 AU2\\
 AU3\\
 RAWX\\
 RAWY\\
 SUMAMPS\\
\end{verse}
}   % close \tt

\paragraph{ACIS columns to omit:  } 
\label{pg:acispunt}

\ 

{\tt
\begin{tabular}{l}
  PHAS\\
\end{tabular}

} % close \tt
%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\clearpage
%
\subsection{Grating Spectral Region Definitions ({\tt REGION BINTABLE}
extension  or {\tt *.reg ASCII} file)} 

For each ObI, a regional mask is created for each observation, as
defined by the zero-order sky coordinates output from source detection
and width and angle parameters.  The source regions are designed to be
of generous dimensions, such that the L1.5 product is a superset of
photons likely to be selected for analysis, thus avoiding re-running
the L1.5 pipeline for alternate selection criteria.  It is defined in
sky $(X,Y)$  coordinates (typically a right-ascension and declination
tangent-plane system) and is used to filter the events for
transformation to grating diffraction coordinates.
%\cbstart  %%%%%%% --> V1.5
Two forms are supported: an ASCII descriptor, and a FITS
implementation. 
%\cbend  %%%%%%% --> V1.5



\subsubsection{{\tt *.reg} (ASCII) Region File Definition}\label{pg:asciireg}

%\cbdelete[1em]
% \Note{The {\tt ASCII} file is the current implementation and is
% included here until replaced by the {\tt FITS} implementation.  We
% will keep this specification, since the {\tt FITS} file will be a
% {\em T}ransport mechanism, and usage may remain {\tt ASCII}. }

The {\tt ASCII} region file follows the {\tt IRAF/PROS} Region File
definition (see the documentation avialible in IRAF/XRAY via ``help
regions'', for example),
with some pipeline directives added in comment fields.  The
coordinates are given as sky pixel values, whose coordinate system can
be obtained from the event-file's ({\tt *\_evt1.fits}) extension
header keywords for columns labeled {\tt X} and {\tt Y}.

%%% NOTE: ftool fsaoi will convert region file to ftools file, but:
%%% its output isn't a FITS file, it is case sensitive, the syntax
%%% isn't the same as the L1.5 pipe (``physical'' isn't recongnized,
%%% fsaoi wants something like ``BOX(3200,3200,119,5.00)'' vs
%%%                            ``rotbox 3200 3200 119 5.0d;''

%
%\Remark{980702 The ASCII region specification is being updated to be
%  more general.  It will have lines to specify the components for each
%  part. Reference: TBD.}

%
\begin{itemize}
%\cbstart  %%%%%%% --> V1.4
\item The first line of the {\tt *.reg} file contains a line
  of the format {\tt \#.GRATING mode} where mode is {\tt HETG, LETG, DRAKE,
    HEG,} or {\tt MEG}.  Note that the modes {\tt HEG} and {\tt MEG}
  are special, in that one cannot observe in flight with them
  separately; they are for special processing purposes of
  ground-calibration data, simulations, or specially filtered flight
  data.  
%
\item  The second line of the file contains a line of the format
  ``{\tt \#.SRC $n$}''  where $n$ is the current source ID.
%
\item Each line preceding a region should have a line of the
  format ``{\tt \#.COMPONENT n \# TG\_PART = n = mode}'' where $n$ is
  the grating part associated with that region section.  The grating
  parts are listed below.  Component is indentical with {\tt
  TG\_PART}.  

%\cbstart       %  V1.3 --> V1.4
The first half of the line ({\tt \#.COMPONENT n}) is required.
 The second half of the line ({\tt \# TG\_PART = n = mode}) is
 primarily for user documentation, but is  necessary for conversion 
into fits via the {\tt dmrega2fits} tool.
%\cbend         %  V1.3 --> V1.4
 
\item For any given source, a maximum of 8 distinct parts (neglecting
  background) exist. These parts are: zero order, heg arm, meg arm,
  letg, Drake 1, Drake 2, Drake 3, and Drake 4. For any given source,
  not all of these parts will be listed.
  
\item Relevant parts of a source are listed one per line. The ordering
  of the parts depends on the type of data The parts for each mode
  are, in region-file line order:

  \begin{tabular}{lcl}
%\cbstart       %  V1.3 --> V1.4
 Grating & TG\_PART & Mnemonic\\\hline
      HETG& 0   &Zero-order\\
          & 1   &HEG\\
          & 2   &MEG\\[1mm]
      LETG& 0   &Zero-order\\
          & 3   &LEG\\[1mm]
      DRAKE (HESF)&0   &Zero-order\\
           &3   &LEG\\
           &4   &Drake1\\
           &5   &Drake2\\
           &6   &Drake3\\
           &7   &Drake4\\[1mm]
      HEG& 0    &Zero-order\\
          & 1   &HEG\\[1mm]
      MEG& 0    &Zero-order\\
          & 2   &MEG\\[1mm]
%\cbend         %  V1.3 --> V1.4
      \end{tabular}

% I don't know what the next line means: (from anastasia)
%    \item All source parts are defined in physical coords

    \item  Parts that belong to a source are identified as follows:

            {\tt physical; <format> ;}

      where {\tt <format>} is any of the following:
      \begin{description}
        {\tt
        \item[BOX] xcenter ycenter xwidth yheight [angle]
        \item [CIRCLE] xcenter ycenter radius
        \item [ROTBOX] xcenter ycenter xwidth yheight angle
          }
      \end{description}

   
    \item abbreviations {\tt b, c,} or {\tt r} may also be used for
      {\tt BOX, CIRCLE,} and {\tt ROTBOX}, respectively.
      
    \item blank lines are ignored; they may be used to make the {\tt
        *.reg} more readable to users, but are not used by the code.

    \item  a separate source comment line (e.g.  {\tt \#.SRC 3}) must
      be supplied before  each source included in the region file. A
      region file may specify multiple sources.
 
    \item   {\tt ASCII} characters may be in upper or lowercase.
      
    \item  Lines beginning with ``{\tt \#.}'' are processed as
      instructions by Level 1.5 software. They are treated as normal
      comments by other region parsers.

    \item    Lines starting with a ``{\tt \#}'' and succeeded by
      any other characters  other than ``{\tt .}'' are considered
      comments. 
%\cbend  %%%%%%% --> V1.4

\end{itemize}
In {\em ALL} cases, the zero-order part is {\em required} even if the 
zero-order was off the detector, or deleted via
intentional detector modes prior to telemetry.)

\clearpage
\paragraph{Example --- A single HETG source, source ID of 1:}

\begin{center}
\begin{tabular}{|l|}\hline
%\cbstart  %%%%%%% --> V1.4
\verb@#.GRATING HETG@\\
\verb@#.SRC 1 @\\
\verb@#.COMPONENT 0  # TG_PART = 0 = gzo@\\
\verb@physical; circle 3200.1 3200.349 70;@\\
\verb@#.COMPONENT 1  # TG_PART = 1 = heg@\\
\verb@physical; rotbox 3200 3200 3300 119 -5.3d;@\\
\verb@#.COMPONENT 2  # TG_PART = 2 = meg@\\
\verb@physical; rotbox 3200 3200 3300 119 5.00d;@\\
%\cbend  %%%%%%% --> V1.4
\\ \hline
\end{tabular}
\end{center}



\paragraph{Example --- Two LETG sources, source IDs of 2 and 4:}

%\cbstart  %%%%%%% --> V1.4

\begin{center}
\begin{tabular}{|l|}\hline
\verb@#.GRATING LETG@\\
\verb@#.SRC 2@\\
\verb@#.COMPONENT 0  # TG_PART = 0 = gzo@\\
\verb@physical; c 2000.1, 2000.0249, 100;@\\
\verb@#.COMPONENT 1  # TG_PART = 3 = leg@\\
\verb@physical; box 2000, 2000 2000 140;@\\
\verb@    @\\
\verb@#.SRC 4@\\
\verb@#.COMPONENT 0  # TG_PART = 0 = gzo@\\
\verb@physical; c 4000, 4000, 100;@\\
\verb@#.COMPONENT 1  # TG_PART = 3 = leg@\\
\verb@physical; box 4000, 4000 3500 150;@\\\hline
\end{tabular}
\end{center}

%\cbend  %%%%%%% --> V1.4




%\clearpage
%
\subsubsection{FITS Region Extension Definition}\label{pg:regionext}

The generic definition of an ASC FITS region is given in the ``FITS
REGION Binary Table Design'' (Applicable
Document~\ref{appdoc:regfiles}.  The region HDU will be a single {\tt
  REGION} auxiliary extension, whose header is comprised of:
\begin{itemize}
\item a mandatory {\tt REGION}-content header,
\item table coordinate system and ranges, 
\item short configuration control,
\item short timing, and 
\item short observation information components.
\end{itemize}  
The components which differ
substantially from the event file's other extensions (events, GTI) are
the mandatory {\tt REGION} keywords, and the table coordinate system.
A region specification is in general specific to the ObI.

%\cbdelete[1em]
% \Note{
% \newline
% %\cbstart  %%%%%%% --> V1.4
% \newline
% Note: As of 981021, ASCDS Data-Model software does not write the
%   header components on the region files.  This will be patched in the
%   L1.5 pipelines, but needs to be added to the tools explicitly. (Next
%   revision, 1.5).
% \newline
% %\cbend  %%%%%%% --> V1.4
% }



The {\tt REGION} definition for Level 1.5 spectral mask are comprised
of components described
by a circle for zero-order and rotated boxes for diffracted
orders.  There are generally multiple components for each spectrum and
possibly multiple sources per observation.

\clearpage % to fix changebars...
%
\begin{table}[h]
\begin{center}
\begin{tabular}{|l|}\hline
  \verb@EXTNAME = 'REGION  '           / Region specification table@\\
%\cbstart   %%%% ---> V.1.5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \verb@HDUNAME = 'REGION  '@\\
  \verb@CONTENT = 'TGMASK1  '@\\
%\cbend   %%%% ---> V.1.5  %%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \verb@HDUCLASS= 'ASC     '@\\
  \verb@HDUCLAS1= 'REGION  '@\\
  \verb@HDUCLAS2= 'STANDARD'@\\
%
  \verb@MTYPE1  = 'pos     '@\\
  \verb@MFORM1  = 'X,Y     '@\\\hline
%
  \verb@TCTYP2  = 'RA---TAN'           / sky X WCS@\\
  \verb@TCRVL2  =                0.0   / Nominal angle@ \\
  \verb@TCRPX2  =            16384.5   / Reference pixel@ \\
  \verb@TCDLT2  = 1.59265544165e-5     / [degrees/pixel]@\\
  \verb@TDBIN2  = 10                   / default [pixels/bin]@\\
  \verb@TCUNI2  = 'deg'                / Unit of X@\\\hline
%
  \verb@TCTYP3  = 'DEC--TAN '          / Sky Y WCS@\\
  \verb@TCRVL3  =                0.0   / Nominal angle@ \\
  \verb@TCRPX3  =            16384.5   / Reference pixel@ \\
  \verb@TCDLT3  = 1.59265544165e-5     / [degrees/pixel]@\\
\cbstart       %  V1.5 --> V1.6  --------------------
  \verb@TDBIN3  = 10                   / default [pixels/bin]@\\
\cbend         %  V1.5 --> V1.6  --------------------
  \verb@TCUNI3  = 'deg'                / Unit of Y@\\\hline
%
\cbdelete[1em] %  V1.5 --> V1.6  --------------------
%\cbstart   %%%% ---> V.1.5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  \verb@TCTYP4  = '???--TAN  '          / Sky XY WCS - for a radius value@\\
%\label{pg:radialcoord}
%\cbend   %%%% ---> V.1.5  %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  \verb@TCDLT4  = 1.59265544165e-5     / [degrees/pixel]@\\
%  \verb@TDBIN4  = 10                   / default [pixels/bin]@\\
  \verb@TCUNI4  = 'deg'                / Unit of radius@\\\hline
%
\end{tabular}\label{pg:regcoord}
\end{center}
\caption[Special REGION File Keywords]{\em Special Keywords for grating {\tt REGION} FITS File.  region
  coordinates are specified in terms of sky $(X,Y)$, so that
  coordinate system must be specified.  (Column numbers and keyword
  values are representative and not to be taken as a literal
  requirement.)}
\label{tab:ltfkeywords}\label{pg:fitsregion}

\end{table}
%

%
\begin{table}[h]
\begin{center}
{\small
\begin{tabular}{|c|c|c|c|c|p{1.75in}|}\hline
 & & & & & \\
\sc ttype
 & \sc tunit
 & \sc tform 
 & \sc tlmin
 & \sc tlmax
 & \multicolumn{1}{|c|}{Comment} \\
 & & & & & \\\hline
%
 \sc shape
 & -
 & 16A
 & -
 & -
 & Shape of region: may be CIRCLE, ROTBOX, or BOX.\\\hline
%
 X
 & pixel
 & $12E$
 & 0.5
 & 65534.5
 & sky $X$ (RA) coordinate vector for SHAPE.\\\hline
%
 Y
 & pixel
 & $12E$
 & 0.5
 & 65534.5
 & sky $Y$ (Dec) coordinate vector for SHAPE.\\\hline
%
 R 
 & pixel
 & $12E$
 & 0
 & 65534.5
 & radius vector for SHAPE (sky units) \\\hline
%
 \sc rotang 
 & deg
 & $12E$
\cbstart       %  V1.5 --> V1.6  --------------------
 & -360
\cbend         %  V1.5 --> V1.6  --------------------
 & 360
 & Rotation angle for SHAPE, in degrees.\\\hline
%
 \sc component
 & -
 & I
 & 0
 & 7
 & Component number that SHAPE belongs to (default is 1). 
   Interpretation of this depends upon the GRATING column.
   (The component number is identical to TG\_PART.)\\\hline
%
% INCLUDE 
% & -
% & I
% & 0
% & 1
% & Inclusion (1; default) or exclusion (0). \\\hline
%%
\sc  source
 & -
 & I
\cbstart       %  V1.5 --> V1.6
 & 1
 & 32767
\cbend         %  V1.5 --> V1.6
 & Source number. \\\hline
%
\sc  grating
 & -
 & 16A
 & -
 & -
 & Applicable grating; one of: HETG, LETG, DRAKE, HEG, or MEG.\\\hline
%
\end{tabular}
}
\caption[REGION File Contents]{\em FITS grating region file binary table contents.}
\label{tab:ltfbintable}
\end{center}
\end{table}
%
%\cbdelete[1em]   %%%% ---> V.1.5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\cbstart  %%%%%%% --> V1.4
%\Note{Note: 981021 Deleted table items: {\tt INCLUDE, OBI}.
%  Superfluous, unsupported.} 
%\cbend  %%%%%%% --> V1.4

The conditional interpretation of the {\tt COMPONENT} upon {\tt
GRATING} value is shown in Table~\ref{tab:components}.
\begin{table}[hbt]
\begin{center}
\begin{tabular}{|cc|p{2.0in}|}\hline
%
GRATING &COMPONENT & Meaning \\\hline
%
HETG & 0& Zero-order\\
     & 1& HEG arm\\
     & 2& MEG arm\\\hline
LETG & 0& Zero-order\\
     & 3& LEG arm\\
     & 4& HESF (Drake Flat) region 1 (optional)\\
     & 5& HESF (Drake Flat) region 2 (optional)\\
     & 6& HESF (Drake Flat) region 3 (optional)\\
     & 7& HESF (Drake Flat) region 4 (optional)\\\hline
%
\end{tabular}
%
\caption[REGION Table Components]{\em Region table component
  interpretation. Zero-order regions are optional.  Grating is either
  HETG or LETG. If Grating is LETG, then HESF parts are also
  optional.}
\label{tab:components}
%
\end{center}
\end{table}
The interpretation of the coordinate vectors for grating region
shapes, as given in the FITS region specification (Applicable
Document~\ref{appdoc:regfiles}) is:
%
\begin{description}

  \item[{\tt CIRCLE:  }] First element of $X$, $Y$, $R$ vectors
  specifies center and radius.

  \item[{\tt ROTBOX:  }] First element of each $X$ and $Y$ vectors
  specify the center  of a rectangle.  The first
  element of {\tt ROTANG} specifies counter-clockwise rotation of the
  rectangle with respect to $X$ and $Y$ axes. The center of the rotation
  is the center of the rectangle (given by $X,Y$).

  Other elements of $X,Y$ are undefined.  The first two elements of
  $R$ specify the full-widths of $X$ and $Y$, respectively.
\end{description}
For the LETG, components 4--7 are optional (e.g., the source was not
imaged onto the HESF (Drake Flat)).

%


%\subsubsection{Example: Full Region Extension Header}

%The following is a sample header for a region describing a field with
%two HETG sources.   
%\label{pg:fitsregionsample}

%\Remark{TBS: Insert a sample region header here.}

\subsection{Volume, Size, and Frequency Estimates}

The columns added to an HRC or ACIS  Level 1 file in Level 1.5
processing add about 48 to 64 bytes per photon.  A 10-source HETG
region file extension is about 720 bytes.


%\section{Example Files}
%\label{pg:samples}

%\begin{verbatim}
%TBS: HETG/ACIS-S 2 src FITS events, region, summary
%     LETG/HRC_S 2 src
%     LETG/HESF TBD.
%\end{verbatim}




\end{document}



%%%%%%%%%%%%%%5 to to into Level 2 ICD by USG.




\clearpage
\subsection{Level 1.5 Summary File}

\label{pg:summary}

\Note{Note: Summary file definition very preliminary.
  
  Summary should be hardcopy (i.e., postscript) graphs, images, and
  tables.
  
  Graphs and images should also be written as GIF files (TBR), wrapped
  in HTML interface with ASCII tables and text.

  Postscript version (TBR) should be gzipped.

  Summary tables also provided as FITS bintables?
}

Since Level 1.5 processing has added columns to the data, but not yet
merged ObIs, binned events into images, light curves, or spectra, nor
performed any measurements of the data, Level 1.5 summary will consist
of a statistical summary and diagnostic observational parameters.

%
\subsubsection*{L1.5 processing summary parameters: } \# sources, source table,
  roll\_tolerance
%
\subsubsection*{Observational parameters:} elapsed time, total good time, roll range
%
\subsubsection*{Order summary: } 
\bigskip
   
\begin{tabular}{|rcc|}\hline
\multicolumn{3}{|c|}{Field Summary}\\\hline
           &           rate   &           counts\\\hline
Total:     &   \tt    0.0E-00 &    \tt      0.0E+00\\
Background:&  \tt     0.0E-00 &    \tt      0.0E+00\\\hline
\end{tabular}


\begin{picture}(420,740)
\put(-10,600){
\mbox{
\begin{tabular}{|ccc|}\hline
\multicolumn{3}{|c|}{Source Summary: HETG/ACIS-S}\\\hline
&              rate   &           counts\\\hline
Zero-order&     0.00& 0.00\\
$HEG+$ &     0.00& 0.00\\
$HEG-$ &     0.00& 0.00\\
$MEG+$ &     0.00& 0.00\\
$MEG-$ &     0.00& 0.00\\
$HEG+1 $ &     0.00& 0.00\\
$HEG-1 $ &     0.00& 0.00\\
$HEG+2 $ &     0.00& 0.00\\
$HEG-2 $ &     0.00& 0.00\\
$HEG+3 $ &     0.00& 0.00\\
$HEG-3 $ &     0.00& 0.00\\
$MEG+1 $ &     0.00& 0.00\\
$MEG-1 $ &     0.00& 0.00\\
$MEG+2 $ &     0.00& 0.00\\
$MEG-2 $ &     0.00& 0.00\\
$MEG+3 $ &     0.00& 0.00\\
$MEG-3 $ &     0.00& 0.00\\\hline
\end{tabular}
}
}
\put(200,680){
\mbox{
\begin{tabular}{|ccc|}\hline
\multicolumn{3}{|c|}{Source Summary: LETG/HRC-S}\\\hline
&              rate   &           counts\\\hline
Zero-order&     0.00& 0.00\\
$LEG+ $ &     0.00& 0.00\\
$LEG- $ &     0.00& 0.00\\\hline
$HESF+$ &     0.00& 0.00\\
$HESF-$ &     0.00& 0.00\\\hline
\end{tabular}
}
}
\put(-10,400){
\mbox{
\begin{tabular}{|ccc|}\hline
\multicolumn{3}{|c|}{Source Summary: HETG/HRC-I}\\\hline
&              rate   &           counts\\\hline
Zero-order&     0.00& 0.00\\
$HEG+ $ &     0.00& 0.00\\
$HEG- $ &     0.00& 0.00\\
$MEG+$ &     0.00& 0.00\\
$MEG-$ &     0.00& 0.00\\\hline
\end{tabular}
}
}
\put(200,530){
\mbox{
\begin{tabular}{|ccc|}\hline
\multicolumn{3}{|c|}{Source Summary: LETG/ACIS-S}\\\hline
&              rate   &           counts\\\hline
Zero-order&     0.00& 0.00\\
$LEG+$ &     0.00& 0.00\\
$LEG-$ &     0.00& 0.00\\
$LEG+1 $ &     0.00& 0.00\\
$LEG-1 $ &     0.00& 0.00\\
$LEG+2 $ &     0.00& 0.00\\
$LEG-2 $ &     0.00& 0.00\\
$LEG+3 $ &     0.00& 0.00\\
$LEG-3 $ &     0.00& 0.00\\\hline
\end{tabular}
}
}
\end{picture}






