
\documentclass[11pt]{article}

\usepackage[dvips]{graphicx}      %% FOR INCLUDING GRAPHICS

%% ----------------------------------------------------------------------
%% Add specials here
%% ----------------------------------------------------------------------

\def\ion#1#2{#1\,{\sc #2}\relax}  %% 
\newcommand{\arcsec}{\ensuremath{^{\prime\prime}}}


%% ----------------------------------------------------------------------
%% Modify: 
%%   Note number, version number and date
%%   Title
%%   Author and affiliation 
%% ----------------------------------------------------------------------

\setlength{\oddsidemargin}{0in}         %  1 inch (0 + 1) from left.
\setlength{\topmargin}{-0.5in}          %  1 inch (1.5 - 0.5) from top.
\setlength{\textwidth}{6.5in}           %  1 inch (8.5 - 1 - 6.5) from right.
\setlength{\textheight}{9in}            %  1 inch (11 - 1 - 9) from bottom.

\addtolength{\parskip}{0.5\baselineskip}

%  The environment centerpage centers text vertically on the page.  This is
%  useful within a titlepage environment.

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

\begin{document}                
\bibliographystyle{plain}               % Define bibliography style.

\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. 12}
\vspace{3mm}
\hrule
\noindent Version 1 \hfill 5 February 2010
\vspace{2mm}
\hrule

\begin{centerpage}

\begin{center}
{\Large\bf STRAY LIGHT}\\
\mbox{}\\
\mbox{}\\
Ignacio Ugarte\\
Naval Research Laboratory\\
4555 Overlook Ave SW\\
Washington, DC 20004\\
U.S.A.\\
\mbox{}\\
iugarte@ssd5.nrl.navy.mil\\
\mbox{}\\
\end{center}

\end{centerpage}

\end{titlepage}

%% ----------------------------------------------------------------------
%% The document!
%% ----------------------------------------------------------------------

\section{Introduction}
Stray light is the part of the radiation that impinges the detector following
paths that were not originally intended in the optical system. The source can
be light scattered by external or internal agents, including dust, imperfections
in the optical system, scattering from supporting structures, etc.

In this EIS note, we present a brief analysis of observations during a solar 
eclipse to show the effects that stray light can have in the observations. The
purpose of this note is to make the EIS users aware of this potential contamination
effect. As of this version, no correction is provided. 

\section{Sample dataset: solar eclipse}
To measure the stray light component we need to separate it from the direct
component. During an eclipse, with no direct light aimed at the detector, any
measurement on the EIS detector will be due to the stray contribution.

\begin{figure*}[htp!]
\centering
\includegraphics[clip,height=8cm]{figures/eclipse1.eps}
\caption{Eclipse on 2010 January 15 when stray light observations were taken. In red the EIS field of view.}
\label{fig:eclipse}
\end{figure*}

We investigated the EIS measurements on the detector during the eclipse that took place on 
2010 January 15 (Fig.~\ref{fig:eclipse}). An specific sequence was run for this purpose (Table~\ref{table:sequence}).
It consisted of a set of sit-and-stare 40\arcsec\ slit images in three spectral windows (\ion{Ca}{xvii} 192.82 \AA,
\ion{Fe}{xii} 195.12 \AA\ and \ion{He}{ii} 256.32 \AA) framed by two dark current
measurements ({\tt REGCAL015}), one before and one after. During the dark current 
measurements the shutter remains closed and therefore no light (stray or direct) should 
reach the detector. The counts (data numbers, DN) measured with the shutter closed are used as the 
reference to estimate the stray light component when it is open. We should state that we have used 
only the dark current exposures with the same integration time (10s) as the observations.
 

\begin{table*}
\begin{center}
{\footnotesize
\caption{Eclipse's observing sequence \label{table:sequence}}
\begin{tabular}{c|c|c}
 File & Study Acronym	& Description\\
 \hline
 eis\_l0\_20100115\_042142.fits &   {\tt REGCAL015} 	& 8 dark exposures, full CCD (exposure times: 1,1,10,10,30,30,60,60s)\\
 eis\_l0\_20100115\_043013.fits &   {\tt TEST\_STUDY}	    & [SNS:10sets][ss:40"][wH:512,nWins:3][ExpT(Delay):10.00(0)]\\
 eis\_l0\_20100115\_043213.fits &   {\tt TEST\_STUDY}	    & [SNS:10sets][ss:40"][wH:512,nWins:3][ExpT(Delay):10.00(0)]\\
 eis\_l0\_20100115\_043413.fits &   {\tt TEST\_STUDY}	    & [SNS:10sets][ss:40"][wH:512,nWins:3][ExpT(Delay):10.00(0)]\\
 eis\_l0\_20100115\_043613.fits &   {\tt TEST\_STUDY}	    & [SNS:10sets][ss:40"][wH:512,nWins:3][ExpT(Delay):10.00(0)]\\
 eis\_l0\_20100115\_043812.fits &   {\tt TEST\_STUDY}	    & [SNS:10sets][ss:40"][wH:512,nWins:3][ExpT(Delay):10.00(0)]\\
 eis\_l0\_20100115\_044012.fits &   {\tt TEST\_STUDY}	    & [SNS:10sets][ss:40"][wH:512,nWins:3][ExpT(Delay):10.00(0)]\\
 eis\_l0\_20100115\_044212.fits &   {\tt TEST\_STUDY}	    & [SNS:10sets][ss:40"][wH:512,nWins:3][ExpT(Delay):10.00(0)]\\
 eis\_l0\_20100115\_044512.fits &   {\tt REGCAL015}  	& 8 dark exposures, full CCD (exposure times: 1,1,10,10,30,30,60,60s) \\
\end{tabular}
}
\end{center}
\end{table*}

\begin{figure*}[htp!]
\centering
\includegraphics[clip,height=17cm,angle=90]{figures/stray1.eps}
\caption{{\footnotesize Eclipse sequence as seen in \ion{Fe}{xii} 195.12 \AA. Top: signal in counts. Bottom: residuals from
subtracting the dark current. When comparing to Fig.~\ref{fig:eclipse}, note that images on the detector are 
flipped in the E--W direction.}}
\label{fig:stray1}
\end{figure*}

\begin{figure*}[htp!]
\centering
\includegraphics[clip,width=15cm]{figures/stray3.eps}
\caption{{\footnotesize Larger panels: intensity cross-sections along the slit for position 30 in 
Solar X at three different times during the eclipse. In red and green dark current measurements 
before and after the sequence. Dotted lines indicate the distance traveled by the Moon during 
the exposure. The residuals from subtracting the dark current are shown in the smaller panels}}
\label{fig:stray3}
\end{figure*}

\begin{figure*}[htp!]
\centering

\includegraphics[clip,width=15cm]{figures/stray4.eps}
\caption{{\footnotesize Histograms of residuals from subtracting the two dark current files to exposure 04:36:48 UT
(time step 33). The dotted lines indicate the center of the Gaussian fit given also in the legend
with the standard deviation error from the Gaussian width.}}
\label{fig:stray4}
\end{figure*}

The top panels in Fig.~\ref{fig:stray1} show a subset of the frames in the eclipse sequence, as seen in 
\ion{Fe}{xii} 195.12 \AA. The dark current counts level for this section of the detector is 
around 500 counts. If we subtract the dark current (04:45 UT file), we obtain the residuals shown in 
the bottom row, where we have saturated anything above 60 DN. That brings out the 
signal in the part of the detector that has been occulted by the Moon. Signal there is 
not due to direct light coming from the Sun, but from light following a stray path. The black
dots sprinkled over the field of view are warm and hot pixels.


One obvious thing to note is that there is no sharp transition between the exposed part
of the detector and the occulted one. Two are the contributions to this effect: the Moon's 
displacement accross the field of view and stray light. The Moon is moving while the 
exposure is being taken (10s) and this results in a gradual occultation of the disk and 
therefore a gradient in intensity. We have estimated the displacement of the Moon's leading edge 
in 6.84 pixels/s and in 3.59 pixels/s for the trailing one (see the Appendix).
The exposures are 10s and therefore the intensity of as many as 68 and 36 pixels along the
slit suffers attenuation due to the Moon movement. 


Fig.~\ref{fig:stray3} shows this in more detail. The intensity along the slit for one Solar X (green 
dashed line in Fig.~\ref{fig:stray1}) at three different times is displayed as a black solid line: 
Moon's leading edge in the field of view; full occultation; and trailing edge in the field 
of view. The red and green lines are dark current counts before and after the occultation 
respectively. The spikes come from warm and hot pixels and have not been removed to show that
we are really looking at the same part of the detector in all three curves.
Below each intensity panel, we show a smaller panel with the residuals from 
subtracting the dark current measurements at each pixel. The dotted lines indicate the separation in pixels
between the spatial start of the intensity decay and the end of the estimated distance covered by the 
Moon's edge at the velocities described earlier. The intensity decay shows two clearly defined
slopes: a steep decrease that coincides with the passage of the Moon while the detector is
being exposed and a slower decay from there onwards. The pixels in the latter part of the detector
are, according to this, already fully occulted by the Moon. Therefore the excess of counts has to come 
from stray light that shouldn't be there. 

An exponential fit $A_0\,exp^{-x/A_1}+A_2$ to the gentle slope in the bottom panel (04:38 UT), 
avoiding spikes, gives an amplitude of $A_0\approx25$ counts, $A_1\approx78$ pixels and 
$A_2\approx507$ DN. $A_0$ and $A_1$ can change for different profiles. They are representative, but are 
not sufficiently accurate to derive a universally valid correction curve as function of distance to 
the source. This dataset due to the Moon's rapid displacement is probably not optimal to estimate 
that sort of correction.

We can, however, estimate the minimum stray light level above the dark current. Fig.~\ref{fig:stray4}
shows the histograms of the residuals from subtracting the two dark current exposures to a exposure fully
eclipsed (04:36:48 UT, time step 33). It reveals an excess of 5--6 DN over the dark current 
levels. As no significant differences can be found between the two histograms produced using the two
dark current files set at the beginning and end of the observational sequence, 20 minutes apart, we can rule out the 
time variability of the dark current as responsible for that excess. We can therefore safely conclude
that a minimum of 5--6 counts should be expected from stray light in \ion{Fe}{xii} 195.12 \AA. This is 
when half of the solar disk is eclipsed by the Moon. That is around 2\% of the typical counts for that
line in the field of view.

A similar analysis was done with \ion{He}{ii} 256.32 \AA\ and the blended \ion{Ca}{xvii} 192.82 \AA. The 
Gaussian fits to the histograms return: -1.2$\pm$3.6 DN and 0.8$\pm$3.7 DN in the first case, and 2.1$\pm$3.9 
DN and 2.7$\pm$3.9 DN in the second. These numbers are also at the 2\% level of the typical counts in each 
spectral window.

\begin{figure*}[htp!]
\centering
\includegraphics[clip,height=15cm,angle=90]{figures/stray2.eps}
\caption{Left panels: running differences from the same frames as shown in Fig~\ref{fig:stray1}. Right panel: 
average J-map of the sequence. J-map represents height versus time. Velocities from the linear fit to the 
valleys and peaks at each time step are given color coded.}
\label{fig:stray2}
\end{figure*}

\appendix
\section{Moon's occultation speed}
\label{app:speed}

The velocity of the Moon's edges crossing the EIS field of view was estimated using running difference 
images. Fig.~\ref{fig:stray2} shows the running differences for the same frames as Fig.~\ref{fig:stray1}.
Then a J-map was constructed by averaging the intensity along the slit for each frame (time step) and 
sticking them together in sequence (right panel of Fig.~\ref{fig:stray2}). The two inclined ridges 
represent the edges of the Moon crossing the field of view from bottom to top. A linear fit to the 
central point of the ridges at each time step provides us with the velocity. The values we obtain are 
6.86 pixels/s for the leading edge and 3.59 pixels/s for the trailing one.



\end{document}
