%+
% Name:
% memo_instgeom_1.0.tex
%
% Usage:
%
% Description:
%
% Input:
%
% Output:
%
% Notes:
%
% History:
% 25 May 05, created (v1.0), Glenn E. Allen
%-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 1. Declarations
\documentclass{article}
\usepackage{cxo-memo-logo}
\usepackage[dvips]{graphics}
\usepackage{gea}
\usepackage{psfig}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 2. Header
\memobasic{
Jonathan McDowell, SDS Group Leader }{
Glenn E.\ Allen, SDS ACIS Scientist }{
ACIS Instrument Geometry }{
1.0 }{
http://space.mit.edu/CXC/docs/docs.html\#instgeom }{
/nfs/cxc/h2/gea/sds/docs/notes/check\_instgeom/memo\_instgeom\_1.0.tex }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 3. Introduction
\section{ Introduction }
\label{intr}
I tested the accuracy of the computation of the ACIS sky coordinates by
writing some independent coordinate transformation functions. One of these
functions computes the coordinates DETX and DETY using, in part, the
coordinates CHIPX and CHIPY and the information in HDU 3 (of 0--7) of an
instrument geometry file (\eg\ telD1999-07-23geomN0005.fits). This HDU
contains a table of the $x$, $y$ and $z$ LSI coordinates for each corner of
each CCD.
The coordinate transformations I use are based on the assumption that an
ACIS CCD is a square. As described in this memo, the LSI coordinates of the
ACIS CCDs in the CALDB instrument geometry files do not define
two-dimensional square detectors, but the differences between the LSI
coordinates and ideal squares are small. The inaccuracies in the CALDB data
should not affect the computation of the detector (and, hence, sky)
coordinates by more than about 0.04~pixel.
\section{ Tests}
\label{test}
I compared the coordinates for the lower left-hand (LL), upper left-hand
(UL), upper right-hand (UR) and lower right-hand (LR) corners of each CCD
with one another to determine whether
%
\begin{enumerate}
\item
The four corner points $P_{1}$, {\ldots}, $P_{4}$ are coplanar,
\item
The lengths of each of the four sides ($l_{1}$, {\ldots}, $l_{4}$) are
identical to the calibrated length, and
\item
The angles between each pair of adjacent sides ($\theta_{1}$, {\ldots},
$\theta_{4}$) are $90^{\circ}$.
\end{enumerate}
%
Figure~\ref{fig_diagram} shows a diagram of an ACIS CCD on which the points
$P_{i}$, lengths $l_{i}$ and angles $\theta_{i}$ are labeled. The CHIPX and
CHIPY coordinates associated with each vertex are also depicted. Since
these coordinates apply to the outer edges of the CCD, the coordinates of
the center of each pixel are whole numbers in the range from 1 to 1024.
\begin{figure}
\centerline{\hbox{\psfig{file=check_instgeom_fig.eps,width=4.0in}}}
\caption{
% \small \sl
%
A diagram of an ACIS CCD. The coordinates (CHIPX,CHIPY) and the
designation ``LL'' (lower left-hand), ``UL'' (upper left-hand), ``UR''
(upper right-hand) or ``LR'' (lower right-hand) are indicated for the
four vertices $P_{1}, {\ldots}, P_{4}$. The lengths of sides 1,
{\ldots}, 4 are labeled $l_{1}, {\ldots}, l_{4}$, respectively. The
angles between adjacent sides are labeled $\theta_{1}, {\ldots},
\theta_{4}$.
%
\label{fig_diagram}}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 4. Results
\section{ Results }
\subsection{ Coplanarity }
The equation of plane through the point $\bf x_{0}$ with a unit normal
vector $\bf n$ is
%
\begin{equation}
{\bf n} \cdot \left( {\bf x} - {\bf x_{0}} \right) = 0.
\label{eqn_plane}
\end{equation}
%
To determine if the four corners of a CCD are coplanar:
%
\begin{enumerate}
\item
Three of the four corners are used to define a plane,
\item
The unit normal vector ${\bf n}$ for this plane is computed using the
coordinates of these three points, and
\item
Equation~\ref{eqn_plane} is used to compute the distance between the
coordinates of the fourth corner and the plane.
\end{enumerate}
%
These three steps were performed for each one of the four possible
combinations of three corners. The results of the test are shown in
Figure~\ref{fig_coplanar}. No corner differs from coplanarity by more than
about 1.0~$\mu$m (0.04 pixel).
\begin{figure}
\centerline{\hbox{\psfig{file=memo_instgeom_fig1.ps,angle=-90,width=5.29in}}}
\centerline{\hbox{\psfig{file=memo_instgeom_fig2.ps,angle=-90,width=5.29in}}}
\caption{
% \small \sl
%
The distance of each corner ($P_{1}$, {\ldots}, $P_{4}$) of a CCD from a
plane defined by the other three corners of the CCD. The upper plot is
for the LSI coordinates in the CALDB file telD1999-07-23geomN0005.fits.
The lower plot is for telD1999-07-23geomN0002.fits. The dotted lines
indicate a difference of 0.1~pixel. The results are the same for these
two files: no corner differs from coplanarity by more than about
1.0~$\mu$m (0.04 pixel).
%
\label{fig_coplanar}}
\end{figure}
\subsection{ Side lengths }
The results for the computation of the lengths $l$ of each side of each CCD
are shown in Figure~\ref{fig_length}. The plots depict the difference
between the computed and calibrated lengths. The calibrated lengths (\ie\
the values of the keywords XSCALE and YSCALE in HDU 3 of the CALDB file) are
included as part of the y-axis label. No CCD has a side whose length
differs from the calibrated length by more than about 1.7~$\mu$m (0.07
pixel).
\begin{figure}
\centerline{\hbox{\psfig{file=memo_instgeom_fig3.ps,angle=-90,width=5.40in}}}
\centerline{\hbox{\psfig{file=memo_instgeom_fig4.ps,angle=-90,width=5.40in}}}
\caption{
% \small \sl
%
The difference between the length of each side of a CCD ($l_{1}$,
{\ldots}, $l_{4}$) and the calibrated length. The upper plot is for the
LSI coordinates in the CALDB file telD1999-07-23geomN0005.fits. The
lower plot is for telD1999-07-23geomN0002.fits. The dotted lines
indicate a difference of 0.1~pixel. No CCD has a side whose length
differs from the calibrated length by more than about 1.7~$\mu$m (0.07
pixel).
%
\label{fig_length}}
\end{figure}
\subsection{ Angles }
The results for the computation of the angles $\theta$ between each pair of
adjacent sides are shown in Figure~\ref{fig_angle}. No CCD has a corner
whose angle differs from a right angle by more than about $0.0023^{\circ}$
($4 \times 10^{-5}$~rad).
\begin{figure}
\centerline{\hbox{\psfig{file=memo_instgeom_fig5.ps,angle=-90,width=5.29in}}}
\centerline{\hbox{\psfig{file=memo_instgeom_fig6.ps,angle=-90,width=5.29in}}}
\caption{
% \small \sl
%
The differences between the computed values for the angles $\theta_{1}$,
{\ldots}, $\theta_{4}$ and the expected value of $90^{\circ}$. The upper
plot is for the LSI coordinates in the CALDB file
telD1999-07-23geomN0005.fits. The lower plot is for
telD1999-07-23geomN0002.fits. The dotted lines indicate a fractional
difference of $10^{-5}$ (\ie\ $9 \times 10^{-4}$~deg). No CCD has a
corner whose angle differs from a right angle by more than about
$0.0023^{\circ}$ ($4 \times 10^{-5}$~rad).
%
\label{fig_angle}}
\end{figure}
\subsection{Affect on detector coordinates}
The differences depicted in Figures~\ref{fig_coplanar}--\ref{fig_angle} are
quite small. The LSI coordinates in the CALDB files define CCDs that are
close to, but not quite, squares. To determine the extent to which the
differences shown in Figures~\ref{fig_coplanar}--\ref{fig_angle} affect the
computation of the DETX and DETY coordinates, the following test was
performed.
%
\begin{enumerate}
\item
\label{step1}
Three of the four corners are used to define a plane (\eg\ $P_{1}$,
$P_{2}$ and $P_{4}$).
\item
\label{step2}
The LSI coordinates ${\bf x}_{\rm LSI}$ of an event at ${\rm (CHIPX,CHIPY)}
= (x,y)$ are computed using
%
\begin{equation}
{\bf x}_{\rm LSI}
= {\bf x}_{i} +
f_{x} \left( {\bf x}_{j} - {\bf x}_{i} \right) +
f_{y} \left( {\bf x}_{k} - {\bf x}_{i} \right),
\end{equation}
%
where, for example, ${\bf x}_{i}$, ${\bf x}_{j}$ and ${\bf x}_{k}$ are the
LSI coordinates associated with points $P_{1}$, $P_{4}$ and $P_{2}$,
respectively, $f_{x} = (x - 0.5) / 1024$ and $f_{y} = (y - 0.5) / 1024$.
\item
\label{step3}
The coordinates DETX and DETY are computed using the
coordinates ${\bf x}_{\rm LSI}$.
\item
\label{step4}
Steps~\ref{step2} and \ref{step3} are repeated using the $(x,y)$ coordinates
for each pixel of each CCD. This process yields a set of 10,485,760 DETX and
DETY coordinates.
\item
Steps~\ref{step1}--\ref{step4} are repeated for the other three sets of
three corners, yielding three more sets of 10,485,760 DETX and DETY
coordinates.
\item
The differences between the first and second, first and third and first and
fourth sets of DETX and DETY coordinates are computed.
\end{enumerate}
%
The largest difference between the first and second, first and third and
first and fourth sets of DETX and DETY coordinates is plotted for each CCD
in Figure~\ref{fig_diff}. A comparison of
Figures~\ref{fig_coplanar}--\ref{fig_angle} with Figure~\ref{fig_diff}
suggests that the technique I use to compute the DETX and DETY coordinates
is more sensitive to the inaccuracies of the angles $\theta$ than to the
inaccuracies of the side lengths $l$ or the nonplanarity of the corners.
However, the differences between the DETX and DETY coordinates computed
using one set of three corners differs by more than 0.042 pixel from the
DETX and DETY coordinates computed using any other set of three corners.
Since differences between the sky coordinates should be comparable to
differences between the detector coordinates, the differences shown in
Figures~\ref{fig_coplanar}--\ref{fig_angle} should not significantly affect
the computation of the X and Y coordinates.
\begin{figure}
\centerline{\hbox{\psfig{file=test_corners_1.0.ps,angle=-90,width=5.22in}}}
\centerline{\hbox{\psfig{file=test_corners_1.1.ps,angle=-90,width=5.22in}}}
\caption{
% \small \sl
%
The largest difference between the DETX and DETY coordinates computed
using points ($P_{1}$, $P_{2}$ and $P_{3}$) and ($P_{1}$, $P_{2}$ and
$P_{4}$) (``Point 2''), using points ($P_{2}$, $P_{3}$ and $P_{4}$) and
($P_{1}$, $P_{2}$ and $P_{4}$) (``Point 3'') and using points ($P_{1}$,
$P_{3}$ and $P_{4}$) and ($P_{1}$, $P_{2}$ and $P_{4}$) (``Point 4'').
The upper plot is for the coordinates in the CALDB file
telD1999-07-23geomN0005.fits. The lower plot is for
telD1999-07-23geomN0002.fits. The detector coordinates differ by no
more than 0.042 pixel.
%
\label{fig_diff}}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 5. Summary
\section{ Summary }
While Figures~\ref{fig_coplanar}--\ref{fig_angle} show that the LSI
coordinates of the ACIS CCDs in the CALDB instrument geometry files do not
define two-dimensional square detectors, these figures also show that the
differences between a square detector and the CALDB data are small.
Figure~\ref{fig_diff} shows that the inaccuracies in the CALDB data should
not affect the computation of the detector (and, hence, sky) coordinates by
more than about 0.04~pixel.
If the LSI coordinates are adjusted at some time in the future, it would be
nice if the coordinates were modified to define two-dimensional square
detectors. This can be achieved, for example, by calibrating six of the
twelve coordinates of the four corners and computing the remaining six
coordinates by requiring the corners to be coplanar, by requiring the
lengths of each side to be the same as the calibrated length and by
requiring the angles between adjacent sides to be right angles. In this
fashion, the three conditions listed in section~\ref{test} will be satisfied
to machine precision.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 6. Finish
\end{document}