
\documentclass[11pt]{article}

\usepackage{epsf}

\newcommand{\lam}{$\lambda$}
\newcommand{\arcsec}{$^{\prime\prime}$}
\newcommand{\kms}{km~s$^{-1}$}
\newcommand{\cm}{cm$^{-3}$}
\newcommand{\ion}[2]{#1\,{\sc #2}}
\newcommand{\ecssa}{erg cm$^{-2}$ s$^{-1}$ sr$^{-1}$ \AA$^{-1}$} % erg/cm2/s/angstrom
\newcommand{\ecss}{erg cm$^{-2}$ s$^{-1}$ sr$^{-1}$} % erg/cm2/s/sr

\setlength{\oddsidemargin}{0cm}
\setlength{\evensidemargin}{0cm}
\setlength{\topmargin}{0cm}
\setlength{\textwidth}{16cm}
\setlength{\textheight}{23cm}
\setlength{\parindent}{0cm}
\setlength{\parskip}{0.1cm}
 
\newcommand{\calss}{CALIB\_SLIT\_SLOT}

\newenvironment{centerpage}{\mbox{} \protect\vspace*{\fill}}{
        \protect\vspace*{\fill} \mbox{} \protect\\ \mbox{}}

\begin{document}

\begin{titlepage}
\hrule
\noindent\textbf{EUV IMAGING SPECTROMETER}\\
\vspace{-0.7\baselineskip}\\
{\noindent\Huge\bf Hinode}
\vspace{2mm}
\hrule
\vspace{3mm}
\centerline{\bf EIS SOFTWARE NOTE No. 4}
\vspace{3mm}
\hrule
\noindent Version 1 \hfill 5 January 2010
\vspace{2mm}
\hrule

\begin{centerpage}

\begin{center}
{\Large\bf The EIS Slit Tilts}\\
\mbox{}\\
\mbox{}\\
Peter Young\\
Naval Research Laboratory\\
4555 Overlook Ave SW\\
Washington, DC 20004\\
U.S.A.\\
\mbox{}\\
pyoung@ssd5.nrl.navy.mil
\end{center}

\end{centerpage}

\end{titlepage}

\section{Introduction}

The EIS 1\arcsec\ and 2\arcsec\ slits are both tilted relative to the axes of the
EIS CCDs, resulting in measured line centroids varying systematically
with Y-position. The tilts of both slits are in the same direction,
shifting line centroids to higher pixel numbers for increasing
Y-position, i.e., lines become increasingly blue-shifted towards the top
of the CCDs. The tilt of the 2\arcsec\ slit is larger than for the 1\arcsec\ slit.

This document presents measurements of the slit tilts for the EIS 1\arcsec\
and 2\arcsec\ slits. The full height of the CCD is used to measure the tilts
and the following sections present the observing study used for the
measurements, the analysis method and the results.

\section{The CALIB\_SLIT\_SLOT study}

The EIS planning software allows an exposure to be positioned anywhere
in the Y-direction of the 1024-pixel high CCD (except the very bottom
pixel). However the software also restricts any single exposure to be
512 pixels high, thus the full height of the CCD can only be observed
by using two separate exposures. A study, \calss, was designed to
obtain narrow rasters using the 40\arcsec, 1\arcsec\ and 2\arcsec\ slits and taking the
full 512 pixel height in Y. It was intended to be run twice, the first
covering the top half of the CCD (Y-pixels 512 to 1023) and the second
covering the bottom half (Y-pixels 1 to 512). In addition to measuring
the slit tilt, this raster was also intended to be used for measuring
the instrumental widths of the 1\arcsec\ and 2\arcsec\ slits, and for checking the
absolute intensity calibration of the 1\arcsec, 2\arcsec\ and 40\arcsec\ slits.


\calss\ (ID 352) consists of three different rasters, each of which
takes the maximum number of pixels in the Y direction (512). The first is
a raster with the 40\arcsec\ slit which has three scan positions separated
by 32\arcsec\, and an exposure time of 20~s. The second raster is obtained
with the 1\arcsec\ slit, has 15 scan positions and a 40~s exposure time. The
third raster uses the 2\arcsec\ slit, has 15 scan positions and a 20~s
exposure time. The two narrow slit rasters use the same line list,
consisting of the three core lines, \ion{Fe}{viii} \lam185.21,
\ion{Fe}{xii} \lam193.51, \ion{Fe}{xiii} \lam\lam202.04, 203.82,
\ion{Si}{vii} \lam275.35 and \ion{Fe}{xv} \lam284.16. Only
\ion{Fe}{xii} \lam193.51 and \ion{Fe}{xii} \lam195.12 are considered
in this document.

The dates on which \calss\ observed both the top and bottom
of the CCD are given in Table~\ref{tbl.runs}. For the period
Nov.--Dec.\ 2009 the study was run in quiet off-limb regions above the
equator.


\begin{table}[h]
\caption{\calss\ runs.}
\begin{center}
\begin{tabular}{llp{5cm}}
\noalign{\hrule}
\noalign{\smallskip}
\noalign{\hrule}
Date & Location & Comment \\
\noalign{\hrule}
\noalign{\smallskip}
5-Nov-2009 & East limb & \\
13-Nov-2009 & East limb & AR loops in north of raster?\\
19-Nov-2009 & West limb & \\
26-Nov-2009 & East limb & \\
11-Dec-2009 & West limb & \\
\noalign{\hrule}
\end{tabular}
\end{center}
\label{tbl.runs}
\end{table}

\section{Analysis method}\label{sect.method}

Each of the narrow slit rasters consists of 15 exposures and the
method used here is:

\begin{enumerate}
\item Match exposure $i$ from the top half of the CCD with the
  corresponding exposure $i$ for the bottom half of the CCD.
\item For exposures $i$ create a 1D array containing the measured
  centroids at each Y-pixel position, matched to their Y-pixel
  numbers.
\item Fit a quadratic function to the variation of centroids with Y to
  yield coefficients $c_1$ and $c_2$ for the linear and quadratic
  terms, respectively.
\item Average the values of $c_1$ and $c_2$ across the 15 exposures to
  yield the final parameters $\bar{c}_1$ and $\bar{c}_2$.
\end{enumerate}

Step 2 is complicated by the fact that the lower and upper exposures are
obtained at different times and so the orbital variation of the line
centroids (caused by movement of the grating) gives a wavelength
offset between the exposures. This is corrected in a two step
process. Firstly the upper and lower 10 pixels of the lower and upper
exposures, respectively, are averaged and the difference between them
gives a first guess of the exposure offset. Correcting the two
centroid arrays for this offset, a first estimate of the quadratic fit
function is made. The original centroid arrays for the lower and upper
exposures are then corrected for the slit tilt and the average
centroids calculated for the lower and upper exposures. The difference
between these average centroids is then the second, and final,
estimate of the exposure offset. With this offset, the quadratic
function is then re-fit to the centroid data, yielding the final fit
parameters for the slit tilt.

\section{The 1\arcsec\ slit tilt}

Previous to the present work, the most extensive study of the slit 1\arcsec\
slit tilt was by S.~Kamio who measured the tilt in a large amount of
data from 2006 November to 2007 November. He fitted a straight line to
measured \ion{Fe}{xii} \lam195.12 centroids yielding an average
gradient of $1.18\times 10^{-5}$~\AA~pixel$^{-1}$ with a standard
deviation of $1.43\times 10^{-5}$~\AA~pixel$^{-1}$. Looking at plots
of the variation of line centroids across the full height of the CCD (Fig.~\ref{fig.slit0})
clearly reveals that the slit appears curved on the detector, with the
gradient being steepest at low pixel numbers and shallowest at high
pixel numbers. Over-plotted on Fig.~\ref{fig.slit0} is the average
tilt obtained by S.~Kamio which is in quite good agreement with the
measurements in the central portion of the CCD, but in poor agreement
for the lowest 300 pixels. Note that, for the time period studied by
S.~Kamio, EIS observations were restricted to Y-pixels 255 to 766.

The method described in the previous section was applied to the
\calss\ observations to derive the fit parameters, $\bar{c}_1$ and $\bar{c}_2$, given in
Table~\ref{tbl.slit0}. The lowest 10 pixels were omitted from the
fitting process as it was found that the emission line intensities
dropped to zero in this region. It is believed that this is because
the bottom edge of the slit occurs in this region.

\begin{figure}[h]
\centerline{\epsfxsize=13cm\epsfbox{slit0_tilt.eps}}
\caption{The crosses show measured centroids from the 2009 November 5
  data-set for the 1\arcsec\ slit rasters. The centroids have been aveaged
  across the 15 exposures of the raster. The straight line shows the
  average tilt obtained from the work of S.~Kamio.}
\label{fig.slit0}
\end{figure}


\begin{table}[h]
\caption{Fit parameters for the 1\arcsec\ slit data.}
\begin{center}
\begin{tabular}{clllll}
\noalign{\hrule}
\noalign{\smallskip}
\noalign{\hrule}
&& $\bar{c}_1$ & $\sigma_1$ & $\bar{c}_2$ & $\sigma_2$ \\
Data-set & Line & m\AA/pix & m\AA/pix & $\mu$\AA/pix$^2$ & $\mu$\AA/pix$^2$\\
\noalign{\hrule}
\noalign{\smallskip}
5-Nov-2009  & 195.1 & 0.0447 & 0.0015 & -0.0227 & 0.0009 \\
            & 193.5 & 0.0415 & 0.0019 & -0.0196 & 0.0012 \\
19-Nov-2009 & 195.1 & 0.0480 & 0.0016 & -0.0229 & 0.0016 \\
            & 193.5 & 0.0454 & 0.0010 & -0.0218 & 0.0012 \\
26-Nov-2009 & 195.1 & 0.0506 & 0.0022 & -0.0270 & 0.0017 \\
            & 193.5 & 0.0430 & 0.0015 & -0.0196 & 0.0011 \\
11-Dec-2009 & 195.1 & 0.0458 & 0.0016 & -0.0222 & 0.0011 \\
            & 193.5 & 0.0439 & 0.0015 & -0.0207 & 0.0012 \\
\noalign{\hrule}
\end{tabular}
\end{center}
\label{tbl.slit0}
\end{table}

The $\chi^2$ values for the fits to individual exposure data were
generally between 0.5 and 0.8, 
and the standard deviations of the residuals (between the fits and
data) were around 1.2 to 2.0~m\AA. A sharp drop in the measured
centroids of about 2~m\AA\ at the highest pixels (typically pixels $>$ 980) was a
common feature of the centroid plots, suggesting this may be a real
feature. This region was not omitted from the fits, however.

The average values of the fit parameters shown in Table~\ref{tbl.slit0}
is given below:


\begin{eqnarray*}
c_1 = 0.0454 \pm 0.0029 & \quad & {\rm m\AA}~{\rm pixel}^{-1} \\
c_2= 0.0221 \pm 0.0024 & \quad & \mu {\rm \AA}~{\rm pixel}^{-2}
\end{eqnarray*}

The variation in the fit parameters shown in Table~\ref{tbl.slit0} is
larger than the typical error on the fit parameters, and so the
uncertainties given above are the standard deviations of the fit parameters.



\section{The 2\arcsec\ slit tilt}

The 2\arcsec\ slit is significantly more tilted than the 1\arcsec\ slit, with a
value of approximately 0.12~m\AA/pixel, corresponding to a shift of
around 0.12~\AA\ (5 pixels) from the bottom of the CCD to the
top (Fig.~\ref{fig.slit2}). The slit also shows some curvature as can
be seen in Fig.~\ref{fig.slit2}. The 2\arcsec\ slit tilt was previously
derived by S.~Kamio using the same method as for the 1\arcsec\ slit and an
average gradient of $1.09\times 10^{-4}$~\AA~pixel$^{-1}$ was found,
with a standard deviation of $1.03\times
10^{-5}$~\AA~pixel$^{-1}$. This tilt is over-plotted on
Fig.~\ref{fig.slit2} as a straight line and it is seen to be in good
agreement with the observations for the upper 600 pixels of the CCD,
but not for the lower 400 pixels.


\begin{figure}[h]
\centerline{\epsfxsize=13cm\epsfbox{slit2_tilt.eps}}
\caption{The crosses show measured centroids from the 2009 November 5
  data-set for the 2\arcsec\ slit rasters. The centroids have been aveaged
  across the 15 exposures of the raster. The straight line shows the
  average tilt obtained from the work of S.~Kamio.}
\label{fig.slit2}
\end{figure}

The method described in the Sect.~\ref{sect.method} was applied to the
\calss\ observations to derive the fit parameters, $\bar{c}_1$ and $\bar{c}_2$, given in
Table~\ref{tbl.slit2}. 


\begin{table}[h]
\caption{Fit parameters for the 2\arcsec\ slit data.}
\begin{center}
\begin{tabular}{clllll}
\noalign{\hrule}
\noalign{\smallskip}
\noalign{\hrule}
&& $\bar{c}_1$ & $\sigma_1$ & $\bar{c}_2$ & $\sigma_2$ \\
Data-set & Line & m\AA/pix & m\AA/pix & $\mu$\AA/pix$^2$ & $\mu$\AA/pix$^2$\\
\noalign{\hrule}
\noalign{\smallskip}
5-Nov-2009 & 195.1 &0.1418 & 0.0013 & -0.0221 & 0.0010 \\
           & 193.5 & 0.1402 & 0.0018 & -0.0198 & 0.0015 \\
13-Nov-2009* & 195.1 &0.1407 & 0.0014 & -0.0194 & 0.0009 \\
             & 193.5 &0.1377 & 0.0026 & -0.0170 & 0.0018 \\
19-Nov-2009 & 195.1 & 0.1428 & 0.0015 & -0.0215 & 0.0010 \\
            & 193.5 & 0.1403 & 0.0014 & -0.0188 & 0.0010 \\
26-Nov-2009 & 195.1 & 0.1462 & 0.0022 & -0.0245 & 0.0014 \\
            & 193.5 & 0.1378 & 0.0019 & -0.0165 & 0.0011 \\
11-Dec-2009 & 195.1 & 0.1423 & 0.0020 & -0.0211 & 0.0017 \\
            & 193.5 & 0.1408 & 0.0021 & -0.0196 & 0.0013 \\
\noalign{\hrule}
\multicolumn{5}{l}{* Data contains significant AR component.}
\end{tabular}
\end{center}
\label{tbl.slit2}
\end{table}


The scatter in the derived parameter values is larger than the
1$\sigma$ error bars, so we take the mean of the parameters and set
the error to be the standard deviation of the of parameters. (The
13-Nov-2009 data-set is ignored, however.) This
gives the final parameters for the 2\arcsec\ slit tilt:

\begin{eqnarray*}
c_1 = 0.1415 \pm 0.0024 & \quad & {\rm m\AA}~{\rm pixel}^{-1} \\
c_2= 0.0205 \pm 0.0024 & \quad & \mu {\rm \AA}~{\rm pixel}^{-2}
\end{eqnarray*}

The error bars can be used to derive the uncertainty on the slit tilt
correction. Consider the case where the pixel 0 is used as a reference
(e.g., a quiet Sun region) and we want to derive the tilt correction
for pixel 500. The above parameters lead to a correction of
0.0656~\AA\ with an uncertainty of 0.0013~\AA. For the \lam195.12 line
this corresponds to a correction of 100.8~\kms\ with an uncertainty of
2.0~\kms. 

\section{Summary}

Quadratic fit parameters for the shape of the EIS narrow slits on the
EIS SW detector have been derived using the \ion{Fe}{xii} \lam193.51
and \lam195.12 lines. The error bars on the parameters enable the user
to estimate the uncertainty introduced by correcting for the slit
tilt, although this is $\le$2~\kms\ for \lam195.12.

This document considers only the strong \ion{Fe}{xii} lines observed
on the SW detector. It is likely that the tilts will be different for the LW
detector (although the curvature should be the same) however the
data-sets considered here are not suitable for the LW detector.

\newpage

\appendix

\section{Detailed method}

An example of the IDL commands used to fit the \calss\ data and derive
the fit parameters is given below.

For the upper half of the CCD:

\begin{verbatim}
list=eis_day_files('2009-12-11',time='08:06',/lev)
offset=eis_slit_tilt_array(15,512,1,0)
wd=eis_getwindata(list[1],195.12,/refill)
eis_wvl_select,wd,offset,wvl_select
eis_auto_fit_new,wd,up_fit_195,offset=offset,wvl_select=wvl_select
eis_fit_viewer_new,wd,up_fit_195
\end{verbatim}

For the lower half of the CCD:

\begin{verbatim}
list=eis_day_files('2009-12-11',time='08:24',/lev)
offset=eis_slit_tilt_array(15,512,1,0)
wd=eis_getwindata(list[1],195.12,/refill)
eis_wvl_select,wd,offset,wvl_select
eis_auto_fit_new,wd,lo_fit_195,offset=offset,wvl_select=wvl_select
eis_fit_viewer_new,wd,lo_fit_195

save,file='dec11_s0_fe12_195.save',lo_fit_195,up_fit_195
\end{verbatim}

Finally, to derive the fit parameters:

\begin{verbatim}
calib_slit_slot_s2,lo_fit_195,up_fit_195
\end{verbatim}

For each data-set the fit structures are saved, as indicated above,
also the calib\_slit\_slot routine creates a postscript file showing
the residuals from each exposure.

Some additional points to note about the analysis:

\begin{itemize}
\item The /refill option was used with eis\_getwindata which replaces
  missing pixels with interpolated intensity values. See EIS software
  note No.~6 for more details.
\item The \lam193.51 line is affected by dust for a portion of the
  slit height. By studying the dusty pixel map in SSW it was
  determined that the dust affects Y-pixels 566 to 579 and so these
  were removed from the analysis.
\item Both the \lam193.51 and \lam195.12 wavelength windows contain
  additional lines. The pixel locations of these lines were omitted
  from the fit. The de-selection of these pixels is performed with the
  routine eis\_wvl\_select.
\end{itemize}

\end{document}
