\begin{quotation} {\it Objective:} Use the ACIS-S quadrant shutter focus measurements to measure the conformance of the ACIS-S to the designed Rowland curvature. {\it Publication(s):} Stage {\it et al.}~\cite{stage98} \end{quotation} XRCF tests were designed to verify the Rowland geometry design of the HETGS, in particular the expected focal properties described in Secion~\ref{sec:rowland_geom}. The ACIS-S quadrant shutter data sets allow us to determine the local detector defocus at each of the multiple orders imaged by the detector. Positive defocus means that the detector surface is located in the $+X$ direction (towards the HRMA) with respect to the optical system best focus. Because of the astigmatic nature of the diffracted images, the axial location of ``best focus'' depends on the focus criteria. For the HETGS we consider the best-focus along the dispersion direction $y'$, our ``primary'' focus, and the best-focus in the cross-dispersion direction $z'$, the ``astigmatic'' focus. The defocus analysis of the ACIS-S images of the shutter focus tests are then used to probe the focus, alignment, and astigmatism of the HEG and MEG optical systems by comparing the experimental results to expected values. \mx simulations and Monte Carlo techniques are used to better understand the limits of the data. \subsection{Shutter Determination of Defocus} At XRCF, a shutter system was installed between the HETG and the ACIS-S. Four shutters per HRMA/HETG shell to divide the HETG into quadrants: Top(T), North(N), Bottom(B) and South(S), for a total of sixteen programmable shutters. The dispersion and cross-dispersion direction defocus of a particular order can be found by comparing the position of the imaged order for light from each quadrant. \begin{figure} [p] \psfig{file=quadrant_fig.eps,height=8.cm} \caption{ \small AXAF Quadrant Schematic. X-rays focussed by the HRMA enter from the left, where they are intercepted by the HETG. The shutters for the North and South quadrants are open. We trace the light for zero order to focus on the Rowland circle. For the zero order, the dispersion direction and cross-dispersion direction focii coincide, as the imaging plane (cross-dispersion best focus) is tangent to the rowland circle at zero order. Note that before reaching focus, the center of the N quadrant is located at a more positive value of y than the south quadrant. At dispersion focus on the rowland circle, the orders overlap at the same value. Past focus, this order is reversed. } \label{fig:quadrant} \end{figure} \begin{table}[p] \label{tab:pairs} \caption{\small Quadrant Interpretation} \begin{center} \begin{tabular}{|l|l|} \hline Quadrant Pair & Meaning \\ \hline N-S, $\Delta_Y$ & dispersion (primary) defocus \\ N-S, $\Delta_Z$ & aberrations \\ B-T, $\Delta_Z$ & cross-disp (astigmatic) defocus \\ B-T, $\Delta_Y$ & aberrations \\ \hline \end{tabular} \end{center} \end{table} Fig.\ref{fig:quadrant} shows the north and south quadrants of the HETG illuminated. The x-axis runs from the center of the HETG to the center of the ACIS-S detector. The y-axis is the dispersion axis, and the z-axis is the cross-dispersion axis. Note that as a result of the instrument arrangement at XRCF, the Top quadrant(not shown in the diagram) is actually located in the -z half-plane in ACIS-S coordinates, which we will use throughout the rest of this paper. The North quadrant is in the +y half-plane. For simplicity, we consider the dispersion direction focus of the zero order image. Note that as we trace the x-rays from the HETG towards the focus, the image of the center of the North quadrant, $N_y$, remains centered on a positive value of y, while $S_y$ remains centered on a negative value of y. This continues until the images meet at the Rowland circle, where they focus at the same value of y. Past the dispersion direction focus, the relative order of the arcs reverses and $N_y$ takes a negative value. The simple geometry of similar triangles allows us to convert the difference $N_y-S_y$ into the offset X$_{\rm defocus}$ from the Rowland circle. The ratio of the offset of the detector to the difference in the location of the arcs is equal to the ratio of the length from the HETG to the detector (the Rowland spacing, $X_{\rm RS}$), to the separation of the grating arcs on the HETG: \begin{equation} {\frac{X_{\rm defocus}}{N_y-S_y}} = {\frac{X_{\rm RS}}{2R_{\rm HETG}}} \label{eq:xdefocus} \end{equation} A positive value of $N_y-S_y$ in our image, indicating the detector is displaced towards the HETG, is a positive defocus. Since the value of $N_y-S_y$ will always be positive before focus on the Rowland cicle, and negative past focus, the approach works at all orders. Although the cross-dispersion direction best focus is located in a different place than the dispersion-direction, the same method is easily used to determine the cross-dispersion defocus at the various orders. We simply replace the $N_y-S_y$ difference with $B_z-T_z$. Of course in this case since the detector is curved to match the Rowland circle, we expect to see a defocus given by the offset to the Rowland circle, that is by $\Delta X_{\rm Rowland}$ of Equation~\ref{equ:delta_x_rowland}. From the symmetry shown in Fig.\ref{fig:quadrant}, it should be clear that the other two centroid difference measurements, $N_y-S_y$ and $B_z-T_z$, are expected to be zero. Any significant deviations here are likely due to grating or HRMA assymetry. Table \ref{tab:pairs} summarizes the meaning of the four results. \subsection{System Effects and Effective $f$-ratios} At XRCF, each quadrant was illuminated separately; however, all mirrors were illuminated at once. Consequently, photons from two shell quarter-arcs are in each non-zero MEG and HEG order, and the zero order contains photons from all four shells. In a perfect optical system with no scattering, tiny quarter-arcs would be visible in each imaged order. In reality, mirror scattering perpendicular to the scattering surface obliterates the well-defined arc shapes and create bowties or hourglasses. In this study, the overall defocus was small enough, and the number of events low enough, that even these shapes blurred into small blobs. Bowties are clearly visible in \mx simulations. The imaged blob is basically a weighted combination of the centroids of the two quarter-arcs. Correspondingly, in Eqn.(\ref{eq:xdefocus}) we need to consider the separation of the same {\it weighted centroids} of the rings of the HETG. We replace the real grating radii $R_{\rm HETG}$ with effective radii calculated by weighting the geometric centroids of the quarter arcs with the mirror shell effective areas. Note the HETG radii given in Table \ref{tab:areas} are not the actual perpendicular distance from the optical axis to the ring of grating facets, but have been adjusted (by similar triangles) to be the perpendicular height at the full Rowland distance from the detector, intersecting the light ray that travels along the HRMA-HETG-ACIS path. \begin{table}[hb] \caption{\small Adjusted Radii of HETG Rings and Mirror Effective Areas} \begin{center} \label{tab:areas} \begin{tabular}{|l|r|r|} \hline Shell & HETG Radius $R_\#$ & Mirror Effective Area $M_\#$ \\ \hline label & (mm) & (cm$^{2}$) \\ \hline 1 & 521.66 & 303.774 \\ 3 & 419.90 & 211.428 \\ 4 & 370.66 & 169.467 \\ 6 & 275.44 & 94.759 \\ \hline \end{tabular} \end{center} \end{table} To calculate the effective radii, we begin with the geometric centroid of the quarter arc, $C_{\rm QA}$: \begin{equation} {\frac{C_{\rm QA}}{r}}=({\frac{5\sqrt{2}}{3+{\frac{3\pi}{2}}}})=.9168453288 \end{equation} Then, \begin{equation} {R_{\rm Eff,MEG}} ={\frac{(R_1A_1 + R_3M_3)C_{\rm QA}}{M_1+M_3}} \end{equation} \begin{displaymath} {R_{\rm Eff,HEG}} ={\frac{(R_4A_4 + R_6M_6)C_{\rm QA}}{M_4+M_6}} \end{displaymath} We derive the following ratios to use in Eqn.(\ref{eq:xdefocus}): \begin{equation} {\frac{X_{\rm RS}}{2R_{\rm eff,MEG}}} = {9.9806 \pm 0.0115} \end{equation} \begin{displaymath} {\frac{X_{\rm RS}}{2R_{\rm eff,HEG}}} = {14.2334 \pm 0.0165} \end{displaymath} The errors in the ratios are based entirely on the error in Rowland diameter; effective area errors were neglected. HETG shell efficiencies were also ignored, as there are considerable uncertainties in HETG efficiency from quadrant to quadrant. Errors in defocus are derived from propagation of statistical and systematic centroid erros and errors in the ratios given above. \subsection{XRCF Data \& Coordinate Systems} \label{sec:XRCFDA} The monochromatic source at XRCF was the Al-K line and contiuum complex at 1.486 keV, and was imaged in the HEG orders -2,-1,0,1 and MEG orders -3,-1,0,1,3 (even orders had very small numbers of events). The data analyzed here are the H-HAS-PI-1.001 and H-HAS-1.003 HRMA-HETG-ACIS-S calibration runs taken at XRCF. The ACIS telemetry was processed by the PSU ACIS team, and we start with their event files for our analysis. In order to facilitate rebinning the data to different bin sizes, the detector integer pixel coordinates are uniformly blurred by $\pm 0.5$ pixels and converted to real-valued distances in millimeters. We further applied PHA to energy conversions and grading. For the analysis here we select events with ASCA grades 0,2,3,4,6 and PHA-energies in the range 1.2 to 1.8 keV. The entire H-HAS-PI-1.001 data set, after grade selection, is shown in Fig.\ref{fig:spectraim}. The runs are approximately 13ksec and 4ksec. The second run was at a higher source intensity, so the overall numbers of events in a given order and quadrant are roughly comparable, and in fact the higher orders for the 1.003 data contain more events than the 1.001. \begin{figure} \centerline{ \psfig{file=spectraim.ps,height=8.cm,width=15.cm}} \caption{\small H-HAS-PI-1.001 ACIS-S image and selected order histograms.} \label{fig:spectraim} \end{figure} The order of quadrant scanning was derived from XRCF log files and determined to be Top, North, Bottom, South. The data are continuous, but the divisions between quadrants were easily determined from examination of the zero order z position data against time. The rms scatter of points from zero order is much greater for the Top and Bottom quadrants than North and South in a Time vs. z scatter plot of events, due to mirror scatter, see discussion in \mx simulation section. Blocks of time for each quadrant were selected to maximize the events counted for each quadrant. The time blocks are very roughly equal. A useful bin size of 12.5$\mu$m, approximately half a pixel, was chosen (see Sect. \ref{sect:robustness}). %XRCF log files: (**970422/acq115167d1i0.pha, etc.**) \subsubsection{Calculation of Centroids} To find the y and z centroids of each image blob for each order and quadrant, an IDL program extracted the events in the vicinity of each order for the previously determined time blocks. These events were then histogramed in y and z projection, and the resultant histograms were fit with 1 dimensional Gaussian curves. The parameters of the fit were amplitude, mean (centroid), standard deviation, and a constant background. Two errors were generated for the centroid in an attempt to estimate possible systematic errors. The statistical sigma of the centroid was taken as sigma of the gaussian divided by the square root of the number of events within 4 sigma of the centroid value. In addition, a separate estimate of sigma was calculated as one quarter of the the distance, centered on the centroid mean, which contained 90\% of the events in the histogram, as a maximum error covering possible systematic effects. Examples of three representative fits, for HEG -2, MEG -1 and MEG +3 orders, are given in Fig.\ref{fig:spectraim} under the full image. We see the histogrammed data, overlaid with the gaussian fit. The size of the 90\% quarter width sigma estimate is given by the horizontal bar capped with triangles. While for order/quadrant combinations with reasonable numbers of events the gaussian fit looks quite reliable, for the HEG -2, and to some extent MEG $\pm$3 orders the poor numbers of events call into some question the accuracy of the gaussian centroid. Table \ref{tab:nums} gives the number of events in each order for H-HAS-PI-1.001. As the HEG -2 histogram indicates, there is considerable fluctuation between bins when only twenty to forty events are binned. With peaks in the histogram at five events, any number of small random effects could distort the fit. We feel; however, that despite such effects almost any independent observer would find the centroid of the histogram to be within a systematic sigma of the gaussian fit mean. \begin{table}[ht] \caption{\small Number of Events, per Order, Quadrant. Maxima are typically MEG $\pm$1 and 0. Minima are generally HEG -2.} \begin{center} \begin{tabular}{|l|r|r|r|r|r|r|} \hline Grating & Order & Top & North & Bottom & South \\ \hline 1.001 & & & & & \\ \hline HEG & -2 & 44 & 29 & 20 & 32 \\ HEG & -1 & 261 & 204 & 178 & 200 \\ HEG & 1 & 242 & 223 & 174 & 214 \\ HEG/MEG & 0 & 441 & 305 & 245 & 318 \\ MEG & -3 & 54 & 54 & 64 & 63 \\ MEG & -1 & 617 & 508 & 455 & 570 \\ MEG & 1 & 608 & 523 & 414 & 529 \\ MEG & 3 & 76 & 72 & 55 & 50 \\ \hline 1.003 & & & & & \\ \hline HEG & -2 & 37 & 47 & 34 & 71 \\ HEG & -1 & 240 & 264 & 224 & 272 \\ HEG & 1 & 260 & 318 & 223 & 259 \\ HEG/MEG & 0 & 192 & 231 & 139 & 234 \\ MEG & -3 & 81 & 86 & 84 & 110 \\ MEG & -1 & 414 & 473 & 372 & 527 \\ MEG & 1 & 376 & 417 & 336 & 418 \\ MEG & 3 & 99 & 107 & 99 & 95 \\ \hline \end{tabular} \label{tab:nums} \end{center} \end{table} \subsubsection{Fitting Imaged Order Defocuses} While the imaged orders from a correctly built, correctly aligned HRMA/HETG/ACIS system are easy to interpret, there can be considerable degeneracy in interpreting the results if the quadrant scan indicates defocuses of the various orders and gratings. For example, with an ACIS-S spectrum that is anything less than spectacular, it would be extremely difficult to discriminate between an improperly curved ACIS-S and a slightly misaligned ACIS-S, or in fact even certain problems with the grating or mirror. Fortunately, particularly in the light of the poor statistics of some imaged orders, sub-assembly metrology of the HETG and ACIS suggest that we can restrict our attention here to placement issues. \begin{figure}[h] \label{fig:acis1} \centerline{ \psfig{file=paper1.001.foc.ps,height=9.cm}} \label{fig:acis3} \centerline{ \psfig{file=paper1.003.foc.ps,height=9.cm}} \caption{ \small 1.001 and 1.003 Results. Plotted are the defocus values calculated for the four quadrant pair differences. HEG results are plotted as squares and dash-dot lines. MEG results are plotted as triangles and dotted lines. Horizontal cross marks on the error bars indicate the extent of statistical errors; the systematic errors are represented by the continuation of the error bar. The zero orders are not plotted as they are not used in fits; however the zero order error bars have been plotted for comparison. Upper left: Linear fit to dispersion direction defocus gives the overall offset and any rotation (tilt) of the detector about the z axis. Lower left: Cross-dispersion direction (astigmatic) defocus. The curves show the expected values of astigmatic defocus, based on the Rowland circle offset from the imaging focal plane and the detector offsets from the dispersion direction fit. Upper and lower right: Equivalent defocuses for the $N_z-S_z$ and $B_y -T_y$ separations. These points are expected to agree with zero. } \end{figure} Once the dispersion defocuses are calculated for each imaged order, a linear fit of defocus as a function of dispersion distance can be used as an indicator of Rowland conformance. Linearity indicates correct Rowland curvature. A constant offset indicates the defocus of the entire detector along the optical axis. A statistically significant slope indicates a properly constructed detector which has been placed with a rotation about the z axis. The linear fits to the dispersion defocuses have been plotted in Fig.{acis1} for the 1.001 and 1.003 data sets. The grating provides a minor alteration in the beam to create the dispersion, but the HRMA is primarily responsible for the focus of the photons, so since the MEG and HEG photons originate from different mirror shells, is not unreasonable to expect the MEG and HEG to achieve best (image) focus at different distances. As a result, although somewhat difficult as a result of the small number of orders, the HEG and MEG orders must be fit separately. As it is impossible to separate HEG and MEG photons in the zero order image, it is not used in the fits. As the zero order defocuses are not used in the fits, the zero order defocuses have been plotted as error bars only. \clearpage The cross-dispersion defocuses can be compared to the expected astigmatic defocus as a function of dispersion distance, $\Delta X_{\rm Rowland}$ of Equation~\ref{equ:delta_x_rowland}, plus any overall defocus or rotational defocus calculated from the dispersion defocuses. That is, the inherent astigmatism is modified by adding to it the results of the linear fit, $(overall~defocus)+(tilt)(D_{\rm disp})$. In the cross-dispersion direction graphs in Fig.\ref{fig:acis1}, the results of the dispersion direction fits have been used with the inherent astigmatism to generate curves showing the expected astigmatic blurring. The astigmatic curves for the 1.001 run show marginal agreement for the MEG data points, and somewhat underestimate the defocus of the HEG points. Though perhaps slightly displaced, the shape of the HEG curve seems appropriate for the data. The astigmatic curves for the 1.003 run seem a bit wide, but generally agree in magnitude and shape. The final two graphs in Fig.\ref{fig:acis1} show the $N_z-S_z$ and $B_y-T_y$ differences, converted by similar triangles into a defocus value. A consistent linear fit to the both $N_z-S_z$ and $B_y-T_y$ would indicate an overall rotation of the detector. However, what we see are non-corresponding deviations from zero. Though a trend is visible in the $N_z-S_z$ plots, the lack of a complimentary trend in the T-B delta y plot suggests that if real this is a result of minor aberrations or asymmetries in the HETG/HRMA. The almost total agreement of the points with zero when considering the systematic error bars reminds us however that this may simply be a result of undersampling. \begin{table}[hb] \caption{\small Linear Fit Results for 1.001 and 1.003.} \label{tap:results} \begin{center} \begin{tabular}{|l|c|r|c|r|} \hline Grating & Statistical Fit & & Systematic Fit & \\ Data & Defocus (mm) & Tilt (arcmin) & Defocus (mm) & Tilt (arcmin) \\ \hline \hline MEG & & & & \\ 1.001 & 0.003 $\pm$ 0.020 & -9.93 $\pm$ 2.72 & 0.011 $\pm$ 0.309 & -11.27 $\pm$ 22.24 \\ 1.003 & 0.082 $\pm$ 0.034 & -6.00 $\pm$ 2.79 & 0.075 $\pm$ 0.361 & -4.33 $\pm$ 24.22\\ \hline \hline HEG & & & & \\ \hline 1.001 & -0.118 $\pm$ 0.036 & -0.63 $\pm$ 3.21 & -0.109 $\pm$ 0.437 & -3.33 $\pm$ 30.95\\ 1.003 &-0.238 $\pm$ 0.037 & -10.34 $\pm$ 2.88 & -0.234 $\pm$ 0.556 & -11.48 $\pm$ 36.55 \\ \hline \end{tabular} \end{center} \end{table} \subsubsection{Tests of Robustness} \label{sect:robustness} For certain low-statistics orders, the centroiding process may be sensitive to the bin size. Certain combinations of bin size and order also fail to converge to a gaussian fit. To quantify this as a possible source of error and to generate as accurate an actual centroid as possible, the centroiding process was repeated for bin sizes ranging from 0.004 mm to 0.032 mm. For every bin size which resulted in convergent fits, the centroid locations for each quadrant and order were recorded, and the corresponding number of events in the y and z histograms were recorded. In the same manner as described in the previous sections, a the defocus of each order for each bin size was calculated. Then, the median values for the four defocus measurements for each order were determined. By taking the median value of the calculated defocus over the set of successful bin sizes, we select the the most robust value of the centroid separation under this fitting process (defocus is linear in centroid separation), and avoid difficulties with poorly determined gaussian mean outliers affecting a straight average. Finally, the median values with errors are used to fit the overall defocus of the detector. The end results of this process are not generally different from choosing an approximately half-pixel bin size. \subsection{Discussion of Geometrical Approximations} There are a number of approximations used in the centroid caculations and fitting process, all of which represent 0.1\% to 1\% size errors which are dwarfed by larger systematic centroid location and other errors from the measurement process. Some of these errors are discussed below. The MEG and HEG spectra have an opening angle of approximately 9 degrees, and are aligned at the zero order. The true dispersion axis is therefore not exactly the y-axis for either grating. Therefore, the images the centroids of the quadrants are not exactly opposite each other when projected onto the axes. The result is a slight error in the value of $N_y-S_y$ or $B_z-T_z$ in calculating the dispersion direction or cross-dispersion direction separations, and that $N_z-S_z$ \& $B_y-T_y$ are not {\it exactly} zero. For an angle of 4.5 degrees, the $N_y-S_y$ could have a fractional error of as much as $1-{\frac{1}{\cos 4.5}} = 0.003$, or 0.3\%. The corresponding expected $N_z-S_z$ separation, at a $N_y-S_y$ separation of 5 microns, would be only 0.39 microns. These errors are extremely small and we may ignore this effect. Note that in fitting calculations, the dispersion distances used, $D_{\rm disp}$, are the real distances along the true dispersion axis, and not the projections onto the ACIS y-axis. As a byproduct of this analysis, the centroids can be used to directly determine the angle between the MEG and HEG spectra. The expected opening angle is $9.934 \pm 0.008$ degrees, Section~\ref{sec:cip_periods_angles}. The observed spread from fitting the HEG or MEG order centroids is $9.933 \pm 0.002$ degrees, which certainly agrees nicely. A second approximation is that the base of the triangle used to calculate the dispersion direction defocus is the Rowland diameter. While this is true of the zero order, higher orders have a slightly shorter chord (see Fig.\ref{fig:hetg-rowland}). The upper limit will show this to be a negligible effect: for the farthest orders (80mm from the center) the length of the chord is about 0.5mm less than the Rowland diameter, a change much smaller than 0.1\%. Finally, the Rowland spacing, $X_{\rm RS}$ at XRCF was adjusted from the flight value of 8633.69 mm to 8782.8mm to compensate for finite source distance effects.\cite{dewey97} This creates additional dispersion direction blurring of $1\mu$m.\cite{marshall97} \subsection{\mx Simulations} The \mx simulator provides the ability to simulate XRCF shutters, so simulation of these XRCF tests is possible. \mx 2.11 simulations were used to verify the analysis technique, and also revealed that the \mx shutter codes are ``Bottom-North-Top-South.'' Using the \mx development version (2.17?), a high event count simulation of the XRCF SF tests was run to create an event pool for Monte Carlo simulations of the actual low event count 1.003 run (see Sec.\ref{sec:MC}). To simulate XRCF conditions, the following changes need to be made to the \mx parameter file to account for the finite source distance and other variations from flight configuration: \begin{itemize} \item SourceDistance,r,a,537.583,,,"Enter Source distance (meters) (0 if infinite)" \item DetOffsetX,r,a,-194.832,,,"Enter Detector X offset from nominal (mm)" \item SpectrumType,s,a,"FILE","FLAT|FILE",,"Select spectrum type" \item SpectrumFile,f,a,"H-HAS-PI-1.003.spec",,,"Enter input spectrum filename" \item SourceType,s,a,"DISK", ... \item SourceDistance,r,a,537.583,,,"Enter Source distance (meters) (0 if infinite)" \item S-DiskTheta0,r,a,0.0,,,"Enter min disk theta in arc-sec" \item S-DiskTheta1,r,a,0.0959223,,,"Enter max disk theta in arc-sec" \item HRMABlur,r,h,0.300100,0.0,,"Enter HRMA Blur angle (arc seconds)" \item HETG Sector1 File,f,h,"/nfs/spectra/d8/MARX/HETG-1-facet.tbl",...1-6 \item RowlandDiameter,r,h,8587.97,1000,,"Enter Rowland Torus Diameter (mm)" \end{itemize} Since the H-HAS-PI-1.003 run has generally more reliable data than the 1.001, the 1.003 spectrum was used for the Monte Carlo simulations and the defocus fits presented here. The other changes adjust for the finite source distance and disk-shape of the XRCF source. Note the detector offset and the adjusted Rowland torus preserve the total Rowland spacing, 8587.97mm - -194.832mm = 8782.8mm. For each XRCF simulation, four \mx (development version 2.17?) simulations were run, one for each quadrant. No pileup simulations were made. The results were sequentially concatenated. In this way, an appropriate \mx data file was created containing four time intervals, and the complete data set was processed through the same programs as the real data set. \begin{table}[hb] \caption{\small \mx Linear Fit Results:} \label{tab:marxres} \begin{center} \begin{tabular}{|l|l|l|} \hline Grating & Defocus (mm) & Tilt (arcmin) \\ MEG & 0.143 $\pm$ .001 & -0.62 $\pm$ 0.1616 \\ HEG & -0.134 $\pm$ .003 & -0.05 $\pm$ 0.2487 \\ \hline \end{tabular} \end{center} \end{table} The complete, high event \mx run has 1,360,839 detected events. When processed, it yields the results in Table \ref{tab:marxres}, and plotted in Fig. \ref{fig:marx}. The HEG and MEG primary defocus linear fits show no of the detector about the z axis, and a well defined and separation in the HEG and MEG focal planes of $\delta_{\rm MARX} = 0.277 mm \pm 0.003$. Not surprisingly, the \mx $N_z-S_z$ and $T_y-B_y$ plots show almost exact agreement with zero (the \mx HRMA and HETG are highly azimuthially symmetric). The astigmatic defocus values agree extremely well with the theoretical curves predicted from the modified by the primary defocus fit. The results of independently fitting the cross-dispersion defocus to a quadratic polynomial are given in Table \ref{tab:marxquad}. We expect the difference in focus offset, $F_{\rm offset}$ between HEG and MEG to be the same as the value found from the primary defocus linear fit. The linear coefficient again yields any rotation of the detector around the z-axis, and finally the quadratic coefficient should be equal to ${\frac{1}{X_{\rm RS}}}$. The results in Table \ref{tab:marxquadres} have large errors, because we are fitting a quadratic polynomial with only 3 or 4 values. They are in fact considerably smaller errors than we will see with the real data in Section \ref{sec:MC}. In Figure \ref{fig:marx} we can see that the data points agree extremely well with the curves produced from these coefficients. In the first plot, the cross dispersion points are plotted against the curves defined by the quadratic fit. In the second plot, the dashed curves represent a hybrid fit: the offset and linear coefficients are from the cross-dispersion fit, but the quadratic coefficient is taken as ${\frac{1}{X_{\rm RS}}}$ for the known value. The solid curves are based on the offsets and tilt from the primary defocus linear fit. \begin{equation} Defocus(D_{\rm disp}) = F_{\rm offset} + (Tilt_{\rm Zaxis})(D_{\rm disp}) + ({\frac{1}{X_{\rm RS}}})(D_{\rm disp}^2) \label{eq:crossfiteqn} \end{equation} \begin{table} \caption{\small \mx Cross Dispersion Quadratic Fit Coefficients:} \label{tab:marxquad} \begin{center} \begin{tabular}{|l|l|l|l|} \hline Grating & Offset & Linear & Quadratic \\ MEG & 0.141358 & 0.000564534 & 0.000115508 \\ MEG Sigma & 0.0212338 & 0.000582522 & 1.61805e-05 \\ HEG & -0.159602 & -5.25345e-05 & 0.000123838 \\ HEG Sigma & 0.0543492 & 0.000822359 & 2.87237e-05 \\ \hline \end{tabular} \end{center} \end{table} \begin{table} \caption{\small \mx Cross Dispersion Quadratic Fit Results:} \label{tab:marxquadres} \begin{center} \begin{tabular}{|l|l|l|l|l|l|l|} \hline Grating & Offset & Sig Offset & Tilt (arc min) & Sig Tilt & Xrs & Sig Xrs \\ MEG & 0.141358 & 0.0212338 &1.94 & 2.00 &8657.38 & 1212.73 \\ HEG & -0.159602 & 0.0543492& -0.18 & 2.83 & 8075.10 & 1872.99 \\ \hline \end{tabular} \end{center} \end{table} \begin{figure}[h] \label{fig:marx} \centerline{ \psfig{file=mmcfullset.marx.1.ps,height=9.cm}} \centerline{ \psfig{file=mmcfullset.marx.2.ps,height=9.cm}} \caption{\small \mx full simulation results. Plotted are the defocus values calculated for the four quadrant pair differences. HEG results are plotted as crosses and dash-dot lines. MEG results are plotted as diamonds and dotted lines. The zero order points are indicated with a cross; they contain photons from both gratings and are not used in any fits. Upper left: Linear fit to dispersion direction defocus gives the overall offset and any rotation (tilt) of the detector about the z axis. Lower left: Cross-dispersion direction (astigmatic) defocus. The curves in the top plot show the fit values of astigmatic defocus, while in the lower plot the dashed and dotted curves are based on the astigmatic fit offset and tilt with the known ${\frac{1}{X_{\rm RS}}}$ quadratic coefficient. The black curves give the expected astigmatic defocus based on the values from the primary dispersion direction fit. Upper and lower right: Equivalent defocuses for the $N_z-S_z$ and $B_y -T_y$ separations. These points are expected to agree with zero. Error bars are statistical, based on centroid location.} \end{figure} \clearpage \subsection{Monte Carlo Simulations} \label{sec:MC} As explained in Section \ref{sec:XRCFDA}, the major difficulty in analyzing the 1.001 and 1.003 data sets is in establishing credible error estimates for the imaged order centroid locations, or equivalently, since the conversion process is essentially linear, for the defocus values. The statistical errors calulated for the data sets are only valid as long as they dominate over (unseen) systematic error effects. After grade and energy selection, there remain only 3423, 3930, 3197,and 4050 events in the top, north, bottom and south quadrant timeslices of the 1.003 data set. Spread out over HEG -2,-1, 0,+1, and MEG -3,-2,-1,0,1,2,3, how likely is it that the small number of events in the orders we can actually use for the fits (H-2,-1,1,M-3,-1, 1,3) create a representative histogram? To answer this question, a Monte Carlo scheme was designed using the \mx simulation of the XRCF tests. The high count \mx run described in the previous section has been shown to have a well-defined HEG/MEG focus offset, no rotation about the z-axis, and extremely small deviations from zero in the $N_z-S_z$ and $B_y -T_y$ separations. Small subsets of this data run were selected, in which the total number of events in each quadrant timeslice match the actual number of events in 1.003. The blur of the \mx simulation was set to approximate the observed blur in the 1.003 data, and scattering and efficiency tables were turned on. While the analysis of the whole \mx simulation produces textbook results, the analysis of 50 subsets (each with approximately 1/10 the points, chosen at random) shows a wide range of derived defocus values, particuarly for the HEG -2 image. The hypothesis that the 1.003 data is quite likely to suffer from low-photon number selection effects appears to be quite true. More importantly, we now have a tool to correct for this problem. By analysing a large number of subsets, we can measure the variation of defocus at each order, and generate a standard deviation that represents the systematic selection effect much more precisely than the crude estimate used in \ref{sec:XRCFDA}. In practice, the \mx simulation is a good proxy for having several hundred versions of 1.003, but it does not exactly duplicate the real test. The differences can be seen by comparing the histograms produced during the centroiding process. One difference is that the simulated blur and scatter are still a slightly smaller effect than the real blur, so the \mx photons are a bit more concentrated at any given order. Secondly, the relative distribution of photons is somewhat different. In \mx , the central orders tend to have more points than in the real data. This is probably a combination of having fewer photons scattered out of the coordinate boxes in \mx , as there is less total scatter in the simulator, and also that essentially no photons are lost to frame streak in \mx . The crucial test is how well the simulation histograms and real data histograms resemble each other. Using the same binsize on each subset as in the real data, 12.5 $\mu$m, the outer orders are quite closely matched. However, the \mx central orders have histograms generally 1.5 to 2 times taller, and slightly blockier, as a result of the reasons outlined above. However, while switching to a smaller binsize does improve the match of central orders at the expense of matching the outer orders, we are primarily concerned with the behavior of the outer orders and require the best accuracy on our error estimate there. In fact, there is little difference between the errors in focus generated using a 12.5$mu$m or a 6.25$mu$m binsize, as can be seen in Table \ref{tab:MCbinsizes} for the primary defocus measurement. \begin{table} \caption{\small Standard Deviations in Primary Defocus for 12.5 and 6.25 $mu$m. The third line show statistical errors for 12.5 $\mu$m fit on 1.003.} \label{tab:MCbinsizes} \begin{center} \begin{tabular}{|l|l|l|l|l|l|l|l|l|l|} \hline Bin & HEG-2& HEG-1 & HEG 0 & HEG+1 & MEG-2 & MEG-1 & MEG0 & MEG+1 & MEG+3\\ 12.5 & 0.327158 & 0.0448721 & 0.0307076 & 0.0417915 & 0.0518716 & 0.0185770 & 0.0215220 & 0.0167908 & 0.0593412 \\ 6.25 & 0.394904 & 0.0431593 & 0.0343678 & 0.0487507 & 0.0946175 & 0.0149218 & 0.0240873 & 0.0142578 & 0.0531706 \\ Stat-12.5 & 0.0938669 & 0.0639277 & 0.0817074 & 0.0513532 & 0.0697064 & 0.0629757 & 0.0572661 & 0.0793651 & 0.0629151\\ \hline \end{tabular} \end{center} \end{table} In fact, it turns out that the selection effect is particularly strong on the HEG -2 imaged order, and less but comparable to the statistical errors at other orders. The final one-sigma error that we use, then, to plot and fit the 1.003 defocus values is the combined systematic and statistical error (root of the sum of the squares). In Fig. \ref{fig:MC:1.003}, the upper set of plots shows the fits with the statistical errors only, while the lower set uses the combined errors. The key results, calculated in the same way as for the \mx simulation in the previous section, are given in the tables. \begin{figure}[h] \label{fig:MC:1.003} \centerline{ \psfig{file=1.003.stat.1.ps,height=9.cm}} \centerline{ \psfig{file=1.003.comb.1.ps,height=9.cm}} \caption{\small 1.003 Data results. Plotted are the defocus values calculated for the four quadrant pair differences. HEG results are plotted as crosses and dash-dot lines. MEG results are plotted as diamonds and dotted lines. The zero order points are indicated with a cross; they contain photons from both gratings and are not used in any fits. Upper set: Linear fit to dispersion direction defocus, quadratic fit to cross-dispersion direction defocus give complementary values for the HEG-MEG focus offset and the tilt of the detector. Fits done with statistical errors only, which are shown. The cross-dispersion curves use the quadratic fit offset and tilt, and assume the correct quadratic coefficient. Bottom set: Fits done using the combined statistical and Monte Carlo systematic errors. The cross-dispersion dashed fits are like those in the upper plot; the solid lines represent the predicted astigmatism based on the Primary Defocus linear fit offset and tilt values.} \end{figure} \begin{table}[hb] \caption{\small 1.003 Linear Fit Results:} \label{tab:1.003res} \begin{center} \begin{tabular}{|l|l|l|l|l|} \hline Grating & Stat. Defocus (mm) & Stat. Tilt (arcmin) & Combined Defocus & Combined Tilt\\ MEG & 0.082 $\pm$ 0.034 & -6.00 $\pm$ 2.7891 & 0.080 $\pm$ 0.039 & -7.05 $\pm$ 3.56 \\ HEG & -0.238 $\pm$ 0.037& -10.34 $\pm$ 2.8670 & -0.252 $\pm$ 0.050 & -8.37 $\pm$ 4.568\\ \hline \end{tabular} \end{center} \end{table} \begin{table} \caption{\small Cross Dispersion Quadratic Fit Derived Values:} \label{tab:1.003quadres} \begin{center} \begin{tabular}{|l|l|l|l|} \hline Grating & Offset (mm) & Tilt (arc min) & Xrs (mm)\\ MEG Stat.& 0.162049 $\pm$ 0.198649 & -0.88 $\pm$ 7.75 & 8990.36 $\pm$ 6568.12\\ HEG Stat.& -0.152153 $\pm$ 0.208076 & 1.04 $\pm$ 11.47 & 10878.8 $\pm$ 12069.0\\ MEG Comb.& 0.161809 $\pm$ 0.204214 & -1.09 $\pm$ 12.22 & 9008.10 $\pm$ 8335.29 \\ HEG Comb.& -0.152165 $\pm$ 0.372329 &1.04 $\pm$ 16.60 & 10879.3 $\pm$ 26026.5\\ \hline \end{tabular} \end{center} \end{table} First, we have the following $\delta_{\rm focus}$ values: \begin{displaymath} \delta_{1.003,stat,pdf} = 0.082 \pm 0.034 mm - (-0.238 \pm 0.037 mm) = 0.320 \pm 0.050 mm \end{displaymath} \begin{displaymath} \delta_{1.003,comb,pdf} = 0.080 \pm 0.039 mm - (-0.252 \pm 0.050 mm) = 0.332 \pm 0.063 mm \end{displaymath} \begin{displaymath} \delta_{1.003,stat,astig} = 0.162 \pm 0.198 mm - (-0.152 \pm 0.208 mm) = 0.314 \pm 0.287 mm \end{displaymath} \begin{displaymath} \delta_{1.003,comb,astig} = 0.162 \pm 0.204 mm - (-0.152 \pm 0.372 mm) = 0.314 \pm 0.393 mm \end{displaymath} While the latter pair of results are drowned by the effect of the large defocus value uncertainties relative to a reasonably secure quadratic fit, we can still conclude that we see convergence towards a reasonable value of the MEG-HEG focus separation, despite the curious change in absolute positions. Also, the values compare well to the \mx values, which show no change in the absolute positions: \begin{displaymath} \delta_{MARX,pdf} = 0.14136 \pm 0.00056 mm - (-0.15960 \pm 0.0005 mm) = 0.30096 \pm 0.0007 mm \end{displaymath} \begin{displaymath} \delta_{MARX,astig} = 0.14136 \pm 0.02123 mm - (-0.15960 \pm 0.05434 mm) = 0.30096 \pm 0.05834 mm \end{displaymath} The tilt measurements are now clearly statistically insignificant. Indeed, the ridiculousness of the tilts indicated by the primary defocus linear fits is made clear when compared to the astigmatic defocus tilts. Despite the larger errors calculated for the cross dispersion direction fits, looking at the plots it is clear that the nonexistent or small tilts indicated by the cross dispersion direction fits produce expected astigmatic defocuses that are not only reasonable but agree considerably better than the predicted curves base on the primary defocus values (solid lines). There is clearly some slack in the astigmatic fits, indicated by the deviations from the true value in the values of Xrs they predict. Again, however, we see that these deviations are swamped by the errors. Furthermore, accepting the ``true'' value obviously results in a perfectly acceptable fit, as the true value was used in calculating the curves shown in Figure \ref{fig:MC:1.003}. \subsection{Conclusions} The good fits in the \mx simulations indicate the method and the technique are basically sound approaches. While the data clearly exhibit the effects of low number statistics, with some effort these problems have been addressed and the final results show no significant deviations from the expected Rowland geometry were found. Emphasis has been placed on the 1.003 data set, as it contained a larger number of events than the 1.001, and therefore seems the more likely of the two to give reliable results. This hypothesis has been bourne out by the Monte Carlo study, in which we find the locations of centroids, or equivalently, the defocus values calculated, are not well-defined by numbers of events comparable to those in 1.003. In fact, the HEG-2 imaged order shows considerable motion depending on which particular set of photons has been selected. The Monte Carlo study used a 50 randomly chosen subsets of a very high count \mx simulation of the XRCF tests to examine the shift in position of the defocus values for different sets of photons. The standard deviation of the defocus values were found for all orders and defocus measurements, and this was used as an estimate for the systematic error of our real data set. In the end, the systematic effects dominate only the HEG-2 order, but are comparable to the statistical errors on other orders, so the root of the sum of the squares of these errors was used as the final error in linearly fitting the primary direction defocus and quadratically fitting the cross-dispersion direction. When considered in the light of both statistical and selection effects, the results of the fits are extremely good. The MEG and HEG best focuses are offset, not unexpectedly, buy approximately .320$mu$m. The ACIS-S appears to have been placed between these two best focuses, and there is indication that the offset to the MEG best focus may even be consistent with zero. A remaining puzzle is the disagreement in absolute focus between the cross-dispersion and dispersion direction fits; the former indicates the ACIS-S is roughly between focus while the latter shows it about 10% closer to the MEG best focus. Based on the combined results of the linear and quadratic fits, there seems to be no evidence of any significant rotation of the detector about the z-axis. Finally, the $N_z-S_z$ and $B_y-T_y$ difference do not show significantly large aberrations of the HRMA/HETG design. When considering systematic errors, there is no indication of aberration. \begin{quotation} {\it To-do:} \\ \begin{itemize} \item ''Improve'' the \mx simulation by more scatter and blur or multiple binsizes to better match the real test \item Recheck 1.001 data with monte carlo errors \item (completely separately) apply technique to LEG grating data \item update Gaussian fitting of centroid to a matched line profile (although the histograms are so rough this is extremely unlikely to make any significant changes) \end{itemize} \end{quotation}