

\documentclass[11pt]{article}

\usepackage{epsf}
\usepackage{graphicx}
\usepackage{epstopdf}

\newcommand{\lam}{$\lambda$}
\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}
 

\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. 6}
\vspace{3mm}
\hrule
\noindent Version 3 \hfill 6 February 2020
\vspace{2mm}
\hrule

\begin{centerpage}

\begin{center}
{\Large\bf Warm and hot pixels on the EIS CCDs}\\
\mbox{}\\
\mbox{}\\
Louisa Kennedy\\
Mullard Space Science Laboratory\\
University College London\\
Holmbury St. Mary\\
Dorking, Surrey, RH5 6NT\\
U.K.\\
\mbox{}\\
\mbox{}\\
Peter Young\\
NASA Goddard Space Flight Center\\
Greenbelt, MD 20771\\
U.S.A.\\
\end{center}

\end{centerpage}

\end{titlepage}


\section{Introduction}

EIS has two 2048x1024 pixel CCDs, one for each of the two wavelength
channels. The CCDs were provided by the company e2v and are of device
type 42-20. 

Prior to launch it was expected that the EIS CCDs would experience hot pixels 
as these are well known defects where individual pixels on the CCDs have higher than normal 
rates of charge leakage. These are due to either defects in the silicon, or radiation damage 
experienced in a space environment (in the case of EIS the most likely radiation damage is due to 
the SAA –- South Atlantic Anomaly, which the Hinode satellite passes through periodically every 
orbit). The CCD manufacturer e2v provides a criterion to identify hot pixels which is detailed in 
Section~\ref{sect.hot} below.  

A defect that was not expected but identified approximately 9 months into the mission was the 
accumulation of warm pixels, which are similar to hot pixels but have a lower signal level and are 
much greater in number. To identify these warm pixels it was found that no formal criterion was 
available (as for the identification of hot pixels) and so a ‘bespoke’ criterion was defined, which is 
detailed in Section~\ref{sect.warm}.

The large number of warm pixels on the EIS CCDs represent perhaps the
single biggest instrumental issue affecting EIS data analysis. The
present Software Note discusses some properties of warm pixels and how
they are flagged for data analysis. EIS Software Note 13 discusses how
scientists should deal with bad pixels in their data analysis.

\section{Properties of hot and warm pixels}

When a dark frame is taken with EIS, the majority of pixels in the
exposure will have a similar data number (DN) value that represents
the sum of the CCD pedestal and the dark current. The warm and hot
pixels have DN values enhanced over these typical values and the
enhancement appears to behave like the dark
current. Fig.~\ref{fig.he2-wp} shows an observed warm pixel signal as
a function of time compared to a neighboring, normal pixel. Two
features are apparent: 

\begin{enumerate}
\item the background warm pixel DN value oscillates in time on the
  frequency of the Hinode orbit (98 mins);
\item the warm pixel detects a solar signal and this signal is the
  same intensity as in the normal pixel.
\end{enumerate}


\begin{figure}[h]
\centerline{\epsfxsize=12cm\epsfbox{dec11_he2_warm_pixel.eps}}
\caption{A comparison of the signal in a warm pixel (solid line) and
  an adjacent
normal pixel (dashed line) from a data-set obtained on 2007 December
11. The raster duration was 5 hours 40 minutes.}
\label{fig.he2-wp}
\end{figure}

The orbital variation of the warm pixel signal is due to the known variation
of the CCD temperature during the orbit and thus demonstrates a link
between warm pixels and CCD temperature. The CCD dark current also
varies over the orbit.

The fact that a solar signal is still measured in warm and hot pixels
suggests that it may be possible to recover the solar signal from
these pixels.


\section{Long term variation of warm and hot pixel numbers with time}

In the following sections we retain text from earlier versions of the
document so the reader can see how warm pixel behavior has evolved. 

\subsection{Status as of March 2010}\label{sect.mar10}

A crucial property of the warm and hot pixels on the EIS CCDs is that
their numbers are increasing with time. This is not a big problem for
hot pixels as there are relatively few of these (around 1\% of CCD
area as of March 2010), but it is a problem for warm pixels. Each year
an additional 4--5\% of the detector becomes
infected with warm pixels (Fig.~\ref{fig.wp}). As of March 2010 (3.3~years into the
mission) around 16\% of the EIS CCD pixels are classed as warm
pixels. At the current rate of increase the number of warm pixels per each CCD
half (512x1024 pixels) will be approximately 31\% in February
2013. This value is significant as when a 30\% level is reached the
line fit parameters will be affected (see EIS Software Note 13) and
corrective action will be required (bake-out of the CCDs).  
% Scientists can either ignore these pixels in their data
% analysis or they can choose to interpolate over the pixels using good
% data. EIS Software Note 13 discusses how these approaches affect
% science products.



\begin{figure}[h]
\centerline{\epsfxsize=16cm\epsfbox{warm_pixels.eps}}
\caption{The rate of increase of the warm pixels since launch for the
  EIS long wavelength CCD (right half, bottom 512 rows).} 
\label{fig.wp}
\end{figure}

Assuming that there is a steady increase in the number of warm pixels
due to radiation damage, the rate of increase (with reference to a
threshold) should increase during a warming period and decrease during
a cooling period. This is not the case for EIS; during periods of
decreasing CCD temperature the warm pixel levels appear to
stabilise (Fig.~\ref{fig.wp}). A possible explanation (following consultations with e2v)
is that for the EIS CCDs the decrease of warm pixels due to decreasing
temperature seems to approximately match the increase due to radiation
which gives the impression of stabilisation and not necessarily
recovery. 

\subsection{Status as of December 2019}\label{sect.dec19}

As described above, the number of warm pixels seemed to show some
relation with the CCD temperature. As the mission evolved and the
rate of increase of warm pixels slowed, the dependence on CCD
temperature became clear, as shown in Figure~\ref{fig.feb20}. The CCD
temperature is at its hottest during December and January and so the
number of warm pixels peaks during this period. A knock-on effect is
that data compression works less well during this period, and so EIS
Chief Observers need to account for this when preparing their
observation plans.

EIS Software Note \#13 suggested that warm pixels may significantly
impact data analysis if their number reaches 30\%\ of the detector
area. Following the peak in the winter of 2015/16 (Figure~\ref{fig.feb20})
it was decided to perform the first CCD bakeout for EIS, in the hope
this would reduce the number of warm pixels. 

\begin{figure}[t]
\centerline{\epsfxsize=\textwidth\epsfbox{WP_plot_jan2020.eps}}
\caption{Variation of the number of warm pixels (black) and the CCD
  temperature (blue) with time, from 2008 January. The red lines are
  explained in the main text.}
\label{fig.feb20}
\end{figure}

%The latest warm pixel plot is shown in Figure~\ref{fig.feb20}.
The first EIS CCD
bakeout (both short and long wavelength CCDs) was performed in
February 2016 and lasted three days. This provided encouraging results with a
reduction in both the number of hot and warm pixels. The recovery is
evident (Figure~\ref{fig.feb20}) as following the bakeout the subsequent number of
warm pixels at the coldest CCD temperature was significantly lower
than the previous years---as shown by the red horizontal line, and
also the number of warm pixels at the hottest CCD temperature was
significantly lower than previous years---as shown by the red dash
horizontal line. A second shorter CCD bakeout (2 days) was performed
in August 2017, the purpose of this was to test the new on-board
software for bakeout handling (although some hot and warm pixel
recovery was seen, this was not as much as the first bakeout---as
expected due to the shorter bakeout duration).

The data from the last CCD bakeout (January 2018, duration of just
over 3+1/2 days, planned for 5 days) initially indicated some warm
pixel recovery but subsequent data showed an increase in the warm
pixels. It is presumed that any reduction in the warm pixels initially
seen will have been masked by the subsequent increase in warm pixels,
which followed during the period that the EIS was switched off for
($\approx$~4 months).

As of December 2019 the warm pixels affect 26\% of the CCD imaging
area, which is the peak for this recent (2019/2020) ‘hot’ period, this
is the same value (26\%) for the previous peak  in the 2018/2019 ‘hot’
period. For the 2017/2018 hot period the peak was 27\%. At their
highest level (prior to the first bakeout) the warm pixels accounted
for 28\% of the imaging pixels (in the 2015/2016 hot period). Note,
when a 30\% warm pixel level is reached the spectral line fit
parameters will be affected (EIS Software Note \#13).




\section{Hot and warm pixel definitions}


\subsection{Hot pixels}\label{sect.hot}

The hot pixel threshold is 
based on a criterion set by e2v, which states that any pixel containing more than 25,000 
electrons/pixel/second at room temperature is a hot pixel. The threshold is scaled to the EIS 
temperature using the standard equation 

\begin{equation}
{Q_d \over Q_{d0}} = 122 \, T^3 \exp(-6400/T)
\end{equation}

where $Q_{d0}$ is the dark signal at 
293~K (e.g., 25000~$e^{-}$ at 293~K corresponds to 46~$e^{-}$ at 233~K). 

Note that, since the hot pixel threshold depends on the CCD temperature, then the
number of hot pixels does not vary with CCD temperature. Also, as the
hot pixel threshold is expressed as a rate, then  the
number of hot pixels flagged is independent of the exposure time of
the dark frame.

\subsection{Warm pixels}\label{sect.warm}

Warm pixels are defined to be pixels that lie below the hot pixel
threshold (defined above) but above a lower limit threshold that
distinguishes them from normal CCD pixels. This lower limit is defined
on an ad hoc basis from dark frame exposures taken regularly by the
EIS instrument, with the criterion being: \emph{no more than 1 real pixel
must be incorrectly categorised as a warm pixel}.

If we assume that the dark current for normal pixels has a standard
deviation of $\sigma$, then for a CCD image area of 1024 $\times$ 512 pixels (quarter of an EIS
CCD), 0.15 pixels lie outside the 5$\sigma$ range. We thus define warm
pixels to be those with DN values above 5$\sigma$.

With this criterion, the procedure for producing the dark frame
images is:

\begin{enumerate}
\item remove any cosmic rays by comparing two consecutive exposures and using the lowest 
value;
\item subtract the dark current;
\item calculate the standard deviation, $\sigma$, of the CCD dark frame exposure;
\item all pixels with DN values greater than 5$\sigma$ are flagged as
  warm pixels.
\end{enumerate}

As an example, for a 100 second dark exposure and a CCD temperature of
233~K the hot pixel threshold is 4600~e$^{-}$ (742~DN) and the warm
pixel threshold is 62~e$^{-}$ (10~DN).




\section{Hot and warm pixel maps}

Two engineering studies, REGCAL071 and REGCAL072, are run on a weekly
basis to obtain dark frames for the top and bottom halves of the EIS
CCDs. Warm and hot pixels are identified following the procedure
identified above and warm and hot pixel maps are stored in the EIS
Solarsoft distribution in the directories:

\$SSW/hinode/eis/data/cal/hp \quad [hot pixels]\\
\$SSW/hinode/eis/data/cal/wp \quad [warm pixels]

Each directory contains sub-directories identified by the date on which
the REGCAL studies were run. The sub-directories usually contain
eight files containing the maps. The two CCDs each have four maps corresponding
to the top-left, top-right, bottom-left and bottom-right quadrants of
the 2048 $\times$ 1024 pixel CCD. Restoring one of these maps into IDL
reveals a 1024 $\times$ 512 array containing 0's and 1's. Pixels
marked with 1 are the warm/hot pixels. Note that sometimes due to telemetry data
drop-outs not all of the eight maps will be available.

The EIS calibration routine, eis\_prep, determines the hot and warm
pixel maps that are closest in time to the scientist's observations
and applies these maps to flag the pixels as missing pixels (see EIS
Software Note 1 for more details).

A hot or warm pixel map for a specific data window of an EIS data-set
can be obtained as follows. Consider a data-set with the filename
\verb|fname| (can be either a level-0 or level-1 FITS file) that has a
data window containing the emission
line \ion{Fe}{xii} \lam195.12. The following commands will create the
warm pixel for this window:
%
\begin{verbatim}
IDL> data=obj_new('eis_data',fname)
IDL> cal=data->getcal()
IDL> iwin=data->getwindx(195.12)
IDL> wp=cal->warm_pixels(data,iwin[0])
\end{verbatim}
%
The output array, \verb|wp|, is a two dimensional array of size
NW$\times$NY where NW is the number of pixels in the wavelength
direction for the \lam195.12 data window and NY is the number of
pixels in the Y direction for the \lam195.12 data window. The array
contains 0's and 1's, with a 1 indicating the position of a warm
pixel. 

The hot pixel map for the data window can be obtained in the same way
by substituting \verb|hot_pixels| for \verb|warm_pixels| in the IDL
commands given above.

\newpage

\appendix

\section{Document history}

\emph{Version 3.0, 6-Feb-2020}. Added Sect.~\ref{sect.dec19}

\end{document}
