% Time-stamp: <98/07/20 10:47:23 dph>
% MIT Directory: ~dph/h1/ASC/TG/Flight/Development/L1.5_devel/CC_Mode
% CfA Directory: /dev/null
% File: cc_mode.tex
% Author: D. Huenemoerder
% Original version: 980714
%
% (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)
%====================================================================
% {\LARGE\bf Grating Tool Specifications}
% {\LARGE\bf Level 1.5:}
% {\LARGE\bf ACIS Continous-Clocking Mode Processing}
\documentclass[twoside]{article}
\usepackage[dvips]{graphics}
\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.3in
\evensidemargin=1.3in
\marginparwidth 2.0in %% adjust size of margin to
\marginparsep 0.2in % give room for remarks
}
\newcommand{\Remark}[1]{\marginpar
{\fbox{\parbox{1.7in}{\raggedright\scriptsize#1}}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \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}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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 1.0---20 July 1998 %
}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Skinny
\Header{L1.5 Tool Spec: ACIS CC-mode Processing /}{\Revision}
\begin{document}
% \putstring{x}{y}{angle}{scale}{gray}{string}
% gray: 0=black, 1=white
\putstring{70}{40}{0}{10}{0.0}{http://space.mit.edu/ASC/docs/cc_mode.ps.gz}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% title stuff, no need to change anything
%%%
%\begin{titlepage}
\begin{changemargin}{-1in}{-1in}
\begin{center}
\fbox{\vbox{
{
\vspace*{0.1in}
\huge\bf AXAF Science Center}
\leavevmode{\scalebox{0.17}{\includegraphics{asc_logo.eps}}}
\vspace*{-0.14in}
\hrule
\vspace*{0.1in}
{\LARGE\bf Grating Tool Specifications}
\vspace*{0.1in}
{\LARGE\bf Level 1.5:}
\vspace*{0.1in}
{\LARGE\bf ACIS Continous-Clocking Mode Processing}
\vspace*{0.1in}
{\Large\bf David Huenemoerder}
\vspace*{0.1in}
({\tt http://space.mit.edu/ASC/docs/TBD})
\vspace*{0.1in}
\Revision
}}
\end{center}
\end{changemargin}
%\end{titlepage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% update info
%%%
%\pagenumbering{roman}\setcounter{page}{2}
%%%
%%% ##### update as necessary
%%%
\section{Introduction}
\thispagestyle{empty}
This memo is specifies how data taken with ACIS-S in continous-clocking
(CC) mode and a grating (nominally HETG, but alternatively LETG) are
to be processed into diffraction coordinates and diffraction orders,
as described in the Grating Level 1.5 ICD\footnote{ ``Grating Data
Products: Level 1.5 to ASC Archive Interface Control Document'',
{\tt http://space.mit.edu/ASC/docs/ICD\_L1.5.ps.gz}}, and is
supplemental to that document.
%
When in CC-mode, the events' locations are only known along one axis
-- the serial read axis ({\tt CHIPX}, which projects parallel to the
AXAF $y$-coordinate for ACIS-S). In the other dimension, we only know
the location to within the size of the CCD. Hence, we can no longer
{\em spatially} discriminate high-energy grating (HEG) from
medium-energy grating (MEG) photons (or cross-dispersed photons, if
LETG). However, we can still (hopefully) discriminate most MEG
odd-order photons via their ADU (Analog-Digital Unit, also
colloquially know as ``pulse-height amplitude''--- PHA, or
``pulse-invariant amplitude'' --- PI).
Due to the nearly factor-of-two ratio in MEG to HEG periods, the HEG
orders fall on even MEG orders in ADU, and have the same wavelength
and diffraction angle as MEG photons at the same position (to within
that same ratio). By design, the MEG even orders are weak (though not
negligible), so the HEG orders will typically dominate. This is a
mildly simplified view, since there is a ``beat frequency'' in
odd:even order efficiency and a distribution in grating parameters.
There is also a possible asymmetry in the grating clocking-angles
relative to the CCD axis. The relative efficiencies will be handled
in the exposure-map, which will combine grating efficiencies. Any
rotational misalignments will result in a small degradation in
resolution, but this is proportional to the cosine of the misalignment
and so is a second-order affect.
%
\Note{Issue: Preliminary XRCF results show a long, high count-rate,
low ADU tail which may require modeling the MEG+HEG distribution,
rather than integrating under it. The flux calibration of the orders
will be dealt with elsewhere. }
%
%
%\clearpage
The general procedure is similar to non-CC-mode Level 1.5:
\begin{enumerate}
\item detect zero-order;
\item determine zero-order centroid;
\item specify a zero-order region;
\item specify a diffracted order region;
\item determine event angular diffraction from zero-order, referencing
each event's chip coordinates to the zero-order-centroid in chip
coordinates (at the same time; an inverse, one-dimensional aspect
transformation is required)
\item resolve the orders, using the event ADU (PHA), diffraction
angle, and CCD response.
\end{enumerate}
\subsection{External Requirements}
The standard aspect solution will correct events to the proper
position along the projection of the chip read-row (AXAF-$y$ for
ACIS-S), but they will be smeared in the perpendicular direction. I
will refer to the coordinates along and across this direction as
$(\cal Y, Z)$, since they are effectively the projections of the AXAF
$(y,z)$ focal-plane coordinates onto the sky. The marginal
distribution in $\cal Y$ (histogram of $\cal Y)$ will give us the
counts histogram. I will assume that this form of the aspect solution
exists; it can be achieved through a rotation of coordinates by the mean
roll. Any significant roll variations during the observation will
smear the PSF somewhat, but roll is expected to be small.
\subsection{Complications}
\paragraph{Zero-order blocking: }
If CC-mode is being used, it generally means that the source is
bright. If the source is very bright, it is likely that the
zero-order has been deleted from telemetry via ACIS back-end-processor
exclusion windows. Hence, we will need some additional logic to
determine a zero-order centroid.
\paragraph{Grating 1D Coordinate Transformations: }
The current transformation from chip position to diffraction
coordinates requires {\tt CHIPX} and {\tt CHIPY} coordinate pairs for
both zero-order and the diffracted photon. We can uniquely specify a
diffraction angle from:
\begin{itemize}
\item an assumed randomized {\tt TG\_D} distribution ($TG\_D=0.0$ is
a simple and reasonable assumption);
\item an assumed zero-order {\tt CHIPY} (such as that of the nominal
source sky coordinate, transformed to chip coodinates using the aspect
solution);
\item a derived zero-order {\tt CHIPX} centroid;
\item the observed diffracted photon coordinate, {\tt CHIPX}.
\end{itemize}
%
Such a transformation will have to be added to {\tt pixlib}. A
reasonable approximation will be to derive a zero-order centroid from
the {\it a priori} known source sky coordinate and the aspect
solution, $\cal Z_\mathrm{zo}$ (AXAF-$z$ is nominally parallel to {\tt
CHIPY} for ACIS-S), and that the diffracted photon is at
%
$$\cal Z = Z_\mathrm{zo} + (Y - Y_\mathrm{zo}) \tan\alpha.$$
%
The grating clocking angle is $\alpha$, and the zero-order-centroid is
at $(\cal Y_\mathrm{zo}, Z_\mathrm{zo})$. This approximation ignores the
tiling of the Rowland circle by flat CCDs, but the deviation from the
Rowland circle is small, and the diffraction angle is invariant to
translation in {\tt CHIPY}. The transformation from ({\tt CHIPX,
CHIPID}) to AXAF-$y$ is necessary to account for CCD gaps. This
approximation is equivalent to saying that
%
$$ tg\_r = {\cal (Y - Y_\mathrm{zo})} / \cos{\alpha}.$$
\paragraph{Multiple Sources: }
If an observation is in CC-mode, it is probably a good assumption that
one source dominates. We will not attempt to process multiple
sources. This must be left to interactive user analysis. A second
source's zero-order will have to be identified interactively. Given
its location the remaining Level 1.5 tools can be run. Though the
diffracted spectrum cannot be isolated spatially, some photons may
have uniquely determined ADU (PHA) for the zero-order position.
%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%
%
%
\clearpage
\section*{Document and Change Control Log}
\begin{center}
\begin{tabular}{cccp{3.0in}}
%\multicolumn{4}{l}{\bf Document and Change Control Log}\\[3mm]
{\bf Date} & {\bf Version} & {\bf Section} & {\bf Status}\\ [3mm]
%
20 July 1998&
1.0&
all&
Initial version \\[3mm]
%
%
& % date
& % version
& % sections
\\[3mm]
%
\end{tabular}
\end{center}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bigskip
\section*{Unresolved Issues}
The following is a list of unresolved, un-reviewed, or un-implemented
items:
\begin{enumerate}
\item 980720: Pixlib coord transformations for grating in CC-mode need
to be specified.
\end{enumerate}
%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%
%
%
%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%
%
\clearpage
\section{Detailed Specifications}
%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%
%
\subsection{Zero-order Detection and Centroid}
%%%%%%%%%%%%%%%%%%%%%%%
%
\subsubsection{Zero-Order Un-blocked Case}
\begin{description}
\item[Inputs]\
\begin{enumerate}
\item ACIS Level 1 event-list (CC-mode)
\item aspect solution (or aspect offsets)
\end{enumerate}
\item[Outputs]\
\begin{enumerate}
\item $\cal Y_\mathrm{zo}$: $\cal Y$ coordinate of the zero-order
centroid.
\item $\cal Z_\mathrm{zo}$: nominal $\cal Z$ coordinate of the zero-order
centroid.
\item Zero-order region (limits on $\cal Y$).
\item Diffracted-order region (limits on $\cal Y$).
\end{enumerate}
\item[Processing]\
\begin{enumerate}
\item Read the source position from the event-file
header: ({\tt RA\_NOM, DEC\_NOM}).
\item Convert this position to $\cal Y_\mathrm{zo},Z_\mathrm{zo}$.
$\cal Y_\mathrm{zo}$ is the first estimate for the observed
component of the zero-order position, and $\cal Z_\mathrm{zo}$ is
a predicted coordinate. Determine the {\tt CHIPID} at these
coordinates. Determine the off-axis angle ($\theta$) of these
coordinates. Calculate the expected zero-order radius, $\sigma$
for this $\theta$ (same as for non-CC-mode).
\item Select events from the {\tt CHIPID} determined in the previous
step, and bin the $\cal Y$ column into a 1D histogram.
%
\Remark{TBD: FITS name of $\cal Y$ column.}
%
\item Find the peak counts in the histogram within a couple times the
predicted zero-order radius of ${\cal Y_\mathrm{zo}}$.
\item Given the peak, find the centroid within the zero-order radius,
and replace $\cal Y_\mathrm{zo}$ with this value.
\item Detemrine the range in {\cal Y} to specify the diffracted
order region (which will be adjusted to accomodate the length of
the detector for the value of $\cal Y_\mathrm{zo}$).
\end{enumerate}
\end{description}
%%%%%%%%%%%%%%%%%%%%%%%
%
\clearpage
\subsubsection{Zero-Order Blocked Case}
In this case, zero-order has been deleted from the data before
telemetry. We will proceed as above in predicting the position.
Then we will do a cross-correlation of the left and right orders,
since the spectral features on each side will be similar (not
identical, due to the hybrid array and differing efficiencies). The
peak of the cross-correlation will be the offset between the two sides.
The guess minus half the offset is then the desired value of ${\cal
Y_\mathrm{zo}}$.
\begin{description}
\item[Inputs]\
\begin{enumerate}
\item Level 1 event-list
\item aspect solution (or aspect offsets)
\end{enumerate}
\item[Outputs]\
\begin{enumerate}
\item $\cal Y_\mathrm{zo}$: $\cal Y$ coordinate of the zero-order
centroid.
\item $\cal Z_\mathrm{zo}$: nominal $\cal Z$ coordinate of the zero-order
centroid.
\item Zero-order region (limits on $\cal Y$).
\item Diffracted-order region (limits on $\cal Y$).
\end{enumerate}
\item[Processing]\
\begin{enumerate}
\item Read the source position from the event-file
header: ({\tt RA\_NOM, DEC\_NOM}).
\item Convert this position to $\cal Y_\mathrm{zo},Z_\mathrm{zo}$.
$\cal Y_\mathrm{zo}$ is the estimate for the obseved zero-order position.
Determine the off-axis angle ($\theta$) of these coordinates.
Calculate the expected zero-order radius, $\sigma$ for this
$\theta$ (same as for non-CC-mode).
\item Bin the $\cal Y$ column into a 1D histogram.
\Remark{TBD: FITS name of $\cal Y$ column.}%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item Break the counts histogram at the guess, $\cal Y_\mathrm{zo}$,
into two arrays, left (lower values) and right (higher values).
Reverse the order of the left side.
\item Cross-correlate the two arrays. (Note: cross-correlation is
sensitive to edge-effects. Arrays are typically prepared by
subtracting the mean and applying a cosine-bell filter to the
edges; chip gaps may also produce a strong correlation to be
ignored.)
\item Find the peak of the cross-correlation function, and its
centroid. From the centroid, calculate the offset in the sense of
``how far do I shift the right side to match the left'' and call
this $\Delta\cal Y$. The desired zero-order centroid is then
%
$$ {\cal Y}_\mathrm{zo} \rightarrow {\cal Y}_\mathrm{zo} -
\Delta{\cal Y}/2 $$
\end{enumerate}
\end{description}
%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%
%
\clearpage
\subsection{Resolve Events: Diffraction Coordinates, Order Sorting}
\begin{description}
\item[Inputs]\
\begin{enumerate}
\item Level 1 event-list
\item Order regions (zero-order centroid, $(\cal Y_\mathrm{zo},
Z_\mathrm{zo})$, and diffracted order range)
\item aspect solution (or aspect offsets)
\item CCD PI limit table (for CC-mode)
\end{enumerate}
\item[Outputs]\
\begin{enumerate}
\item event list, with diffraction coordinates, order columns
\end{enumerate}
\item[Processing]\
%
\begin{enumerate}%
\item For each non-zero-order event, transform the zero-order
centroid from $\cal Y_\mathrm{zo}, Z_\mathrm{zo}$ to chip
coordinates, {\tt CHIPX, CHIPY, CHIPID}, at the event time using
the aspect solution (or aspect offsets).
%
\Remark{This is a new requirement on {\tt pixlib}; details TBD.}
%
\item Transform the event {\tt CHIPX, CHIPID} to MEG diffraction
angle, {\tt TG\_R}, assuming {\tt TG\_D$=0$}, using the zero-order
chip coordinate (Note: the $\cal Z$-coordinate has been {\em
assumed}.) Assign $m\lambda$ ({\tt TG\_MLAM}) for this angle,
as if MEG. Assign {\tt TG\_D$=0$}. Assign {\tt TG\_PART} to MEG.
%
\Remark{This transformation is a new requirement on {\tt pixlib},
details TBD.}
%
\item Determine the diffraction order {\tt TG\_M}, using this {\tt
TG\_R}, the event ADU (PI), and the CCD-PI-limit table, as if
MEG.
\item If {\tt TG\_M} is even, {\em assume} it is actually an HEG
photon. Change {\tt TG\_PART} to HEG. Repeat the prior
coordinate transformations, but now for HEG: Transform the event
{\tt CHIPX, CHIPID} to HEG diffraction angle, {\tt TG\_R},
assuming {\tt TG\_D$=0$}, using the zero-order chip coordinate.
Assign $m\lambda$ ({\tt TG\_MLAM}) for this angle, as if HEG.
Assign {\tt TG\_D$=0$}.
%
\end{enumerate}
%
\end{description}
\end{document}