% origin: VAX: wht_ues/ues_user_v01f.tex 
%-----------------------------------------------------------------------------*
%+
%                   +------------------------------------+
%      La Palma     |     William Herschel Telescope     |   Royal Greenwich
%   Software Group  | Roque de los Muchachos Observatory |     Observatory
%                   +------------------------------------+
%
% File    : UES_USER_v1.TEX
%
% Author  : Steve Unger                              Date : 12-Jan-1992
%
% Purpose : TeX source file for the UES Users' Manual
%
% Update  : Nic Walton                                    : 21-Nov-1993
%                                                         : 12-Jan-1994
%
%-----------------------------------------------------------------------------*
%
\documentstyle{book}
\parskip 10pt
\parindent 0pt
%
%============= Definition of {asyoulikeit} page style ======================*
%
% Jonathan Burch        This is the terse form  -  expanded, formatted,
%  20-Jan-1989          commented version in TEX$LATEX:ASYOULIKEIT.FULL
%
\catcode`\@=11\def\ps@asyoulikeit{\def\@oddhead{\hbox{}\lp@innerhead
\lp@headfill\lp@middlehead\lp@headfill\lp@outerhead}\def\@evenhead
{\hbox{}\lp@outerhead\lp@headfill\lp@middlehead\lp@headfill\lp@innerhead}
\def\@oddfoot{\hbox{}\lp@innerfoot\lp@footfill\lp@middlefoot\lp@footfill
\lp@outerfoot}\def\@evenfoot{\hbox{}\lp@outerfoot\lp@footfill\lp@middlefoot
\lp@footfill\lp@innerfoot}\def\sectionmark##1{}\def\subsectionmark##1{}}
\def\lp@innerhead{}\def\lp@middlehead{}\def\lp@outerhead{}\def\lp@innerfoot{}
\def\lp@middlefoot{ {\thepage} }\def\lp@outerfoot{}\def\lp@headfill{\hfil}
\def\lp@footfill{\hfil}\newcommand{\lp@linefill}{\leaders\hrule height 0.55ex
depth -0.5ex\hfill}\newcommand{\innerhead}[1]{\def\lp@innerhead{#1}}
\newcommand{\middlehead}[1]{\def\lp@middlehead{#1}}\newcommand{\outerhead}[1]
{\def\lp@outerhead{#1}}\newcommand{\innerfoot}[1]{\def\lp@innerfoot{#1}}
\newcommand{\middlefoot}[1]{\def\lp@middlefoot{#1}}\newcommand{\outerfoot}[1]
{\def\lp@outerfoot{#1}}\newcommand{\lineheadfill}{\def\lp@headfill
{\lp@linefill}}\newcommand{\linefootfill}{\def\lp@footfill{\lp@linefill}}
\newcommand{\blankheadfill}{\def\lp@headfill{\hfill}}\newcommand
{\blankfootfill}{\def\lp@footfill{\hfill}}\newcommand{\documentnumber}[1]
{\def\lp@docno{#1}\outerhead{\lp@docno}}\def\lp@docno{}\def\@maketitle
{\newpage\null\vskip -14ex\hbox{}\hfill\lp@docno\vskip 13ex\begin{center}
{\LARGE\@title\par}\vskip 1.5em{\large\lineskip .5em\begin{tabular}[t]{c}
\@author\end{tabular}\par}\vskip 1em{\large\@date}\end{center}\par\vskip 3em}
\def\abstract{\if@twocolumn\section*{Abstract}\else\small\begin{center}
{\bf Abstract\vspace{-.5em}\vspace{0pt}}\end{center}\quotation\fi}\def
\endabstract{\if@twocolumn\else\endquotation\fi}\ps@asyoulikeit\catcode`\@=12
%
%=========== End of {asyoulikeit} page style definition ====================*

%============= Definition of \WHTlogo control sequence =====================*
%
%   Roger Wood          This is the terse form  -  expanded, formatted,
%  20-Apr-1989          commented version in ???
%
\newcommand{\WHTlogo}[1]{         \setlength{\unitlength}{#1mm}
\begin{picture}(8,10)(-4,0.7)     \put(-0.4,10.4){\line(1,0){0.8}}
\put(-0.4,10.1){\line(0,1){0.3}}  \put(+0.4,10.1){\line(0,1){0.3}}
\put(-0.4,9.2){\line(0,1){0.6}}   \put(+0.4,9.2){\line(0,1){0.6}}
\put(-0.3,8.9){\line(1,0){0.6}}   \put(-1.6,10.1){\line(1,0){3.2}}
\put(-1.6,9.8){\line(1,0){3.2}}   \put(-1.4,6.2){\line(1,3){1.2}}
\put(+1.4,6.2){\line(-1,3){1.2}}  \put(-1.2,6.2){\line(1,3){1.2}}
\put(+1.2,6.2){\line(-1,3){1.2}}  \put(-1.4,6.2){\line(0,1){3.6}}
\put(+1.4,6.2){\line(0,1){3.6}}   \put(-1.6,4.6){\line(0,1){5.5}}
\put(+1.6,4.6){\line(0,1){5.5}}   \put(-1.5,4.4){\line(-1,3){0.1}}
\put(+2.5,4.4){\line(1,3){0.1}}   \put(-0.25,7.0){\line(1,0){0.5}}
\put(-0.25,6.2){\line(0,1){0.8}}  \put(+0.25,6.2){\line(0,1){0.8}}
\put(-1.6,6.2 ){\line(1,0){3.2}}  \put(0.0,5.77){\circle{0.6}}
\put(-0.75,5.35){\line(1,0){1.5}} \put(-0.95,5.35){\line(-1,0){0.65}}
\put(+0.95,5.35){\line(1,0){0.65}}\put(-0.0,4.6){\line(-1,1){1.6}}
\put(+0.0,4.6){\line(1,1){1.6}}   \put(-0.1,4.5){\line(-1,1){1.5}}
\put(+0.1,4.5){\line(1,1){1.5}}   \put(-0.1,4.5){\line(1,0){0.2}}
\put(-0.4,4.8){\line(-1,0){1.0}}  \put(+0.4,4.8){\line(1,0){1.0}}
\put(-0.2,4.8){\line(1,0){0.4}}   \put(-1.4,4.6){\line(0,1){0.2}}
\put(+1.4,4.6){\line(0,1){0.2}}   \put(-0.2,4.6){\line(-1,0){1.4}}
\put(+0.2,4.6){\line(1,0){1.4}}   \put(-1.5,4.2){\line(0,1){1.15}}
\put(+1.5,4.2){\line(0,1){1.15}}  \put(-1.5,4.2){\line(1,0){3.0}}
\put(-1.0,3.9){\line(0,1){0.3}}   \put(+1.0,3.9){\line(0,1){0.3}}
\put(-1.0,3.9){\line(1,0){2.0}}   \put(-1.6,6.1){\line(-1,0){0.5}}
\put(+1.6,6.1){\line(1,0){0.5}}   \put(-1.6,5.4){\line(-1,0){0.5}}
\put(+1.6,5.4){\line(1,0){0.5}}   \put(-2.1,5.2){\line(0,1){0.9}}
\put(+2.1,5.2){\line(0,1){0.9}}   \put(-2.2,5.7){\line(-1,0){1.5}}
\put(+2.2,5.7){\line(1,0){1.5}}   \put(-2.2,5.5){\line(-1,0){1.5}}
\put(+2.2,5.5){\line(1,0){1.5}}   \put(-3.5,5.2){\line(0,1){0.5}}
\put(+3.5,5.2){\line(0,1){0.5}}   \put(-2.4,5.2){\line(0,1){0.5}}
\put(+2.4,5.2){\line(0,1){0.5}}   \put(-1.8,5.2){\line(-1,0){1.9}}
\put(+1.8,5.2){\line(1,0){1.9}}   \put(-3.7,4.9){\line(0,1){0.3}}
\put(+3.7,4.9){\line(0,1){0.3}}   \put(-1.8,4.0){\line(0,1){1.4}}
\put(+1.8,4.0){\line(0,1){1.4}}   \put(-2.5,3.9){\line(-6,5){1.2}}
\put(+2.5,3.9){\line(6,5){1.2}}   \put(-0.9,2.2){\line(-1,2){0.9}}
\put(+0.9,2.2){\line(1,2){0.9}}   \put(-2.2,2.2){\line(1,0){4.4}}
\put(-2.2,2.1){\line(0,1){0.1}}   \put(+2.2,2.1){\line(0,1){0.1}}
\put(-2.2,2.1){\line(1,0){4.4}}   \put(-1.7,1.5){\line(-1,3){0.8}}
\put(+1.7,1.5){\line(1,3){0.8}}   \put(-1.7,1.5){\line(1,0){3.4}}
\put(-1.7,1.0){\line(0,1){0.5}}   \put(+1.7,1.0){\line(0,1){0.5}}
\put(-1.7,1.0){\line(1,0){3.4}}
\end{picture} }
%
%=========== End of \WHTlogo control sequence definition ===================*


% Page layout definitions to suit A4 paper

\setcounter{secnumdepth}{3}        
\setcounter{tocdepth}{3}
%\setlength{\topmargin}{0mm}
\setlength{\topmargin}{-32pt}
\setlength{\textwidth}{160mm}      
%\setlength{\textheight}{220mm}
\setlength{\textheight}{230mm}
\setlength{\oddsidemargin}{0mm}    
\setlength{\evensidemargin}{0mm}
%
% Local definitions
% -----------------
\newcommand{\eg}{{\it e.g.}}    
\newcommand{\etc}{{\it etc.}}
\newcommand{\icl}{{\tt ICL$>$}\ }
\newcommand{\iraf}{{\sc iraf}\ }
\newcommand{\ie}{{\it i.e.}}
\newcommand{\qv}{{\it q.v.}}
\newcommand{\viz}{{\it viz.}}
\newcommand{\degs}[1]{$#1^\circ$}                       % Degrees symbol
\newcommand{\mins}[1]{$#1^{\scriptsize\prime}$}         % Minutes symbol
\newcommand{\secs}[1]{$#1^{\scriptsize\prime\prime}$}   % Seconds symbol
\newcommand{\key}[1]{\fbox{\sc#1}}                      % Box for keys
\newcommand{\?}{\_\hspace{0.115em}}                     % Proper spacing for 
                                                        %   underscore
%----- Display example text (#1) in typewriter font

\newcommand{\example}[1]{\\ \smallskip\hspace{1in}{\tt #1}\hfil\\
                            \smallskip\noindent}

%----- Enclose text (#2) in ruled box of given thickness (#1)

\def\boxit#1#2{\vbox{\hrule height #1pt\hbox{\vrule width #1pt\hskip 5pt
                   \vbox{\vskip 5pt #2 \vskip 5pt}\hskip 5pt
                   \vrule width #1pt}\hrule height #1pt}}

%----- Display boxed warning text (#1)

\def\warning#1{\bigskip
               \setbox1=\vbox{\tolerance=5000\parfillskip=0pt
               \hsize=3in\noindent#1}
               \centerline{\boxit{1.0}{\box1}}
               \bigskip}

%----- Definitions to aid display of help text 
%         (modelled on \item and \itemitem)

\def\helpindent#1{\setbox2=\hbox to\parindent{{\it #1}\hfil}
                  \indent\llap{\box2}\ignorespaces}
\def\helpitem{\parindent=70pt\par\hang\helpindent}
\def\helpitemitem{\parindent=70pt\par\indent \hangindent2\parindent \helpindent}

%----- Tables and footnotes to tables
%
\newcommand{\spacerA}{\rule{0mm}{4mm}}
\newcommand{\spacerB}{\rule[-2mm]{0mm}{5mm}}
\footnotesep=5mm
\renewcommand{\footnoterule}{{\small Notes:}}
%
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%
\begin{document}
% 
% Title page
% ----------
%
\middlefoot{ }                               % No page number on title page
\begin{center}

{\large Roque de los Muchachos Observatory }

\vspace{1.0in}

{\LARGE \bf William Herschel Telescope}

\vspace{0.3in}

{\Huge \bf UES USERS' MANUAL}

\vspace{0.5in}

{\large Version 1.1}

\vspace{0.1in}

{\large 1993 January 6th}

\vspace{0.5in}

{\Large Steve Unger, Nic Walton, Max Pettini \& Jaap Tinbergen}


\vspace{0.7in}

\WHTlogo{4}

\vfill

\parbox{3.2in}{\parindent=0pt \parfillskip=0pt \scriptsize
    The Isaac Newton Group of telescopes on La~Palma is owned by the UK
    Science and Engineering Research Council and operated by the Royal
    Greenwich Observatory for the SERC in partnership with the 
Nederlandse organisatie voor Wetenschappelijk Onderzoek (NWO)
of the Netherlands, the
    Irish National Board for Science and Technology and the Dublin
    Institute for Advanced Studies.} 
%
\end{center}
%
\cleardoublepage

\innerhead{{\Large\bf UES Users' Manual}}    % Running inner head for
                                                %   whole manual

% Contents
% --------

\outerhead{{\large\bf CONTENTS}}             % Outer head for contents
\pagenumbering{roman}                        % Lower case roman page numbers
\middlefoot{\thepage}                        % Contents page numbers centred

\tableofcontents    
\listoffigures    
\listoftables  
\cleardoublepage


% Main text
% ---------

\middlefoot{ } \outerfoot{{\bf\thepage}}     % Body of manual has bolded page
                                             % numbers at outer edges


%----------------------------------------------------------------------------


\chapter{\bf Introduction}
\label{chap:intro}
\outerhead{{\large\bf Introduction}}
\pagenumbering{arabic}                       % Arabic page numbers hereafter

{\em This introduction is intended for observers new to UES. Observers familiar
with UCLES or similar spectrographs under multi-computer control will
recognise many aspects of the discussion.}


\section{The Utrecht Echelle Spectrograph UES}


UES~(fig~\ref{fig:UESschematic}) is part of an {\em observing system}
for high-resolution spectroscopy over the wavelength range 3000 to 11000 
\AA .
Highest-level control of this observing system is intended to be from the
observer's terminal, by means of simple yet powerful commands in Instrument
Control Language (ICL). These 
initiate sequences of commands at several lower levels, finally moving the
optical hardware, controlling exposures and manipulating the data. All the
necessary auxiliary systems (such as the telescope and detector) are also
under ICL control, so that the user need not know the constituent parts of
the system in intimate detail, but can control them globally, in ways that
are logical to a {\em system} user. Although such highest-level control
will probably never be perfect, and ad-hoc or makeshift actions at lower
levels will often be necessary, the visiting observer should start by
considering the system as one organic whole, and only descend to lower
levels as necessary. 


There are several {\em aspects} to the UES system, which will be covered 
separately in this introduction.


\subsection{Optics}


The optical function is the core of the system and the reason for its 
existence. All supporting systems are derived from the optical 
requirements. The optical system may be summarised as follows: 
\begin{center}
{\bf One 
of the Nasmyth foci of the alt-azimuth WHT is dedicated to the 
cross-dispersed echelle spectrograph UES and its supporting facilities.} 
\end{center}

The light path comprises:

\begin{enumerate}
\item
WHT primary, secondary, Nasmyth flat. These are always in the beam.

\item
Image (de)rotator, to control by computer the orientation of the slit
projected on to the sky. This unit may be mounted or removed during the
day. It must be present for extended sources; it must be absent for
polarimetry (planning of this is still in a very early stage); for other
applications, the trade-off is between ease of operation and throughput.
Acquisition and guiding is not yet implemented without the derotator. \\
{\em As of Jan 1994 UES is always used WITH the derotator}

\item
Nasmyth Acquisition and Guiding unit (A\&G), always present, comprising the 
following computer-controlled functions:

\begin{itemize}
\item
Acquisition and guiding facilities (manual and/or automatic, object itself 
or offset)

\item
Calibration light injection

\item
Filtering (wavelength band, neutral attenuation, polarisation)

\end{itemize}

\item
UES itself, comprising the following computer-controlled functions:

\begin{itemize}

\item
Slit unit:

\begin{itemize}

\item
adjustable slit width

\item
adjustable slit length (Dekker masks on a slide)

\item
adjustable slit orientation (limited range; for aligning a selected
spectral order with the CCD columns) 

\end{itemize}

\item
Shutter

\item
Collimator (choice of UV or standard; focus)

\item
Hartman shutter for focusing the collimator

\item
Cross-dispersion prisms (to separate echelle spectral orders horizontally) 

\item
Echelle grating  for high spectral dispersion vertically (choice
of 2 echelles for optimal trade-off between spectral coverage and sky
subtraction; 2 angle adjustments for optimisation of the portion of the 
spectrum recorded by the detector) 

\end{itemize}

\item
Camera (folded Schmidt type)

\item
Detector (choice of CCD or IPCS-II, but changes must take place during
daytime) 


\end{enumerate}


In routine use from the observer's terminal, UES is configured for the 
desired observation, the telescope is pointed to the desired object, the 
object is centred and (auto)guiding is started. After calibration 
exposure(s), science exposure(s) and more calibration exposure(s), the 
observational sequence is complete and the next object is tackled. The 
digital images will have been saved for later reduction, but can also be 
inspected by quick-look facilities. 

The format of a UES spectrum (and the portion of it recorded by the 
detector) are shown in fig.~\ref{fig:echellogram}. 

Polarisation facilities do not exist as yet but are planned, {\em for
point sources only}. For such observations the derotator will have to be
removed from the beam and a polarisation module will have to take its
place. A polarisation model of the WHT Nasmyth optical train will have to
be developed as part of polarisation commissioning. All of this is
technically feasible, but will take time and effort to implement. 



\subsection{Mechanics}

WHT is an alt-azimuth telescope with overall pointing accuracy better than 
1.5 arcsec (provided the telescope model for the relevant focal position
has been updated sufficiently recently). The optics support structure is
mechanically decoupled from the coarser mechanical structure (`Nasmyth
platform') used for electronic cabinets, handling equipment, and personnel.
WHT Nasmyth instruments are mounted on `instrument support pads', which
form part of the optics support structure of the telescope.

UES, its camera and detector, and the dedicated A\&G, are all mounted on an
optical table, which is kinematically supported on a steel frame, which in
its turn is rigidly bolted to the instrument support pads (steel on steel,
no thermal effects). The fixed point of the 3-point kinematic support is
below the UES slit. The image derotator is also, but separately, connected
to the WHT optics support structure. These arrangements ensure that the
whole optical system can perform operationally {\em as a single system,} to
the limits of the design of its constituent parts; the observer merely
verifies that WHT delivers a good image to the slit and can take for
granted that UES turns that image into a spectrum which the detector and
subsequent computers record for posterity. 

All the electronics, and (for the time being) the temperature control unit, 
are mounted on the `Nasmyth platform'; this arrangement isolates the optics 
from vibrations such as produced by the temperature control unit. The
optical table is within a constant-temperature enclosure, to obtain
sufficiently stable conditions for proper operation of the spectrograph
(cf. the traditional Coud\'{e} room for older high-resolution
spectrographs). The camera, detector and the A\&G unit are outside the
constant temperature enclosure, for reasons of accessibility, but are
supported by the optical table through the walls of the enclosure. Where
necessary, invar has been used in the camera and A\&G unit, to preserve
mechanical fidelity under slowly-drifting ambient temperature. 

The UES thermal enclosure and the calibration light facility of the A\&G 
have slacker tolerances on positional stability and are bolted to the 
support frame, i.e. are more or less directly supported by the instrument 
support pads. 



\subsection{Control hierarchy}


The aim in the design of the control system has been to allow the observer 
(eventually) to control the entire observing machine from a single 
terminal (aided by displays such as TV, autoguider, MIMIC and DMS). To
avoid complex interactions of unrelated parts of the system, a hierarchical
design was imperative; this is mainly reflected in the software, but also
in lower levels of the hardware. 

To allow all parts of the system to communicate with each other when 
necessary, an Ethernet system runs through the entire 
electro-mechano-optical complex. Source and destination of each message are 
identified within the messages and each local device uses only the messages 
meant for it. Wherever there is a concentration of devices to be served
(controlled or read out), a Network Interface Unit (NIU) picks up the
messages intended for up to 4 local subsystems. The NIU extracts the bare
message and passes it to a local microprocessor for further attention. Such
a local microprocessor may be the Telescope Control Computer (TCS), a
detector controller, a 4MS system controlling an instrument (or an A\&G),
or a powerful controller for the Autoguider (....) or Data Memory System
(DMS). Some of these systems (such as a 4MS) control still lower levels of
`intelligent' microprocessor control (such as Stepping Motor Drive Module
SMDM, Barcode Reader Module BCRM or a UES Standard Electronic Control Unit
SECU), which control the opto-mechanical assemblies either directly or
through still lower levels of control such as dedicated motor control
chips. In other cases (such as the Nasmyth A\&G and TAURUS), the 4MS system
directly controls electronic hardware which in turn contains the basic
motor control in hardware form (digital and analogue servos with integrated
encoders which are not accessible to the software). 

This Ethernet structure emphatically does not include a hardwired 
hierarchy: any subsystem can in principle control the others. So at the 
levels of Ethernet and above, the software must define the hierarchy. Below 
the NIU's, the hierarchy is mostly hardwired.


Since the hardware is from different sources (DEC, RGO, Dwingeloo, Utrecht
and Roden, to name a few prominent in UES), unity of results must be
imposed at some level. Ethernet messages must conform to a certain
protocol, and the several 4MS systems also work mainly with standard
hardware selected by RGO and use RGO's standard basic kernel. Below the 4MS
systems, individual preferences and equipment demands run riot, above the
NIU's the reign of Ethernet and the VAXes is supreme. 

However the hardware is implemented, the principle of hierarchical control
is always to start an action, then forget about it at the initiating level 
until the next level down signals its completion. At that point, a status 
variable is updated in the initiating system, so that the level above can, 
by a simple `read status' message, find out what state the system is in;
while a device or system is in transit from one well-defined state to
another, its status is `undefined'. The MIMIC display shows the observer 
what the recorded state is of each component of interest to him (green for 
a well-defined state, white for undefined, red for error). At the very 
highest control level (ICL), the aim is that the observer can use a
single command for the equivalent of such sequences as: {\em Configure UES
according to table x, the CCD window and binning according to table y,
point the telescope to NGCnnnn (from catalogue abc), set the UES slit
position angle to $\theta$ on the sky, centre the object for maximum
detector output, find the nearest star brighter than magnitude m and lock
on to it for autoguiding. When all of this is properly set up, start a
20-minute exposure and, 5 minutes before its end, sound the buzzer in the
coffee room. Oh yes, calibration spectra both before and after NGCnnnn,
please; use the lamp which is most suitable for my spectral region. Data to
be displayed on the DMS for as long as this does not interfere with the
next exposure, and also saved on disc. Quick-look reduction; observer
control of the observing sequence to do repeats on failed or especially
interesting exposures.} 


If this were all that observers needed, monolithic control from a single 
computer would in theory be possible (though distinctly unfriendly to 
service-technicians). However, other observers want sequences of exposures 
for polarimetry or time-variability, or an automatic telescope focus test, 
or the same signal-to-noise for objects of different brightness, etc etc. 
The control hierarchy has been designed to cater for all of these 
situations and many more that are still dormant in future observers' minds.
The system of status variables, available on demand to the next level up,
allows construction of simple commands performing complex sequences of
actions at the next lower level, of the type: `Start this, wait for it and,
if successful, start that and wait again'. This works fine (though slowly),
until an error condition develops; in that case, the error information must
propagate all the way to the observer (unless an intermediate level of
control has been programmed to correct the error and put the system back on
to the rails). 

Observers will appreciate that, even when the hardware is installed and has 
proved reliable, the complex sequences at the behest of ever changing 
observers require a substantial amount of programming at a number of levels 
in the hierarchy; this is the price one pays for present and future
flexibility. Since, for historical reasons, the languages (or dialects) 
in the computers are mostly different, arranging for a new top-level 
application to be automated requires many months of hard labour. Therefore, 
observers who wish to do state-of-the-art observational work have no option 
but to assist in a continuing task force which repeatedly reprogrammes
parts of the system; they must be prepared to help out wherever a vacancy
threatens and they must be prepared to use temporary fixes at some lower
level of control than the observers' terminal. More pedestrian observers,
who are happy to do large projects after the bugs have been taken out, can
skip the rest of this section on control. It is for the would-be
state-of-the-art observers that the control hardware and software is
summarised below. 



\subsubsection{Hardware}


Bearing these generalities in mind, it is now profitable to examine figs 
~\ref{aaa} to ~\ref{bbb}, which represent the hardware of the control 
hierarchy of the UES-related installation.

The observers' terminal and MIMIC display are peripherals of a VAXstation,
which communicates over Ethernet and NIU's with the TCS telescope control
computer, with the UES/A\&G 4MS, with the Autoguider processor (and its CCD
controller), with the science-detector controller, and with the DMS and its
link to the data reduction computer. Separate direct fast data links exist
from detector controllers to the computers receiving the data (Autoguider
and DMS). There is also a separate TV facility from the A\&G (camera) to
the observer in the control room (display), and a DECnet connection between
the observers' VAXstation, the reduction VAX and the DMS processor. 
To add to the confusion, the VAXstation runs WINDOWS, allowing
the observer to run several concurrent tasks in different computers from
one terminal. 

At the next level down, the following computers control more mundane 
details:

\begin{itemize}

\item
The TCS controls telescope motors, hydraulic bearings, etc from information 
it revceives from encoders, pressure gauges and such, through a CAMAC 
installation (interface electronics which is largely computer-independent). 
Error signals derived by the autoguider computer from centroiding on the 
image of the star selected for autoguiding feed into the TCS to preserve 
tracking fidelity under changing (atmospheric and other) conditions. The 
TCS also controls the image derotator and the dome.

\item
The UES and its A\&G are controlled by a single 4MS system (figs~\ref{ccc} 
and~\ref{ddd}), 
respectively through local SECU processors and hardwired electronics (both 
of which allow the 4MS to start an action and forget it until it is 
complete)

\item
CCD controllers for the science and autoguider CCD's set up and generate
the timing sequences of the voltages required by those detectors. 

\item
The Autoguider computer accepts the CCD image on the data input, analyses
it for star position and derives the error signals, which are combined with
known probe position (available from the A\&G 4MS) and fed to the TCS to
correct telescope tracking to obtain a stationary star image on the CCD. 

\item
The DMS processor examines the data in the Data Memory according to the 
observer's commands (histogram, x-cut, y-cut, centroid, etc) and controls 
the extent and order of transfer of the data to the reduction computer.


\end{itemize}


Each of these lower-level processors has its own repertoire of
instructions; 2 sources generate most of these instructions:

\begin{enumerate}

\item
The Ethernet input

\item
The processor's operator terminal (not to be confused with the observer's
terminal, which is a peripheral of the VAXstation); such operator terminals 
are generally stationed in the control room, but can be used at the 
location of the processor for tests. 

\end{enumerate}

Generally 1) is used during hierarchical control and responses are returned 
over Ethernet, while 2) is used for engineering tests. However, 2) has a 
command to simulate Ethernet messages and an experienced operator (support 
astronomer in some cases) can use the local terminal to save the day when 
connections fail {\em (even in normal operation, telescope and autoguider
control, and DMS operations are often done this way by preference; this is
extremely confusing to the novice observer, but in practice it can be the
most efficient way of coaxing results from the installation, given the
presence of a highly-skilled support astronomer and/or telescope operator;
it should never be the end-point of development, as it is far too
failure-prone for comfort and is expensive in that it involves
highly-skilled support staff rather than the observer himself).} 


At lower level still, BCRM, SMDM or SECU processors again have their 
repertoires of instructions and responses, but communicate over RS232 or 
similar lines with the controlling 4MS. They do not usually have an 
operator's terminal, but the controlling 4MS can be set to be transparent, 
so that the 4MS operator's terminal can perform this task.

Documentation exists for most of the processors mentioned. The observer 
should not need any of these, except when he gets involved in setting up 
new observing modes.

The more reliable the lower levels are, the higher the level of integration 
at which the installation can operate successfully. Hence commissioning
always starts with simple functions at the very lowest level and includes
the fidelity of error-reporting to the next level up. After careful
verification at several levels, the observer can reliably control all
elements of the system using ICL from his one terminal (that is, without
using WINDOWS for transparent connections to other computers in the system,
which would be cheating). Only then is it possible to set up sequences of
commands in Control Files, to be processed by the observing system in
`batch' mode, with the observer merely monitoring it all. Once this stage 
is reached, true remote observing can be contemplated for the more routine 
observing programmes; as indicated, we have not yet arrived at this point
by a long way (and such observing will always depend heavily on preventive
maintenance by site staff). 



\subsubsection{Software}


The top levels of the software run on the observer VAXstation, as tasks 
started up under the ADAM real time monitor (which is programmed in 
FORTRAN, has FORTH-like structures incorporated and runs under 
VMS/Windows).

The high level ICL commands (or sequences of ICL commands executed as 
ICL command files) are passed to the ADAM Cd and D tasks (one 
Cd task for the complete facility, plus one D task for each local processor 
involved). These ADAM tasks, after checking the formal existence of the 
command, its syntax and the parameter range, translate it into the string 
required by the destination microprocessor. The D task adds Ethernet code 
for source and destination, and passes it to the NIU for transmission. 
After Ethernet transmission, the destination NIU extracts the bare message 
and passes it to the required local controller (4MS or such). After more 
syntax and parameter checking, the local controller activates the mechanism 
hardware in one way or another, and monitors for completion. During all 
this time, the VAXstation, through its MIMIC task, shows the component 
status as `undefined' (i.e. in white, at the old or an intermediate 
position) on the MIMIC screen (any explicit `immediate status 
request' at this stage will also return `undefined' status and have the
same effect on the MIMIC screen). 

The usual practice is for the D task to issue a `delayed status request' 
for the component with every `move' or `initialise' command. This causes
the local controller to return an Ethernet status message, but not until
{\em after the component has arrived at its target}. The NIU and D task
pick up this status return, the Cd task updates the component status in its
table and the MIMIC task detects this status change, causing it to show the
component in green on the MIMIC screen, at its new position. 

All of this is in asynchronous operation, the process will take as long as 
is necessary for the mechanism concerned (plus an overhead of seconds for 
all the message-passing). All mechanisms or functions in all local 
controllers are accessible simultaneously, subject to traffic density on 
Ethernet. Any errors detected (such as timeout or communication error or 
parameter out of range) are reported all the way up, ending with the 
component shown in red on the MIMIC screen; an `immediate status request' 
at that point will usually inform the observer about the nature of the 
error (though not always about its cause).

Where speed is critical, there are special solutions, in hardware or in
software. However, the above is the basic principle and it works, for those
who are prepared to wait. The price of flexibility is sluggishness, but
much of the `lost' time is recovered by the observer-proofness of the
whole arrangement.


Most of the local controllers work in one FORTH dialect or another; this 
makes them powerful and fast, but the programmes are difficult to read and 
service. One hopes never to have to reprogramme 4MS, SMDM, Autoguider VME, 
CCD controller and such; this would require inhuman foresight on the 
part of their designers and in fact modifications are needed every few 
years as new applications emerge from development. For ease of adaptations, 
the software in most of these systems is based on a table of permitted 
functions and parameters, and a status array which faithfully reflects the 
real-life equipment. An excellent description of this RGO FORTH kernel is 
to be found in the ISIS 4MS manual ER 422.


\subsection{State of the Union}

The operational union of WHT, UES, A\&G, detectors and software is, at the 
time of writing, good---users express themselves happy with 
the facility and demand for bright time has now increased to the same level of 
oversubscription as demand for dark time. One exception in this happy state 
of affairs is the field size of the autoguider and slitviewer options; an 
enhancement is now being implemented, which will produce a more practical 
field of view, at the expense of (ultra-)violet capability of this 
subsystem.


{\bf The operational stability of UES itself over 12 hours of normal observing
has been found to be of order 0.01 \AA ~or 0.6 km/sec.} This result is the
best tribute imaginable to the basic soundness of the system design, which
in turn dictated the mechanical structure. Use of the calibration light
system allows effective stability over an entire observing run to be
determined by the residual drifts over say 30 minutes or less; to make full
use of the calibration facilities for the most stringent applications,
lamps can be allowed to stabilise before a calibration exposure is started
(observer-controlled shutter associated with each lamp). 


Basic ICL control and MIMIC feedback seem to be reliable, but observer
control by ICL procedures is in its infancy. 
During the next few years, a substantial
improvement in this area may be expected, with resultant huge increases in
observer efficiency for routine applications. 


\section{Scope of this manual}

This manual describes the design, operation and performance of the 
Utrecht Echelle Spectrograph (UES). 

The manual starts with a quick reference section, Part~\ref{chap:quickref},
which contains summaries of command lists and useful numbers.
This section is for people who are familiar with the instrument,
but need to refresh their memories.

The manual then goes on to describe the UES observing system in more
detail. This observing system can (somewhat arbitrarily) be divided 
into the following sub-systems:

\begin{itemize}
\item The telescope
\item The derotation optics
\item  The A\&G unit
\item The spectrograph
\item The detectors
\item Data acquisition
\item Data reduction
\end{itemize}

Parts~\ref{chap:spectrograph}, \ref{chap:derotator} and \ref{chap:NAG} 
of this manual describe the design and general
principles of operation of the three sub-systems listed above which 
are specific to UES: the spectrograph itself, the derotation optics 
and the A\&G unit. The telescope and detector sub-systems are in 
common to all WHT instruments, and have their own user manuals. 

Part~\ref{chap:performance} describes the overall performance of the 
spectrograph.

Part~\ref{chap:operation} describes in more detail how the observing system
is set up and used for routine observing. Part~\ref{chap:setup} describes
diagnostic and setup procedures.

Part~\ref{chap:UEScmd} is a reference section specifying 
in detail the ICL commands used to operate the UES and its A\&G. The 
commands for the other useful subsystems (telescope and detectors)
are not listed here, further details can be found in the following
manuals (copies of which can be obtained from Bill Martin at RGO--Cambridge):
elsewhere:

\begin{itemize}
\item The La Palma---Isaac Newton Group---Observers Guide (1994)
\item The WHT Users Manual (1994)
\item The WHT Autoguider User Manual (1993)
\item The WHT Data Acquistion System Manual (1993)
\item The IPCS-II User Manual
\end{itemize}



Part~\ref{chap:echwind} briefly describes the UES planning software 
whilst Part~\ref{chap:datared} describes the software available
for reducing UES data.

Part~\ref{chap:datared} gives a brief summary of the STARLINK 
supported {\sc echomop} package for the reduction of UES echelle data.


\section{Obtaining copies of this manual} 

This manual has been prepared using {\LaTeX}. A copy of the current
source is held on the La~Palma VAX cluster (SPAN node LPVS5 29146 or 
internet address lpve.ing.iac.es) in directory {\tt
[MANUALS.WHT\?UES]}, along with its associated rasterized file,
    {\tt UES\?USER.DVI-CAN}. New copies of the manual may be printed out using: 
%
\begin{list}{$\bullet$}{\setlength{\itemsep}{-0.5mm}\setlength{\topsep}{0mm}}
 \item  {\tt WHT\?GLASE DISK\$USER1:[MANUALS.WHT\?UES]UES\?USER.DVI-CAN} or
 \item  {\tt INT\?GLASE DISK\$USER1:[MANUALS.WHT\?UES]UES\?USER.DVI-CAN},
\end{list}
%
(to give output on the laser-printers in the WHT and INT buildings,
respectively). A copy is also held on the STARLINK VAXcluster at 
RGO Cambridge, in
the directory {\tt CAVAD::DISK\$USER1:[MANUALS.WHT\?UES]}.

After 01--April--1994, the CAVAD cluster will be closed and the manual will 
be transferred to  {\tt GXVG::DISK\$USER1:[MANUALS.WHT\?UES]}

Additionally the manual is held on-line, accessible to GOPHER users --- 
gopher to ing.iac.es and the manual is held in Telescopes/WHT/UES


\section{Other documentation} 

The present manual is designed to be the main reference for the
operation of UES and its A\&G unit. Observers will also need to 
refer to the WHT Users manual for information on the operation of
the telescope, and the WHT data acquisition system manual 
for information on operation of the detectors. Further
background information may be found in the {\it Observers' Guide} 
(1994 edition).  

\section{Getting help}

In case of difficulty, consult your Support Astronomer or Duty 
Technician. More specialist advice may be obtained from Nic Walton 
(naw@lpve.ing.iac.es) or Max Pettini (pettini@mail.ast.cam.ac.uk). 

\section{Notation}

The following conventions for computerese have been used more-or-less
consistently throughout this manual: 
%
\begin{list}{$\bullet$}{\setlength{\itemsep}{-0.5mm}\setlength{\topsep}{0mm}}
 \item  Examples of commands entered at the terminal are in typewriter font:
        {\tt USLITWIDTH 50}, as are messages from the computer;
 \item  Angle brackets denote parameter values or character strings:
        {\tt $<$angle$>$};
 \item  Square brackets denote optional input \eg\ {\tt [x,y]}; all other 
        parameters are obligatory;
\end{list}




\vfill
\eject




%----------------------------------------------------------------------------


\chapter {\bf Quick reference section}
\label{chap:quickref}  
\outerhead{\large\bf QUICK REFERENCE}

\section{Useful numbers}

\begin{table}[hbt]
\begin{center}
\caption[UES plate scales]
{UES plate scales (see sec~\ref{sec:plscales})}
\begin{tabular}{lll}
\\
                                 & Without   &   With \\
                                 & derotator & derotator\\
                                 &           &          \\
Scale at slit (arcsec/mm)        &   4.51    &  4.44    \\
Scale at detector (arcsec/mm):   \\
\qquad Spatial direction         &   15.20   & 14.96    \\
\qquad Spectral direction        &   23.63   & 23.26    \\
\end{tabular}
\end{center}
\end{table}

\begin{table}[hbt]
\begin{center}
\caption[UES resolving power and velocity resolution]
{UES resolving power and velocity resolution 
(see sec~\ref{sec:detres})}
\begin{tabular}{lllllll}
\\
Detector & Spatial    & Resolving & Velocity  & \multicolumn{3}{c}{Wavelength}\\
   & resolution & power    & resolution & \multicolumn{3}{c}{resolution ( \AA )}\\
   & ($\mu$m)   &       &  (km~s$^{-1}$) & 3000 \AA & 6000 \AA & 10000 \AA \\
\\
EEV CCD   &   45       & 52,000    &  5.77  & 0.058    & 0.115    & 0.192  \\
Tek CCD   &   48       & 49,000    &  6.12  & 0.061    & 0.122    & 0.204  \\
IPCS-II   &   30       & 78,000    &  3.85  & 0.038    & 0.077    & 0.128
\end{tabular}
\end{center}
\end{table}

\begin{table}[hbt]
\begin{center}
\caption[Interorder spacing with UES echelles]
{Interorder spacing with UES echelles (see sec~\ref{sec:gratchoice})}
\begin{tabular}{lcc}
\\
Wavelength &  \multicolumn{2}{c}{Interorder spacing (arcsec)}\\
 (\AA)     &   \multicolumn{2}{c}{(arcsec)} \\
           & 31.6 echelle &   79.0 echelle \\
           &              &         \\
3000       &     17       &    43   \\
3500       &     14       &    34   \\
4000       &     12       &    29    \\
5000       &     9.3      &    23    \\
6000       &     8.1      &    20    \\
7000       &     7.5      &    19    \\
8000       &     7.5      &    19    \\
9000       &     7.8      &    20    \\
10000      &     8.6      &    22    \\
11000      &     9.6      &    24              
\end{tabular}
\end{center}
\end{table}

\begin{table}[hbt]
\begin{center}
\caption[UES matched slit]
{UES matched slit (see sec~\ref{sec:mslit})}
\begin{tabular}{llll}
\\
Detector         & Spatial    &  \multicolumn{2}{c}{Matched} \\
                 & resolution &  \multicolumn{2}{c}{slit}     \\
                 &  $\mu$m    &   $\mu$m      & arcsec       \\
\\
EEV CCD          &  45        &   236         &    1.05    \\
Tek CCD          &  48        &   252         &    1.12    \\
IPCS-II          &  30        &   157         &    0.70
\end{tabular}
\end{center}
\end{table}

\begin{table}[hbt]
\begin{center}
\caption[Autoguider mirror options]
{Autoguider mirror options (see sec~\ref{sec:AGlight})}
\begin{tabular}{lccc}
\\
Autoguider &  Unvignetted field & Partially vignetted    &  Field at reflected\\
mirror     &  diameter at slit & field diameter at slit   &  focal plane  \\
position   &     (arcsec)     &      (arcsec)            & (arcsec$^2$)  \\
\\
GUIDEONLY  &      0           &      0     \\
POINTSOURCE &     18          &    170      \\
SHORTSLIT   &     73          &    213       \\
LONGSLIT    &     161         &     271       \\          
CLEAR       &     161         &     271               
\end{tabular}
\end{center}
\end{table}

\begin{table}[hbt]
\begin{center}
\caption[Telescope and autoguider focus]
{Telescope and autoguider focus (see~\ref{sec:telfoc}})
\begin{tabular}{lcc}
\\
Date       & Telescope    & Autoguider    \\
           & focus        & focus         \\
11/2/92    &     101.65   &    180        \\
21/12/93   &     ??       &     ??           
\end{tabular}
\end{center}
\end{table}


\vfill
\clearpage


\section{Filter wheel contents}

\begin{table}[hbt]
\begin{center}
\caption[Main beam colour filters]
{Main beam colour filters (see sec~\ref{sec:mbeam})}
\label{tab:mainfiltc}  
\begin{tabular}{lllll}
\\
Usual      &  Name    &  Thickness \\
position   &          &    (mm)   \\
\\
1          &  Empty   \\
2          &  UG11   &     3.5      \\         
3          &  UG1    &     3.5     \\
4          &  BG28   &     2.5     \\
5          &  BG38   &     2.5     \\
6          &  GG385  &     3.5     \\
7          &  GG420  &     3.5     \\
8          &  GG495  &     3.5     \\
9          &  OG590  &     3.5     \\
10         &  RG715  &     3.5     \\
11         &  RG830  &     3.5     \\
\end{tabular}
\end{center}
\end{table}

\begin{table}[hbt]
\begin{center}
\caption[Main beam ND filters]
{Main beam ND filters (see sec~\ref{sec:mbeam})}
\label{tab:mainfiltnd}  
\begin{tabular}{lll}
\\
Usual      &  Name    &  Thickness \\
position   &          &    (mm)   \\
\\
1          &  Empty   \\
2          &  ND0.4  &     2.2     \\         
3          &  ND0.8  &     2.2     \\         
4          &  ND1.2  &     2.2     \\         
5          &  ND1.6  &     2.2     \\         
6          &  Empty    \\         
7          &  ND2.0  &     2.2     \\         
8          &  ND2.5  &     2.2     \\         
9          &  ND3.0  &     2.2     \\         
10         &  ND3.5  &     2.2     \\         
11         &  ND4.0  &     2.2     \\         
\end{tabular}
\end{center}
\end{table}


\begin{table}[hbt]
\begin{center}
\caption[Autoguider filters]
{Autoguider filters (see sec~\ref{sec:abeam})}
\label{tab:autofilt}  
\begin{tabular}{llc}
\\
Usual      &  Name    &  Bandpass \\
position   &          &    (nm)   \\
\\
1          &  RG9    & 1000 -- CCD cutoff \\
2          &  ND0.5  &  \\         
3          &  ND2.0  &  \\
4          &  RG610  &  610 -- CCD cutoff \\
5          &  GG455  &  455 -- CCD cutoff \\
6          &  ND3.0  & \\
7          &  Clear  &  Everything         \\
8          &  VG9    &  470 -- 580 \\
9          &  ND5.0  &  \\
10         &  BG28   &  350 -- 515 \\
11         &  UG11   &  300 -- 380 \\
12         &  BK7    &  380 -- CCD cutoff \\
\end{tabular}
\end{center}
\end{table}

\begin{table}[hbt]
\begin{center}
\caption[Comparison unit colour filters]
{Comparison unit colour filters (see sec~\ref{sec:cbeam})}
\label{tab:compfiltc}  
\begin{tabular}{ll}
\\
Usual      &  Name    \\
position   &          \\
\\
1          &  FG15  \\
2          &  FG13  \\         
3          &  RG6   \\         
4          &  UG3+GG475   \\         
5          &  RG780  \\         
6          &  KG5  \\         
7          &  LB120  \\         
8          &  FG3  \\         
9          &  512  \\         
\end{tabular}
\end{center}
\end{table}

\begin{table}[hbt]
\begin{center}
\caption[Comparison unit ND Filters]
{Comparison unit ND filters (see sec~\ref{sec:cbeam})}
\label{tab:compfiltnd}  
\begin{tabular}{ll}
\\
Usual      &  Name    \\
position   &          \\
\\
1          &  ND0.5  \\
2          &  ND1.0  \\         
3          &  ND1.5  \\         
4          &  ND2.0  \\         
5          &  ND2.5  \\         
6          &  ND3.0  \\         
7          &  ND3.5  \\         
8          &  ND4.0  \\         
\end{tabular}
\end{center}
\end{table}

\vfill
\clearpage

\section{Command list}

\begin{table}
\caption[The ICL commands normally used for operating the UES and A\&G]
{The ICL commands normally used for operating the UES and A\&G are listed
(see also sec~\ref{sec:})}
\begin{center}
\begin{tabular}{lll}
Command    & Parameters   &   Meaning \\
                                      \\
{\tt UMIRROR} & CLEAR/GUIDEONLY/POINTSOURCE/  & Move autoguider mirror   \\
           & LONGSLIT/SHORTSLIT/ULAMPS     &                          \\
{\tt UAGX}    & 0--73600   & Set X coordinate of autoguider probe \\
{\tt UAGY}    & 0--73200   & Set Y coordinate of autoguider probe \\
{\tt UAGXY}   & 0--73600 0--73200 & Set X,Y coordinates of autoguider probe \\
{\tt UAGFOC}  & 0--200      & Set focus of autoguider probe \\
{\tt UAUTOFILT}  & 1--12 or name & Select autoguider filter \\
{\tt UTVVIEW}    &               & View field using TV \\
{\tt UENDTVVIEW} &           & Resets slit angle and dekker after using TV \\
{\tt UPROBEVIEW} &               & View field centre using coarse probe \\
{\tt ULAMPS}     & name or off   & Turn comparison lamps on or off \\
{\tt ULAMPSHUT}  & name or close & Opens or closes lamphouse shutters \\
{\tt UCOMPFILTND} & 1--12 or name & Select comparison lamp ND filter \\
{\tt UCOMPFILTC} & 1--12 or name & Select comparison lamp colour filter \\
{\tt UFILTPOL}   & 1--11 or name & Select main beam polariser \\
{\tt UFILTND}    & 1--11 or name & Select main beam ND filter \\
{\tt UFILTC}     & 1--11 or name & Select main beam colour filter \\
{\tt USLITANGLE} & --12000--11400  & Set slit angle (mdegs)  \\
{\tt USLITWIDTH} & value ARCSEC/MICRON/PIX & Set slit width \\
{\tt USLITSHUT}  & OPEN/CLOSE & Open or close slit shutter \\
{\tt USLITLEN}   & value ARCSEC/MM/PIX     & Set slit length \\
{\tt UCOLL}      & UV/WIDE        & Select collimator \\
{\tt UFOCUS}     & 0--20000       & Set collimator focus \\
{\tt UHART}      & IN/OUT      & Moves Hartmann unit in/out of beam \\
{\tt UHARTPOS}   & UP/DOWN/LEFT/RIGHT & Position of Hartmann shutter \\
{\tt UCENWAVE31} & wavelength order  & Configures 31.6 echelle for wavelength \\
{\tt UCENWAVE79} & wavelength order  & Configures 79.0 echelle for wavelength \\
{\tt USLITOFF}   & value & Sets model offset to slit angle \\
{\tt UTHETAOFF}  & value MDEG/PIX   & Sets model offset to theta \\
{\tt UGAMMAOFF}  & value MDEG/PIX   & Sets model offset to gamma \\
{\tt UCAMSHUT}   & OPEN/CLOSE  & Open or close camera shutter \\
{\tt UPIXEL} & value1, value2 & Sets detector pixel size in x and y (microns) \\
{\tt UTEMP}      &             & Reads UES temperature sensors \\
{\tt UES\_INIT}  & mechanism   & Initialises mechanism \\
{\tt UES\_UPDATE} & mechanism & Reads status of mechanism \\
{\tt UES\_CANCEL} & mechanism   & Cancels ADAM action on mechanism 
\end{tabular}
\end{center}
\end{table}

\vfill
\eject


\begin{table}
\caption[ICL commands used for engineering purposes]{The following are
ICL commands used for engineering purposes only (see also sec~\ref{sec:})}
\begin{center}
\begin{tabular}{lll}
Command    & Parameters   &   Meaning \\
{\tt UAUTONAME}  &              & Set names of autoguider filters \\
{\tt ULAMPNAME}  &              & Set names of lamps \\
{\tt UCNNAME}    &              & Set names of comparison ND filters \\
{\tt UCCNAME}    &              & Set names of comparison colour filters \\
{\tt UFPNAME}    &              & Set names of main beam polarisers \\
{\tt UFNNAME}    &              & Set names of main beam ND filters \\
{\tt UFCNAME}    &              & Set names of main beam colour filters \\
{\tt UNAMES}     &              & Set all component names \\
{\tt UEXPOSE}    & 1500--640000  & Open slit shutter for specified time \\
{\tt UDEKKER}    & 0--123530    & Set position of dekker \\
{\tt UMODLENS}   & 1--7 or name & Moves focal modifier lens wheel \\
{\tt UFMNAME}    &              & Sets names of focal modifiers \\
{\tt UPRISMPOS}  & 0--2400      & Set prism position \\
{\tt UECHELLE}   & E31/E79      & Select echelle \\
{\tt UTHETA31}   & $-$2500--2500 & Set theta for 31.6 echelle \\
{\tt UTHETA79}   & $-$2500--2500 & Set theta for 79.0 echelle \\
{\tt UGAMMA31}   & --2290--2290 & Set gamma for 31.6 echelle \\
{\tt UGAMMA79}   & --2290--2290 & Set gamma for 79.0 echelle \\
{\tt UCAMLAMP}   & OFF/ON1/ON2  & Turns camera LEDs on or off \\
{\tt UPINMASK}   & IN/OUT       & Moves pinhole mask shutter 
\end{tabular}
\end{center}
\end{table}


\chapter {\bf The Utrecht Echelle Spectrograph}
\label{chap: spectrograph}  
\outerhead{\large\bf THE SPECTROGRAPH}

\section{Design}

\subsection{Overview}

 The design of the Utrecht Echelle Spectrograph is identical to that 
 of the spectrograph built at University College London for the f/36 
 coud\'{e} focus of the Anglo-Australian Telescope, apart from unavoidable 
 differences arising from the different focal ratios at the two telescopes. 
 This section summarises the basic design parameters of the spectrograph.
 A discussion of the design philosophy is given by Walker \& Diego {\it 
 (Monthly Notices of the Royal Astronomical Society, vol 217, p355, 1985)}.

 The layout of the spectrograph is shown in Fig.~\ref{fig:UESschematic}. 
 The slit S is at the 
 focal plane of the telescope. The light from the slit image (beam a) is 
 collimated (beam b) by an off-axis parabolic mirror C,  and traverses the 
 three cross-dispersing quartz prisms P1, P2 and P3 before beam c is incident 
 on the echelle E. L1, L2 and L3 are focal modifying lenses for varying the 
 degree of overfilling of the grating. The axes of beams a, b and c are 
 horizontal. The light is dispersed in the vertical plane (beam d) by the 
 echelle (beam d) and is finally re-imaged by the camera.

 The components of the spectrograph are assembled on an optical bench,
 which in turn is supported by the instrument mounting pads on the 
 camera, is contained within a thermal enclosure in order to maintain 
 it at a constant temperature.


\begin{figure}
\vskip 20cm
\caption[The Utrecht Echelle Spectrograph]{Schematic of the Utrecht 
  Echelle Spectrograph (UES).}
\label{fig:UESschematic}
\end{figure}


\subsection {Slit unit and dekker slide} 

   The UES slit has a maximum length of 67.3 mm 
   (5 arcmin), corresponding to the full field transmitted by the 
   Nasymth image derotation optics. The slitlength actually 
   used is defined by the dekker slide or by the autoguider 
   mirror (see section~\ref{sec:AGlight}).

   The slit width can be continuously varied between .02 and 20 
   mm (0.09 to 90 arcsec). 

   The entire slit assembly can be rotated by $\sim\pm$12 degrees.   
Note that the reason for rotating the slit assembly is {\em not}    to
change the PA of the slit on the sky; this is the function    of the
image derotation optics (see Part~\ref{chap:derotator}). The reason for
   rotating the slit assembly is that for a fixed slitangle, the slit  
 as projected on the detector will appear to rotate as a function of   
observing wavelength. It is therefore necessary physically to rotate   
the slit assembly in order to keep the projected slit aligned with   
the rows/columns of the detector.

   A shutter is mounted at the rear of the slit. This is a fast shutter,
   used for timing CCD exposures. The shutter used is a Prontor magnetic
   shutter E/100, with a specified maximum opening/closing time of
   34 msecs.

   At the front of the slit assembly is a dekker slide, which contains a 
   mask used to define the slit length. The dekker mask, usually referred
   to as the 'Concorde dekker' is illustrated in Fig.~\ref{fig:concorde}. 
   The shape of
   this mask allows the slitlength to be set to a high degree of accuracy
   over the range from 0.33 mm (1.5 arcsec) to 4.62 mm (20 arcsec), and
   a rather coarser setting of slitlength over the range from
   4.62 mm (20 arcsec) to 67 mm (5 arcmin).
   

\begin{figure}
\vskip 20cm
\caption[The UES dekker mask]{The UES dekker mask}
\label{fig:concorde}
\end{figure}


\subsection {Focal modifying lenses} 
\label{sec:modlens}

The focal modifier lenses were originally intended to be used 
to optimize the overfilling of the echelle for different  modes 
of operation, as discussed in detail by Diego \& Walker {\it 
(Montly Notices of the Royal Astronomical Society, vol 217, p347, 
1985)}\/.  In fact, {\em the poor performance of the lenses (see 
Appendix~\ref{app:modlens}) means that
there are no circumstances under which they would be of use, and
they have been removed from the instrument.}

\subsection {Collimators} 

   There is a choice of two collimators, one coated
   for the short wavelength region ($\lambda < 4000$\AA ) and one for 
   longer wavelengths ($\lambda > 4000$\AA ). They are off-axis paraboloids, 
   with a measured focal length for
   both collimators of 2359$\pm$0.5 mm and an off-axis
   distance of 295$\pm$0.5 mm, implying an off-axis angle of 7.18
   degrees. Space constraints mean that the instrument has in fact been 
   constructed assuming an off-axis angle of 7.39 degrees. The diameter 
   of the collimated beam is 215 mm in the absence of focal modifiers.

\subsection {Hartmann unit} 

  The Hartmann unit can be inserted into the spectrograph beam just
  in front of the collimator, in order to focus the spectrograph.
  The unit contains a mask which obscures half of the collimated
  beam; by rotating the mask it is possible to select which half
  of the beam is obscured (top, bottom, left or right). The 
  spectrograph can then be focussed using a Hartmann test as described 
in sec~\ref{sec:collfocus}.

\subsection {Cross-dispersing prisms} 

   Prisms were chosen as the cross-dispersing
   elements of the spectrograph for a number of reasons, one of which
   is that the inter-order separation is much less dependent on wavelength
   than in the case of a diffraction grating. The prisms are made of 
   extremely homogeneous fused silica (Corning 7940 fused slica class 2
   grade A), which transmits down to 3000\AA . This material is specified
   as having a refractive index homogeneity of 1$\times$10$^{-6}$.

   The prism size demanded by the optical design is beyond the limits of 
   current manufacturing technology. Therefore in order to provide sufficient 
   cross-dispersion, three smaller prisms are used in series, each of which 
   is composed of three smaller parts optically contacted together by means 
   of a UV transmitting fluid (Cargille matching fluid 06350).

   The layout and nominal dimensions of the prism assembly are summarised in
   Fig.~\ref{fig:UESprisms}.

\begin{figure}
\vskip 20cm
\caption[The UES prism assembly]{The UES prism assembly}
\label{fig:UESprisms}
\end{figure}

\subsection {Echelle grating} 

   A choice of two echelle gratings is provided,
   both supplied by Milton Roy (formerly a division of Bausch \& Lomb). 
   The gratings are the largest available, with a nominal ruled area 
   of 204$\times$408 mm. 

   The two gratings have different rulings (31.6 and 79.0 lines/mm) but have 
   the almost identical blaze angles (nominally 63.43 degrees). 
{\em This means that at a given wavelength the two 
   gratings give nearly the same spectral resolution.} This point is worth 
   emphasising, since it is very different from the situation
   with a conventional intermediate dispersion spectrograph (e.g. ISIS or
   IDS) using first order gratings. The choice of grating for UES is 
   determined not by the resolution required, but by the slitlength and 
   wavelength coverage required (see Section~\ref{sec:gratchoice} for more 
   detail).


\subsection {Camera} This is of folded Schmidt design with a field 
   flattener
   lens (Wynne, 1977. MNRAS, 180, 485). The camera
   design is illustrated in Fig.~\ref{fig:UEScamera}.

   The nominal focal length of the camera is 700 mm. The nominal
   field of view is 38.5$\times$18.8 mm; the effect of vignetting
    at larger field diameters is illustrated in Fig.~\ref{fig:vignetting}.
    It is
   important to note that the unvignetted field of
   view is smaller than many of the detectors used with the
   instrument; thus part of the detector area will be vignetted.
    
   Two LED's are mounted within the camera, facing the detector.
   These were originally intended as a source of undispersed
   light, for use in flatfielding the detector. A red LED is provided 
   for use with CCD detectors, and a green LED for use with the 
   IPCS-II. To date these LEDs are not routinely used, except for 
   occasional engineering purposes.

   Between the camera and detector are two shutters. One of the shutters
   is a safety shutter, which opens slowly but can close very quickly.
   This is used to protect the IPCS detector; if the IPCS is overilluminated,
   or the panic button is pressed, then the shutter will close. The
   other shutter mechanism was orignally intended to carry a 'pinhole
   mask'; this is a mask consisting of a pattern of holes on a regular
   grid. The idea was that using this mask in conjunction with the
   flatfielding LED would make it possible to project a set of reseau
   marks onto the IPCS detector, in order to map the geometric distortion.
   The mask has not been useful in practice, and the mechanism has
   been removed. (?)

\begin{figure}
\vskip 20cm
\caption[The UES camera]{The UES camera}
\label{fig:UEScamera}
\end{figure}

\begin{figure}
\vskip 20cm
\caption[Vignetting in the UES camera]{Vignetting in the UES camera}
\label{fig:vignetting}
\end{figure}

\subsection{Optical table}

   The UES is assembled on an optical table, supplied by Photon Control 
   Ltd. The table rests on a support frame, which in turn locates
   on the four instrument mounting pads on the Nasymth platform; the
   weight of the instrument (approx 5 tonnes) is thus carried by the
   instrument mounting pads, which are mechanically part of the
   telescope structure, and not by the nasmyth platform. 

\subsection{Thermal enclosure}   

   The UES must be maintained at a stable temperature to avoid
   degrading the instrumental resolution. In particular, temperature
   differences of a few tenths of a degree within the prisms will
   cause an unaccaptable variation in the spectral index. The prisms
   have a long thermal time constant, of order 24 hours, and so cannot
   be subjected to sudden changes in temperature.

   The main body of the spectrograph (but {\em not} the spectrograph
   camera nor the A\&G unit) is therefore contained within a thermal
   enclosure, consisting of a number of aluminium panels mounted on a 
   metal frame. Each panel is maintained at a constant temperature
   by circulating a temperature-controlled fluid (a water--glycol mix)
   through pipes attached
   to the inside of the panel. The temperature of the fluid is stabilised
   by the Tamson unit, which first cools the fluid to below the desired 
   temperature and then heats it by a precisely controlled amount; the reason
   for this approach is that it is much easier to heat a fluid by a precise
   amount than to cool it by a precise amount. The rate of flow within each 
   panel can be independently adjusted by means of flowmeters, in order
   to equalise the flow through different panels.

In order to minimise the amount of heat dumped by the Tamson unit into 
the dome, the UES should not be kept at the same temperature
throughout the year. Instead, the temperature should be changed slowly
(i.e. on timescales much longer than the thermal time constant    of
the prisms), to follow seasonal variations in the dome temperature.
Typically the enclosure temperature is adjusted to approximately equal
the dome temperature averaged over a 24~hour period, hence 10$^0$C in 
the winter months, rising to 15$^0$C during the summer.

   In order to keep the spectrograph optics dry and dust--free, the
   inside of the thermal enclosure and the spectrograph camera are both
   flushed with dry air. The temperature of the dry air is controlled
   by means of a heat exchanger to be equal to the temperature of the
   fluid circulating in the enclosure panels.      

\vfill
\eject

\section{Spectrograph parameters}
\outerhead{\large\bf Spectrograph parameters}

\subsection{Plate scale and demagnification}
\label{sec:plscales}

   The plate scale at the slit is equal to 4.44 arcsec/mm with the
   image derotator in the beam, or 4.51 arcsec/mm with it out of the
   beam. 

   The camera provides a demagnification factor along the slit (i.e.
   in the spatial direction) equal to the ratio of the focal lengths 
   of the camera and collimator. Assuming no focal modifier lenses
   are in the beam, this is given by:

   \begin{equation}
    D_{spatial} = \frac{f_{collimator}}{f_{camera}} = \frac{2359}{700} = 3.37
   \end{equation}

    The demagnification factor perpendicular to the slit (i.e. in the 
    spectral direction) is somewhat more complicated, since it
   is necessary to take into account the expansion of the beam caused by it
   not being normally incident on the echelle. The separation of the
   beam incident on the echelle and the reflected beam is 12.4 degrees,
   whilst the nominal blaze angle is 63.4 degrees; hence the angle
   of incidence is 57.2 degrees and the angle of reflection is 69.6
   degrees. The demagnification factor is given by:

   \begin{equation}
    D_{spectral} = \frac{f_{collimator}}{f_{camera}} . 
  \frac{cos(i)}{cos(r)} = \frac{2359}{700} . \frac{0.5417}{0.3486} = 5.24
   \end{equation}

   The plate scales at the slit, and at the detector both in the spatial
   and spectral directions, are summarised in Tab.~\ref{tab:scales}.
   This assume that the focal modifier lenses are not used.
   An important number to remember is that {\em a slitwidth of 1 arcsec
   projects to 43 microns at the detector}, or about 2 detector pixels
   with an EEV CCD. This is often referred to as the 'matched slitwidth',
   since it is the minimum slitwidth which is properly sampled at the
   detector; using a larger slitwidth will degrade the instrumental
   resolution, whilst using a smaller slitwidth will result in the
   line profiles not being properly sampled. Clearly the matched slit
   will be different with different detectors.

\begin{table}[hbt]
\begin{center}
\caption{UES plate scales}
\label{tab:scales}  
\begin{tabular}{lll}
\\
                                 & Without   &   With \\
                                 & derotator & derotator\\
                                 &           &          \\
Scale at slit (arcsec/mm)        &   4.51    &  4.44    \\
Scale at detector (arcsec/mm):   \\
\qquad Spatial direction         &   15.20   & 14.96    \\
\qquad Spectral direction        &   23.63   & 23.26    \\
\end{tabular}
\end{center}
\end{table}

\subsection{Echellogram parameters}

The set of interference orders observable with UES is summarised in
Tab.~\ref{tab:31orders} for the 31.6 lines/mm echelle and in 
Tab.~\ref{tab:79orders}
for the 79.0 lines/mm echelle. For each order number, the tables give the
follwing parameters:


\begin{itemize}
\item The central wavelength, the start and end wavelengths, and
      the Free Spectral Range. 
\item The linear dispersion.
\item The cross-dispersion distances for the start, central and end
      wavelengths.
\item The separation between adjacent orders.
\end{itemize}

The echellograms for the 31.6 g/mm and 79.0 g/mm echelles are  shown
schematically in Fig.~\ref{fig:echellogram}. Further, in
Chap.~\ref{chap:echwind} a description of the planning software, {\sc
echwind} is given. Briefly this software models UES and provides the
user with information as to the detector coverage of the echellogram, 
with any detector at any specfied central wavelength.

\begin{figure}
\vspace{20cm}
\caption[31.6 and 79.0 g/mm echollgram schematics]
{In these digrams schematics of the echellograms for the 
31.6 grooves/mm and 79.0 grooves/mm echelles are shown.
Each line shows the Free Spectral Range in an echelle order; 
order numbers are given to the right of the orders and the corresponding 
central wavelengths (in \AA) to the left. 
Also shown is the portion of the echellogram which can be recorded with 
a single exposure of the Tektronix CCD ($24.6 \times 24.6$mm).}
\label{fig:echellogram}
\end{figure}


\clearpage
 
\begin{table}
\begin{center}
\caption{UES echellogram: 31.6 echelle}
\label{tab:31orders}  
\begin{verbatim}

 Start of wavelength in Angstroms:      3000.00
 End of wavelength in Angstroms:       11000.00
 Ruling of echelle in lines per mm:     31.6046
 "Ideal" blaze angle in degrees:         63.460
 Beam separation in degrees:             12.417
 Focal length of camera in mm:            700.0
 Prism angle in degrees:                  54.03
 Delta_theta in degrees:                  -1.49

 NOTE: The "ideal" blaze is that which gives maximum light for theta=0.0 degrees
 
 ORD  WAVEMIN WAVCENTR  WAVEMAX   FSR    FSR     LD    CDMIN  CDCEN  CDMAX ORSEP
        (A)      (A)      (A)     (A)    (mm)  (A/mm)   (mm)   (mm)   (mm)  (mm)

 189  3005.97  3013.94  3021.92   15.9    12.9  1.240   0.01   0.58   1.15  1.15
 188  3022.00  3030.05  3038.11   16.1    12.9  1.247   1.16   1.73   2.29  1.14
 187  3038.19  3046.34  3054.48   16.3    13.0  1.254   2.30   2.86   3.43  1.13
 186  3054.56  3062.79  3071.02   16.5    13.1  1.260   3.43   3.99   4.55  1.12
 185  3071.10  3079.42  3087.74   16.6    13.1  1.267   4.55   5.11   5.66  1.11
 184  3087.81  3096.23  3104.64   16.8    13.2  1.274   5.67   6.22   6.77  1.10
 183  3104.71  3113.22  3121.72   17.0    13.3  1.281   6.77   7.32   7.86  1.09
 182  3121.79  3130.39  3138.99   17.2    13.4  1.288   7.87   8.41   8.95  1.08
 181  3139.05  3147.75  3156.44   17.4    13.4  1.295   8.95   9.49  10.03  1.07
 180  3156.51  3165.30  3174.09   17.6    13.5  1.303  10.03  10.57  11.10  1.07
 179  3174.15  3183.04  3191.93   17.8    13.6  1.310  11.10  11.63  12.16  1.06
 178  3191.99  3200.98  3209.98   18.0    13.7  1.317  12.16  12.69  13.21  1.05
 177  3210.03  3219.12  3228.22   18.2    13.7  1.325  13.21  13.74  14.25  1.04
 176  3228.27  3237.47  3246.67   18.4    13.8  1.332  14.26  14.78  15.29  1.03
 175  3246.72  3256.02  3265.33   18.6    13.9  1.340  15.29  15.81  16.32  1.02
 174  3265.38  3274.79  3284.20   18.8    14.0  1.348  16.32  16.83  17.33  1.02
 173  3284.24  3293.76  3303.28   19.0    14.0  1.356  17.34  17.84  18.34  1.01
 172  3303.33  3312.96  3322.59   19.3    14.1  1.363  18.35  18.85  19.35  1.00
 171  3322.64  3332.38  3342.12   19.5    14.2  1.371  19.35  19.85  20.34  0.99
 170  3342.17  3352.02  3361.88   19.7    14.3  1.379  20.34  20.83  21.32  0.98
 169  3361.92  3371.90  3381.88   20.0    14.4  1.388  21.33  21.82  22.30  0.98
 168  3381.92  3392.01  3402.11   20.2    14.5  1.396  22.30  22.79  23.27  0.97
 167  3402.14  3412.36  3422.58   20.4    14.6  1.404  23.27  23.75  24.23  0.96
 166  3422.61  3432.95  3443.29   20.7    14.6  1.413  24.23  24.71  25.19  0.95
 165  3443.33  3453.79  3464.26   20.9    14.7  1.421  25.19  25.66  26.13  0.94

 Explanation of abbreviations:
 FSR:    Free Spectral Range
 LD:     Linear dispersion at FSR centre
 CD:     Cross dispersion distance for wavemin, wavecentr and wavemax
 ORSEP:  Order separation

\end{verbatim}
\end{center}
\end{table}
\clearpage

\begin{center}
\begin{verbatim}

 ORD  WAVEMIN WAVCENTR  WAVEMAX   FSR    FSR     LD    CDMIN  CDCEN  CDMAX ORSEP
        (A)      (A)      (A)     (A)    (mm)  (A/mm)   (mm)   (mm)   (mm)  (mm)

 164  3464.29  3474.88  3485.48   21.2    14.8  1.430  26.13  26.60  27.07  0.94
 163  3485.51  3496.23  3506.96   21.4    14.9  1.439  27.07  27.54  28.00  0.93
 162  3506.99  3517.84  3528.70   21.7    15.0  1.448  28.00  28.46  28.92  0.92
 161  3528.73  3539.72  3550.72   22.0    15.1  1.457  28.92  29.38  29.84  0.91
 160  3550.74  3561.87  3573.00   22.3    15.2  1.466  29.84  30.29  30.74  0.91
 159  3573.03  3584.30  3595.57   22.5    15.3  1.475  30.75  31.20  31.64  0.90
 158  3595.59  3607.01  3618.42   22.8    15.4  1.484  31.65  32.09  32.54  0.89
 157  3618.44  3630.00  3641.56   23.1    15.5  1.494  32.54  32.98  33.42  0.88
 156  3641.58  3653.29  3665.00   23.4    15.6  1.503  33.42  33.87  34.30  0.88
 155  3665.02  3676.88  3688.74   23.7    15.7  1.513  34.30  34.74  35.17  0.87
 154  3688.76  3700.77  3712.79   24.0    15.8  1.523  35.17  35.61  36.04  0.86
 153  3712.80  3724.98  3737.15   24.3    15.9  1.533  36.04  36.47  36.89  0.86
 152  3737.16  3749.50  3761.83   24.7    16.0  1.543  36.89  37.32  37.74  0.85
 151  3761.84  3774.34  3786.84   25.0    16.1  1.553  37.74  38.17  38.59  0.84
 150  3786.85  3799.51  3812.18   25.3    16.2  1.564  38.59  39.01  39.42  0.84
 149  3812.19  3825.02  3837.86   25.7    16.3  1.574  39.42  39.84  40.25  0.83
 148  3837.87  3850.88  3863.89   26.0    16.4  1.585  40.25  40.66  41.07  0.82
 147  3863.89  3877.08  3890.27   26.4    16.5  1.596  41.07  41.48  41.89  0.82
 146  3890.27  3903.64  3917.01   26.7    16.6  1.607  41.89  42.29  42.70  0.81
 145  3917.01  3930.57  3944.12   27.1    16.8  1.618  42.70  43.10  43.50  0.80
 144  3944.12  3957.87  3971.61   27.5    16.9  1.629  43.50  43.90  44.29  0.80
 143  3971.61  3985.55  3999.48   27.9    17.0  1.640  44.29  44.69  45.08  0.79
 142  3999.48  4013.61  4027.75   28.3    17.1  1.652  45.08  45.47  45.86  0.78
 141  4027.74  4042.08  4056.41   28.7    17.2  1.663  45.86  46.25  46.64  0.78
 140  4056.41  4070.95  4085.49   29.1    17.4  1.675  46.64  47.03  47.41  0.77
 139  4085.48  4100.23  4114.98   29.5    17.5  1.687  47.41  47.79  48.17  0.76
 138  4114.98  4129.94  4144.90   29.9    17.6  1.700  48.17  48.55  48.93  0.76
 137  4144.90  4160.08  4175.26   30.4    17.7  1.712  48.93  49.30  49.68  0.75
 136  4175.25  4190.66  4206.07   30.8    17.9  1.725  49.68  50.05  50.42  0.74
 135  4206.06  4221.70  4237.33   31.3    18.0  1.737  50.42  50.79  51.16  0.74
 134  4237.32  4253.19  4269.06   31.7    18.1  1.750  51.16  51.53  51.89  0.73
 133  4269.05  4285.16  4301.27   32.2    18.3  1.764  51.89  52.26  52.62  0.73
 132  4301.26  4317.61  4333.97   32.7    18.4  1.777  52.62  52.98  53.34  0.72
 131  4333.95  4350.56  4367.16   33.2    18.5  1.790  53.34  53.69  54.05  0.71
 130  4367.15  4384.01  4400.87   33.7    18.7  1.804  54.05  54.40  54.76  0.71
 129  4400.86  4417.98  4435.10   34.2    18.8  1.818  54.76  55.11  55.46  0.70
 128  4435.09  4452.48  4469.87   34.8    19.0  1.832  55.46  55.81  56.15  0.70
 127  4469.85  4487.52  4505.19   35.3    19.1  1.847  56.15  56.50  56.84  0.69

 Explanation of abbreviations:
 FSR:    Free Spectral Range
 LD:     Linear dispersion at FSR centre
 CD:     Cross dispersion distance for wavemin, wavecentr and wavemax
 ORSEP:  Order separation

\end{verbatim}
\end{center}
\clearpage

\begin{center}
\begin{verbatim}

 ORD  WAVEMIN WAVCENTR  WAVEMAX   FSR    FSR     LD    CDMIN  CDCEN  CDMAX ORSEP
        (A)      (A)      (A)     (A)    (mm)  (A/mm)   (mm)   (mm)   (mm)  (mm)

 126  4505.17  4523.12  4541.07   35.9    19.3  1.861  56.84  57.19  57.53  0.68
 125  4541.05  4559.29  4577.52   36.5    19.4  1.876  57.53  57.87  58.21  0.68
 124  4577.50  4596.03  4614.57   37.1    19.6  1.891  58.21  58.54  58.88  0.67
 123  4614.54  4633.38  4652.21   37.7    19.8  1.907  58.88  59.21  59.55  0.67
 122  4652.19  4671.33  4690.48   38.3    19.9  1.922  59.55  59.88  60.21  0.66
 121  4690.46  4709.92  4729.38   38.9    20.1  1.938  60.21  60.54  60.86  0.66
 120  4729.35  4749.14  4768.93   39.6    20.2  1.954  60.86  61.19  61.51  0.65
 119  4768.90  4789.03  4809.15   40.2    20.4  1.971  61.51  61.84  62.16  0.65
 118  4809.12  4829.58  4850.05   40.9    20.6  1.988  62.16  62.48  62.80  0.64
 117  4850.02  4870.84  4891.65   41.6    20.8  2.005  62.80  63.12  63.44  0.64
 116  4891.62  4912.80  4933.97   42.4    20.9  2.022  63.43  63.75  64.06  0.63
 115  4933.94  4955.49  4977.03   43.1    21.1  2.039  64.06  64.38  64.69  0.62
 114  4977.00  4998.93  5020.85   43.9    21.3  2.057  64.69  65.00  65.31  0.62
 113  5020.82  5043.13  5065.45   44.6    21.5  2.075  65.31  65.62  65.92  0.61
 112  5065.42  5088.13  5110.85   45.4    21.7  2.094  65.92  66.23  66.53  0.61
 111  5110.81  5133.94  5157.06   46.3    21.9  2.113  66.53  66.84  67.14  0.60
 110  5157.03  5180.57  5204.12   47.1    22.1  2.132  67.14  67.44  67.74  0.60
 109  5204.09  5228.07  5252.05   48.0    22.3  2.152  67.74  68.04  68.33  0.60
 108  5252.01  5276.44  5300.87   48.9    22.5  2.171  68.33  68.63  68.92  0.59
 107  5300.83  5325.71  5350.60   49.8    22.7  2.192  68.92  69.22  69.51  0.59
 106  5350.56  5375.92  5401.28   50.7    22.9  2.212  69.51  69.80  70.09  0.58
 105  5401.24  5427.08  5452.92   51.7    23.1  2.233  70.09  70.38  70.66  0.58
 104  5452.88  5479.22  5505.57   52.7    23.4  2.255  70.66  70.95  71.24  0.57
 103  5505.52  5532.38  5559.23   53.7    23.6  2.277  71.24  71.52  71.80  0.57
 102  5559.19  5586.58  5613.96   54.8    23.8  2.299  71.80  72.09  72.37  0.56
 101  5613.92  5641.85  5669.78   55.9    24.1  2.322  72.37  72.65  72.93  0.56
 100  5669.73  5698.22  5726.71   57.0    24.3  2.345  72.92  73.20  73.48  0.56
  99  5726.66  5755.73  5784.80   58.1    24.5  2.369  73.48  73.76  74.03  0.55
  98  5784.75  5814.42  5844.08   59.3    24.8  2.393  74.03  74.31  74.58  0.55
  97  5844.03  5874.31  5904.59   60.6    25.1  2.418  74.58  74.85  75.12  0.54
  96  5904.54  5935.46  5966.37   61.8    25.3  2.443  75.12  75.39  75.66  0.54
  95  5966.32  5997.89  6029.46   63.1    25.6  2.468  75.66  75.93  76.20  0.54
  94  6029.40  6061.64  6093.89   64.5    25.9  2.495  76.20  76.46  76.73  0.53
  93  6093.83  6126.77  6159.71   65.9    26.1  2.521  76.73  76.99  77.26  0.53
  92  6159.66  6193.32  6226.98   67.3    26.4  2.549  77.26  77.52  77.78  0.53
  91  6226.92  6261.32  6295.72   68.8    26.7  2.577  77.78  78.04  78.30  0.52
  90  6295.67  6330.84  6366.01   70.3    27.0  2.605  78.30  78.56  78.82  0.52
  89  6365.95  6401.91  6437.88   71.9    27.3  2.635  78.82  79.08  79.34  0.52

 Explanation of abbreviations:
 FSR:    Free Spectral Range
 LD:     Linear dispersion at FSR centre
 CD:     Cross dispersion distance for wavemin, wavecentr and wavemax
 ORSEP:  Order separation

\end{verbatim}
\end{center}
\clearpage

\begin{center}
\begin{verbatim}

 ORD  WAVEMIN WAVCENTR  WAVEMAX   FSR    FSR     LD    CDMIN  CDCEN  CDMAX ORSEP
        (A)      (A)      (A)     (A)    (mm)  (A/mm)   (mm)   (mm)   (mm)  (mm)

  88  6437.82  6474.61  6511.39   73.6    27.6  2.665  79.43  79.60  79.85  0.51
  87  6511.33  6548.97  6586.61   75.3    27.9  2.695  79.85  80.11  80.36  0.51
  86  6586.54  6625.06  6663.58   77.0    28.3  2.726  80.36  80.62  80.87  0.51
  85  6663.51  6702.94  6742.37   78.9    28.6  2.759  80.87  81.12  81.37  0.51
  84  6742.31  6782.68  6823.05   80.7    28.9  2.791  81.37  81.63  81.88  0.50
  83  6822.98  6864.34  6905.69   82.7    29.3  2.825  81.88  82.13  82.38  0.50
  82  6905.62  6947.98  6990.35   84.7    29.6  2.859  82.38  82.63  82.87  0.50
  81  6990.28  7033.69  7077.11   86.8    30.0  2.895  82.87  83.12  83.37  0.50
  80  7077.04  7121.55  7166.06   89.0    30.4  2.931  83.37  83.62  83.87  0.50
  79  7165.98  7211.63  7257.27   91.3    30.8  2.968  83.87  84.12  84.36  0.49
  78  7257.19  7304.01  7350.83   93.6    31.2  3.006  84.36  84.61  84.85  0.49
  77  7350.75  7398.80  7446.84   96.1    31.6  3.045  84.85  85.10  85.35  0.49
  76  7446.76  7496.08  7545.39   98.6    32.0  3.085  85.35  85.59  85.84  0.49
  75  7545.31  7595.95  7646.59  101.3    32.4  3.126  85.84  86.09  86.33  0.49
  74  7646.50  7698.52  7750.54  104.0    32.8  3.168  86.33  86.58  86.82  0.49
  73  7750.45  7803.90  7857.35  106.9    33.3  3.212  86.82  87.07  87.31  0.49
  72  7857.26  7912.21  7967.15  109.9    33.7  3.256  87.31  87.56  87.80  0.49
  71  7967.06  8023.56  8080.07  113.0    34.2  3.302  87.80  88.05  88.30  0.49
  70  8079.97  8138.10  8196.23  116.3    34.7  3.349  88.30  88.55  88.79  0.49
  69  8196.13  8255.95  8315.78  119.7    35.2  3.398  88.79  89.04  89.29  0.50
  68  8315.68  8377.27  8438.87  123.2    35.7  3.448  89.29  89.54  89.79  0.50
  67  8438.77  8502.21  8565.66  126.9    36.3  3.499  89.79  90.04  90.29  0.50
  66  8565.55  8630.94  8696.33  130.8    36.8  3.552  90.29  90.54  90.79  0.50
  65  8696.21  8763.62  8831.04  134.8    37.4  3.607  90.79  91.04  91.30  0.51
  64  8830.92  8900.45  8969.99  139.1    38.0  3.663  91.30  91.55  91.81  0.51
  63  8969.86  9041.62  9113.38  143.5    38.6  3.721  91.81  92.07  92.32  0.52
  62  9113.25  9187.34  9261.43  148.2    39.2  3.781  92.32  92.59  92.85  0.52
  61  9261.30  9337.84  9414.38  153.1    39.8  3.843  92.85  93.11  93.37  0.53
  60  9414.24  9493.35  9572.46  158.2    40.5  3.907  93.37  93.64  93.91  0.54
  59  9572.31  9654.13  9735.94  163.6    41.2  3.973  93.91  94.18  94.45  0.54
  58  9735.79  9820.45  9905.11  169.3    41.9  4.042  94.45  94.73  95.00  0.55
  57  9904.94  9992.60 10080.25  175.3    42.6  4.112  95.00  95.28  95.56  0.56
  56 10080.08 10170.89 10261.71  181.6    43.4  4.186  95.56  95.85  96.13  0.57
  55 10261.53 10355.67 10449.81  188.3    44.2  4.262  96.13  96.43  96.72  0.58
  54 10449.62 10547.28 10644.94  195.3    45.0  4.341  96.72  97.02  97.32  0.60
  53 10644.74 10746.12 10847.50  202.8    45.8  4.422  97.31  97.62  97.93  0.61
  52 10847.29 10952.60 11057.91  210.6    46.7  4.507  97.93  98.24  98.56  0.63
 
 Explanation of abbreviations:
 FSR:    Free Spectral Range
 LD:     Linear dispersion at FSR centre
 CD:     Cross dispersion distance for wavemin, wavecentr and wavemax
 ORSEP:  Order separation

\end{verbatim}
\end{center}
\clearpage


\begin{table}
\begin{center}
\caption{UES echellogram: 79.0 echelle}
\label{tab:79orders}  
\begin{verbatim}
 
 Start of wavelength in Angstroms:      3000.00
 End of wavelength in Angstroms:       11000.00
 Ruling of echelle in lines per mm:     79.0115
 "Ideal" blaze angle in degrees:         63.610
 Beam separation in degrees:             12.417
 Focal length of camera in mm:            700.0
 Prism angle in degrees:                  54.03
 Delta_theta in degrees:                  -0.35
 
 NOTE: The "ideal" blaze is that which gives maximum light for theta=0.0 degrees
 
 ORD  WAVEMIN WAVCENTR  WAVEMAX   FSR    FSR     LD    CDMIN  CDCEN  CDMAX ORSEP
        (A)      (A)      (A)     (A)    (mm)  (A/mm)   (mm)   (mm)   (mm)  (mm)

  75  2992.98  3013.06  3033.15   40.2    31.2  1.286   0.00   1.47   2.89  2.89
  74  3033.34  3053.98  3074.61   41.3    31.7  1.303   2.91   4.34   5.74  2.83
  73  3074.79  3096.00  3117.21   42.4    32.1  1.321   5.75   7.15   8.52  2.77
  72  3117.37  3139.17  3160.97   43.6    32.5  1.339   8.54   9.91  11.25  2.72
  71  3161.12  3183.54  3205.96   44.8    33.0  1.358  11.26  12.61  13.93  2.66
  70  3206.10  3229.17  3252.23   46.1    33.5  1.378  13.94  15.26  16.55  2.61
  69  3252.36  3276.10  3299.84   47.5    34.0  1.398  16.55  17.85  19.11  2.56
  68  3299.95  3324.39  3348.84   48.9    34.5  1.419  19.12  20.39  21.62  2.51
  67  3348.94  3374.12  3399.30   50.4    35.0  1.440  21.63  22.87  24.09  2.46
  66  3399.39  3425.34  3451.29   51.9    35.5  1.462  24.09  25.31  26.50  2.41
  65  3451.37  3478.12  3504.88   53.5    36.1  1.484  26.50  27.69  28.86  2.36
  64  3504.94  3532.54  3560.14   55.2    36.6  1.507  28.86  30.03  31.17  2.31
  63  3560.20  3588.68  3617.16   57.0    37.2  1.531  31.17  32.32  33.44  2.26
  62  3617.21  3646.62  3676.02   58.8    37.8  1.556  33.44  34.56  35.66  2.22
  61  3676.06  3706.44  3736.82   60.8    38.4  1.582  35.66  36.76  37.83  2.17
  60  3736.85  3768.25  3799.65   62.8    39.1  1.608  37.83  38.91  39.96  2.13
  59  3799.67  3832.15  3864.62   65.0    39.7  1.635  39.96  41.02  42.04  2.08
  58  3864.63  3898.23  3931.84   67.2    40.4  1.663  42.04  43.08  44.09  2.04
  57  3931.84  3966.63  4001.43   69.6    41.1  1.693  44.09  45.10  46.08  2.00
  56  4001.42  4037.47  4073.52   72.1    41.8  1.723  46.08  47.08  48.04  1.96
  55  4073.50  4110.87  4148.24   74.7    42.6  1.754  48.04  49.01  49.96  1.92
  54  4148.21  4186.98  4225.75   77.5    43.4  1.787  49.96  50.91  51.84  1.88
  53  4225.72  4265.96  4306.21   80.5    44.2  1.820  51.84  52.77  53.67  1.84
  52  4306.16  4347.97  4389.78   83.6    45.1  1.855  53.67  54.59  55.47  1.80
  51  4389.72  4433.19  4476.65   86.9    46.0  1.892  55.47  56.37  57.24  1.76
  50  4476.59  4521.81  4567.03   90.4    46.9  1.929  57.23  58.11  58.96  1.73

 Explanation of abbreviations:
 
 FSR:    Free Spectral Range
 LD:     Linear dispersion at FSR centre
 CD:     Cross dispersion distance for wavemin, wavecentr and wavemax
 ORSEP:  Order separation

\end{verbatim}
\end{center}
\end{table}
\clearpage

\begin{center}
\begin{verbatim}

 ORD  WAVEMIN WAVCENTR  WAVEMAX   FSR    FSR     LD    CDMIN  CDCEN  CDMAX ORSEP
        (A)      (A)      (A)     (A)    (mm)  (A/mm)   (mm)   (mm)   (mm)  (mm)

  49  4566.96  4614.04  4661.12   94.2    47.8  1.969  58.96  59.82  60.65  1.69
  48  4661.04  4710.11  4759.17   98.1    48.8  2.010  60.65  61.49  62.30  1.66
  47  4759.09  4810.26  4861.43  102.3    49.9  2.053  62.30  63.13  63.92  1.62
  46  4861.34  4914.76  4968.18  106.8    50.9  2.097  63.92  64.73  65.51  1.59
  45  4968.08  5023.90  5079.72  111.6    52.1  2.144  65.51  66.30  67.07  1.56
  44  5079.61  5138.00  5196.38  116.8    53.3  2.192  67.06  67.84  68.59  1.52
  43  5196.26  5257.40  5318.53  122.3    54.5  2.243  68.59  69.35  70.08  1.49
  42  5318.40  5382.48  5446.56  128.2    55.8  2.297  70.08  70.82  71.54  1.46
  41  5446.42  5513.66  5580.90  134.5    57.2  2.353  71.54  72.27  72.98  1.44
  40  5580.75  5651.39  5722.03  141.3    58.6  2.411  72.98  73.69  74.38  1.41
  39  5721.88  5796.19  5870.50  148.6    60.1  2.473  74.38  75.09  75.77  1.38
  38  5870.33  5948.60  6026.87  156.5    61.7  2.538  75.76  76.46  77.12  1.36
  37  6026.68  6109.24  6191.80  165.1    63.3  2.607  77.12  77.80  78.46  1.34
  36  6191.60  6278.81  6366.02  174.4    65.1  2.679  78.46  79.12  79.77  1.31
  35  6365.81  6458.06  6550.32  184.5    67.0  2.756  79.77  80.43  81.06  1.30
  34  6550.10  6647.86  6745.62  195.5    68.9  2.837  81.06  81.71  82.34  1.28
  33  6745.38  6849.15  6952.93  207.6    71.0  2.923  82.34  82.98  83.60  1.26
  32  6952.66  7063.02  7173.38  220.7    73.2  3.014  83.60  84.24  84.86  1.25
  31  7173.10  7290.69  7408.28  235.2    75.6  3.111  84.85  85.49  86.10  1.24
  30  7407.97  7533.52  7659.08  251.1    78.1  3.215  86.10  86.73  87.34  1.24
  29  7658.74  7793.10  7927.47  268.7    80.8  3.325  87.34  87.97  88.58  1.24
  28  7927.09  8071.22  8215.35  288.3    83.7  3.444  88.58  89.21  89.82  1.25
  27  8214.93  8369.93  8524.92  310.0    86.8  3.571  89.82  90.46  91.08  1.26
  26  8524.45  8691.60  8858.75  334.3    90.1  3.709  91.07  91.72  92.35  1.28
  25  8858.22  9039.00  9219.78  361.6    93.7  3.857  92.35  93.01  93.65  1.30
  24  9219.18  9415.33  9611.48  392.3    97.6  4.018  93.65  94.33  94.99  1.34
  23  9610.80  9824.37 10037.94  427.1   101.9  4.192  94.99  95.69  96.38  1.39
  22 10037.15 10270.57 10503.99  466.8   106.5  4.382  96.37  97.11  97.83  1.46
  21 10503.06 10759.23 11015.40  512.3   111.6  4.591  97.83  98.61  99.38  1.55
 
 Explanation of abbreviations:
 
 FSR:    Free Spectral Range
 LD:     Linear dispersion at FSR centre
 CD:     Cross dispersion distance for wavemin, wavecentr and wavemax
 ORSEP:  Order separation

\end{verbatim}
\end{center}
\clearpage

\subsection{Spectral resolution}
\label{sec:detres}

        The instrument provides slit-limited resolution over the
        entire camera field and over the entire wavelength range.
        This means that the resolution is limited not by the
        point-spread-function of the spectrograph optics, but by
        the detector pixel size; the wavelength resolution
        is equal to the spectrograph dispersion multiplied by the
        spatial resolution of the detector. 

        For a CCD the spatial resolution of the detector is determined 
        entirely by sampling considerations, and can be considered equal 
        to two detector pixels. The situation is more complex for the
        IPCS, where the detector point spread function may be significant
        compared to the pixel size (see the IPCS-II User manual).

        The detectors which might be used with UES currently include EEV
        and Tektronix CCDs, with pixel sizes of 22.5~$\mu$m and 24~$\mu$m 
        respectively, and the IPCS-II providing a spatial resolution 
of 30~$\mu$m. The resolving power for each
        of these detectors is summarised in Tab.~\ref{tab:detres}, obtained
        by combining these numbers with the linear dispersion given in
        Tabs.~\ref{tab:79orders} and \ref{tab:31orders}). The resolution in
        km/s is also given. Both of these numbers are
        independent both of the wavelength, and the echelle being used.
        The resolution in Angstroms will of course vary with wavelength,
        and the table gives figures at a few representative wavelengths.

\begin{table}[hbt]
\begin{center}
\caption{UES resolving power and velocity resolution}
\label{tab:detres}  
\begin{tabular}{lllllll}
\\
Detector & Spatial    & Resolving & Velocity  & \multicolumn{3}{c}{Wavelength}\\
 & resolution & power    & resolution & \multicolumn{3}{c}{resolution ( \AA )}\\
   & ($\mu$m)   &       &  (km~s$^{-1}$) & 3000 \AA & 6000 \AA & 10000 \AA \\
\\
EEV CCD   &   45       & 52,000    &  5.77  & 0.058    & 0.115    & 0.192  \\
Tek CCD   &   48       & 49,000    &  6.12  & 0.061    & 0.122    & 0.204  \\
IPCS-II   &   30       & 78,000    &  3.85  & 0.038    & 0.077    & 0.128
\end{tabular}
\end{center}
\end{table}


\subsection{Spectral range}

   The spectrograph is designed to be usable over the range from 3000 \AA 
   to 1.1~$\mu$m. However, it is unfortunately not possible to cover this 
  entire range at once. 
Tabs.~\ref{tab:31orders} and \ref{tab:79orders} summarise
   the free spectral range and order separation at a variety of
   wavelengths, and can be used to calculate the number of orders
   that will fit on the detector simultaneously, and to check whether
   the detector can cover the entire length of the orders. 
   This is discussed in more detail in Section~\ref{sec:uconfig}.    
Additionally the STARLINK released programme {\sc echwind} (see
Starlink User Guide No.~??) gives a graphical representation of the
detector coverage of the echellogram at any particular echelle central
wavelength. (see also Chap.~\ref{chap:echwind}.)

\subsection{Field of view}

   When the spectrograph is used with the cross-dispersing
   prisms and the 31.6 lines/mm echelle, the minimum order separation 
    on the detector is 0.49 mm (7.3 arcsec). This limits the slit 
   length to less than about 6 arcsec, otherwise adjacent spectral 
   orders will overlap. This 
   cross-dispersing mode of operation is therefore primarily useful 
   for objects which are close to being point sources.  Even for these 
   objects it may not be possible to obtain a good sky subtraction. 
   As discussed in more detail in section~\ref{sec:uconfig}, improved sky 
    subtraction can be obtained by using the 79.0 echelle, which gives 
   a minimum order separation of 1.24 mm (18.5 arcsec).

   It is possible to use the full 5 arcmin length of the slit, in order
   to carry out long slit spectroscopy of extended objects. However,
   in this case it is no longer possible to use the cross-dispersers.
   The wavelength range is limited to one spectral order, and other
   orders must be suppressed by an appropriate narrowband blocking filter.

\section{Principles of operation (cross--dispersed mode)}
\label{sec:uconfig}

In order to configure the spectrograph for any given observation it
is necessary to specify the following parameters:

\begin{itemize}

\item Choice of echelle grating

\item Central wavelength and order number

\item Slit width and length

\end{itemize}

The rest of this section dicusses these parameters in more
detail.

\subsection{Choice of echelle grating}
\label{sec:gratchoice}

A choice of two gratings is provided with UES, one with 31.6
lines/mm and one with 79.0 lines/mm. It is important to realise
that the choice of grating is not determined by the spectral
resolution required, as in a conventional first order spectrograph
such as ISIS. Instead, the choice of grating is determined
by a trade-off between wavelength coverage and the quality of 
sky subtraction. 

In order to see why this is the case, its worth briefly restating 
the basic equations governing diffraction by a grating. The grating
equation describes the condition for constructive interference:

\begin{equation}
      \frac{ m . \lambda }{d}  = sin(i) + sin(\theta)
\end{equation}

\begin{center}
\begin{tabular}{rcl}
m           & = & Interference order \\*
$\lambda$   & = & Wavelength \\
d           & = & Spacing between lines on grating \\
i           & = & Angle of incidence of light \\*
$\theta$    & = & Angle of reflection for constructive interference
\end{tabular}
\end{center}             

The angular dispersion is obtained by differentiating this:

\begin{equation}
 \frac{d\theta}{d\lambda} = \frac{sin(i) + sin(\theta)}{\lambda.cos(\theta)}
\end{equation}

The dispersion is a function only of the angles at which the grating 
is used, and not a function of the groove spacing.
The two UES gratings have nearly the same blaze angle 
(64.95 degrees for the 31.6 echelle and 63.96 degrees for the 79.0 echelle), 
and hence are
used with similar values of {\it i} and {\it $\theta$}. This means 
that at a given wavelength they provide almost identical spectral resolution
as can be seen from Tabs.~\ref{tab:31orders} and \ref{tab:79orders}. 

The difference between the two gratings is that, at any given
wavelength, the grating equation implies they must be operated 
at a different interference order.
For example, observations at 5000\AA\ would use either the 31.6 
lines/mm grating in order m~$\approx$~114, or the 79.0 lines/mm
grating in order m~$\approx$~45 (see Tabs.~\ref{tab:31orders} 
and \ref{tab:79orders} ). The principal 
effect of this is that the wavelength range of each order, normally
referred to as the Free Spectral Range (FSR) is different.
The FSR is given by:

\begin{equation}
      FSR = \frac{ \lambda }{m}  
\end{equation}

At any given wavelength, the 79.0 lines/mm grating will have
2.5 times the free spectral range of the 31.6 lines/mm
grating; the orders are 2.5 times longer, and hence 2.5 times
further apart. Since the dispersion is the same, this means that 
for a fixed detector size, the 79.0 lines/mm grating provides 
less wavelength coverage, but more space between the orders 
to measure the sky background.

When deciding which echelle to use, it is therefore necessary
to consider how long a slit you need to get adequate sky subtraction,
and how many exposures will be required to cover the required
wavelength range. 

The inter-order spacing with both echelles 
at various wavelengths is summarised in Tab.~\ref{tab:interorder}. 
This assumes no focal modifier lenses are in the beam.
The slitlength used should be slightly shorter than this
inter-order spacing, in order to leave a gap between the orders.

\begin{table}[hbt]
\begin{center}
\caption{Interorder spacing with UES echelles}
\label{tab:interorder}  
\begin{tabular}{lcc}
\\
Wavelength &  \multicolumn{2}{c}{Interorder spacing (arcsec)}\\
 (\AA)     &   \multicolumn{2}{c}{(arcsec)} \\
           & 31.6 echelle &   79.0 echelle \\
           &              &         \\
3000       &     17       &    43   \\
3500       &     14       &    34   \\
4000       &     12       &    29    \\
5000       &     9.3      &    23    \\
6000       &     8.1      &    20    \\
7000       &     7.5      &    19    \\
8000       &     7.5      &    19    \\
9000       &     7.8      &    20    \\
10000      &     8.6      &    22    \\
11000      &     9.6      &    24              
\end{tabular}
\end{center}
\end{table}

It is possible to estimate the number
of exposures required to cover a given wavelength range using
the data in 
Tabs.~\ref{tab:31orders} and \ref{tab:79orders}. These tables
give the length and separation on the detector of each
order. 

This calculation can be carried out much more easily using
graphical means, and the {\sc echwind} programme has been developed
for this purpose. 
{\sc echwind} draws a complete echellogram on an image display,
together with a box representing the size and shape of the detector
in use. The position of individual spectral lines can also
be marked on the display. The user can then move the detector
window around using the mouse. At each position, the screen displays
the minimum and maximum wavelengths and order numbers falling on the
detector. The position of the detector window can be marked on the 
screen so as to ease preparation of observations where multiple
overlapping wavelength ranges are required.
The output of the programme is the central wavelength
and order number of each exposure. 

\subsection{Central wavelength and order number}
\label{sec:echoffset}

Having decided which central wavelengths are to be observed,
it is then necessary to configure the spectrograph by moving the
following mechanisms:

\begin{itemize}

\item The echelle angle $\theta$. Changing this angle changes
the position of the echellogram on the detector in the dispersion
direction.

\item The echelle angle $\gamma$. Changing this angle changes
the position of the echellogram on the detector in the cross-dispersion
direction.

\item The prism translation. Moving the echelle grating changes 
the direction in which it sees the cross-dispersing prisms, 
and the prism assembly has to be moved (and rotated) to correct for this.

\item The slit angle. In order to keep the projected slit at the 
same orientation on the detector, the slit angle has to be rotated
as a function of wavelength.

\item The collimator. There is a choice of two collimators, one
coated for the UV (less than 4000 \AA) and one with a wideband
coating. When changing wavelength it is necessary to select
the appropriate collimator. 

\item The colimator focus. When a different collimator is selected,
it is necessary to apply an offset to the collimator focus, this is 
automatically calulated and applied by the UES control software. 

\end{itemize}

The instrument control software contains a model of the 
spectrograph, which 
takes as input the central wavelength and order number
required by the observer, and configures the spectrograph
as described above. It is possible for the observer
not to specify the order number, in which case the software
will determine the interference order for which the wavelength
selected is closest to blaze.

\subsection{Slit width}
\label{sec:mslit}

When deciding on what slitwidth to use, the starting point is to
determine the size of the 'matched slit'. As discussed in 
section~\ref{sec:plscales}, this is the slitwidth which corresponds
to the spatial resolution of the detector; in the case of a CCD, it is
the slitwidth which projects to two detector pixels.
The matched slit is therefore the minimum slitwidth which is properly 
sampled at the detector; using a larger slitwidth will degrade the 
instrumental resolution, whilst using a smaller slitwidth will result in the
line profiles not being properly sampled. The matched slit with different
detectors is summarised in Tab.~\ref{tab:mslit}. The figures in arcseconds
have been calculated assuming the derotator is in the beam, and
assuming no focal modifier lenses are being used.

\begin{table}[hbt]
\begin{center}
\caption{UES matched slit}
\label{tab:mslit}
\begin{tabular}{llll}
\\
Detector         & Spatial    &  \multicolumn{2}{c}{Matched} \\
                 & resolution &  \multicolumn{2}{c}{slit}     \\
                 &  $\mu$m    &   $\mu$m      & arcsec       \\
\\
EEV CCD          &  45        &   236         &    1.05    \\
Tek CCD          &  48        &   252         &    1.12    \\
IPCS-II             &  30        &   157         &    0.70
\end{tabular}
\end{center}
\end{table}

In conditions of poor seeing it may be sensible to open up the slit,
trading poorer resolution for improved throughput. For example, the 
IPCS-II
can provide higher spectral resolution than the CCD, but at the cost of
increased slit losses; if spectral resolution is less important than
throughput, it may be sensible to use a 1 arcsecond slit with the 
IPCS-II.


\vfill
\eject





\chapter {\bf The Derotation Optics}
\label{chap:derotator}  
\outerhead{\large\bf THE DEROTATOR}

\section{The need for a derotator}

The altazimuth design of the telescope means that the field of
view rotates as the telescope tracks. It is necessary to compensate
for this in order that:

\begin{itemize}

\item The spectrograph slit can be set to a constant PA on the sky 
(mainly of use for extended objects). 

\item Autoguiding can be carried out using offset guide stars.

\end{itemize}

At Cassegrain the approach taken is to mount instruments on a turntable,
and physically rotate them so as to keep the final image at a fixed
orientation. This approach is not possible with heavy instruments
such as UES; instead an optical image derotator is used. This allows
the instrument to remain stationary, at the cost of reduced
field and throughput.

It is possible to observe either with or without the derotator in the
beam. Inserting or removing the derotator is a fairly major change;
it has to be carried out during the daytime, and advance
notice is required. {\em In normal operation UES is used with the 
derotator.}

(N.B. Polarimetry, when implemented, must be done without the derotator
and hence will be limited to point sources)
	
\section{Design}

The image derotator is illustrated in Fig.~\ref{fig:derot}. It 
consists of a flat 
mirror and a pair of fused silica prisms, each with lens surfaces.
The detailed specification of the derotation optics is given
in La Palma Technical Note 9.

The incoming beam from the telescope undergoes total internal
reflection in the first prism, and emerges travelling in a direction
close to perpendicular to the telescope axis. The beam is then reflected
by the flat mirror back towards the second prism, where it again undergoes
total internal reflection, and emerges travelling parallel to the telescope
axis. The lens surfaces on the prisms extend the optical path, so that
the position of the focal plane remains constant, and maintain good
image quality.

The orientation of the output image is altered by rotating the
whole assembly about the telescope axis. Rotating the derotation
optics through a given angle has the effect of rotating the
final image through twice that angle. Note that the derotation optics
also has the effect of changing the image parity (i.e. the image field 
is mirrored as seen at the detector). In normal operation 
the unit is rotated by the telescope control system at an appropriate 
rate to keep the final image at a fixed orientation, the orientation
required being specified by the observer.

\begin{figure}
\vskip 20cm
\caption[Schematic of UES derotator]{Schematic of UES derotator}
\label{fig:derot}
\end{figure}


\section{Specification}

\subsection{Throughput}

At UV and visible wavelengths, losses in the derotation optics
arise as a result of the four air-glass surfaces (2 per cent loss
at each surface) and the reflection at the flat aluminium mirror 
(approx 15 per cent loss). The throughput of the system is therefore 
expected to be about 75 per cent, with the losses dominated by the 
reflection at the flat mirror.

The throughput of the system cuts off sharply in the 
near infrared, beyond about 2 microns, due to absorption by the fused 
silica material (Heraeus Homosil) used in constructing the prisms. 
This material also absorbs at wavelengths between 1.3 and 1.5 microns. 
It transmits well in the UV down to below the atmospheric cutoff at 
3000\AA.

It is worth noting that the losses in the WHT derotation optics
are significantly greater than those in the optical derotator
used with UCLES (in principle an echelle of similar design to UES) 
at the AAT. The smaller 
field and longer f/ratio at the AAT makes it possible to construct 
a monolithic derotator, in which the reflection at the flat mirror 
is replaced by a third total internal reflection. The only losses 
in the AAT derotator are therfore those due to the two air-glass 
surfaces on the two external faces. Unfortunately, it is not possible 
to adopt a similar approach on the WHT, due to the larger field 
and faster f/ratio. The advantage however with the derotator for UES, is
that due to the larger field, offset autoguiding is possible. 

\subsection{Field of view}

The unvignetted field of view of the derotation optics has a diameter
of 2.5 arcmin. The full field of view is 5 arcmin in diameter, with
vignetting of 50 per cent at the edge of the field.

\subsection{Image quality}

Spot diagrams for the theoretical design of the Nasymth image derotator
are reproduced in La Palma Technical Note 9.

The diagrams show some transverse chromatic aberration, giving a slightly
larger image scale at longer wavelengths. If the images from 3300 
to 10000\AA\ are superimposed, these will make a line of about 
0.7$\times$0.2 arcsec in a radial direction. This has two effects:

\begin{itemize}

\item The scale along the slit will vary very slightly with wavelength.
The variation in scale over the entire wavelength range is of order 1 
per cent. This may be relevant for some longslit spectroscopy.

\item Offset guide stars may appear to be elongated when viewed in 
white light. 

\end{itemize}

\vfill
\eject


\chapter {\bf The nasmyth A\&G Unit}
\label{chap:NAG}  
\outerhead{\large\bf THE A\&G UNIT}

\section{A\&G unit design}

\subsection{Overview}

The layout of the A\&G unit is shown in Fig.~\ref{fig:AG}. 
This unit is arguably the most complex part of the observing system
to understand. This is because a number of different light-paths exist,
in order to support different A\&G functions, and these have to
fit into a very small space envelope. This situation can be contrasted
with the spectrograph itself, where there is just one lightpath, and
far more relaxed space constraints. The following light-paths exist
within the A\&G:

\begin{itemize}

\item The main beam from the telescope to the spectrograph slit

\item The return beam from the spectrograph slit to the acquisition TV

\item The return beam from the spectrograph slit to the CCD autoguider,
      for guiding on the slit image.

\item The beam from the telescope to the CCD autoguider, for offset guiding.

\item The beam from the calibration unit to the spectrograph slit.

\end{itemize}

In the next few subsections, a description
of each of the lightpaths is given, along with instructions on 
how to select them. Finally, how 
the system is expected to be used in practice is described. 

\begin{quote}
\em An upgrade of the UES A\&G unit is in progress at the time of 
writing and should come into use in mid--late 1994. The upgraded A\&G 
unit will have higher throughput enabling guiding on objects down to 
$\approx$17 mag. In section~\ref{sec:AGupgrade} details of the 
enhancements are given.
\end{quote}

\begin{figure}
\vskip 20cm
\caption[The Nasymth A\&G unit]{The Nasymth A\&G unit}
\label{fig:AG}
\end{figure}

\subsection{Lightpath selection}
\label{sec:AGlight}

Moving along the main beam from the telescope to spectrograph slit, the first
component encountered in the A\&G unit is the autoguider mirror. This
has a pivotal role in the operation of the A\&G unit, since which of the 
possible lightpaths is operational is determined primarily by moving the 
mirror. 

The mirror is inclined at an angle of 45 degrees to the lighpath, 
so that light  coming from the telescope and intercepted by the mirror 
is directed downwards. This light comes to a focus below the mirror, 
in what is normally referred to as the  'reflected focal plane'; this 
reflected focal plane is used for acquisition and guiding, as described in 
section~\ref{sec:abeam}.  Holes are cut in the mirror,  in order to allow the 
central part of the beam to pass through the  mirror and reach the spectrograph,
as described in section~\ref{sec:mbeam}; in normal operation the 
inner part of the 
field, which contains the object being observed, is therefore visible at 
the slit, whilst light from the outer part of the field is directed to 
the reflected focal plane for offset autoguiding.

The size of the hole in the autoguider mirror determines the field 
of view visible at the slit. There are three holes with different sizes, 
giving different tradeoffs between field of view at the slit and the 
amount of field available in the reflected focal plane for autoguiding. 
The required hole is selected by moving the mirror. It is 
also possible to move the mirror to a position with no hole, where all 
the light is directed to the reflected focal plane, and to a clear 
position where all the light reaches the spectrograph slit. 

These options are summarised in Tab.~\ref{tab:AGholes}. This gives
the unvignetted and partially vignetted field of view at available
at the slit for each of the options. Fig.~\ref{fig:umirvig} shows 
plots of the 
vignetting along the slit produced by the autoguider mirror in the
different positions.

\begin{table}[hbt]
\begin{center}
\caption{Autoguider mirror options}
\label{tab:AGholes}  
\begin{tabular}{lccc}
\\
Autoguider &  Unvignetted field & Partially vignetted    &  Field at reflected\\
mirror     &  diameter at slit & field diameter at slit   &  focal plane  \\
position   &     (arcsec)     &      (arcsec)            & (arcsec$^2$)  \\
\\
GUIDEONLY  &      0           &      0     \\
POINTSOURCE &     18          &    170      \\
SHORTSLIT   &     73          &    213       \\
LONGSLIT    &     161         &     271       \\          
CLEAR       &     161         &     271               
\end{tabular}
\end{center}
\end{table}

\begin{figure}
\vskip 20cm
\caption[Vignetting caused by autoguider mirror]{Vignetting caused by
   autoguider mirror}
\label{fig:umirvig}
\end{figure}

In addition to these options, there are two furtherpositions for the 
autoguider mirror. One of the 
autoguider mirrors is a mirror which, if selected (see ICL command {\tt 
UMIRROR ULAMPS}), directs light from the
calibration unit into the spectrograph (see section~\ref{sec:cbeam}).
When the autoguider is moved to its other extreme position, the return 
light path to the acquisition TV is clear (see sec.~\ref{sec:tbeam} and 
also ICL command {\tt UTVVIEW}). 

\subsection{Main beam from telescope to spectrograph}
\label{sec:mbeam}

After passing through the autoguider mirror, the main beam from
the telescope passes through three filter wheels before reaching
the slit--unit of the spectrograph. The three filter wheels
are intended for colour filters, neutral density filters,
and auxiliary components such as polarisers.

Each filter wheel contains 11 positions, of which position 1 is
always empty. The maximum filter diameter is 80 mm. The rear filter wheel,
intended for colour filters, can accomodate filters up to 25 mm in thickness,
the front wheel, intended for auxiliary components, can accomodate
components up to 15 mm in thickness, whilst the central wheel, intended
for neutral density filters, can accomodate filters up to 10 mm in 
thickness. 

The filters normally loaded in the colour and neutral density filter
wheels are summarised in Tabs.~\ref{tab:mainfiltc} and \ref{tab:mainfiltnd}.
Transmission curves for the filters are shown in Figs.~\ref{fig:mccurves}
and \ref{fig:mndcurves}. These filters are of differing thickness and 
hence the WHT telescope focus must be adjusted according to the filter 
combinations inserted into the beam, and also the autoguider probe focus
must be adjusted to compensate for the this change in the reflected 
focal plane. 

\begin{quote}
\em At present (1994) the main beam neutral density filters introduce an
unacceptable amount of ripple and hence their use is discouraged. 
\end{quote}

It is possible
for observers to bring non-standard filters for 'special' applications, but 
at least one months advance notice is required, since it will generally 
be necessary to 
manufacture special adapters in order to be able to mount the filters.

Filters are loaded by means of an access hatch in the side of the A\&G
unit; however, this is a delicate operation and must only be carried out by 
properly trained staff---this is a daytime operation. Having changed a
filter, the name of filter must be input to the system computer using
the {\tt UNAMES} command. (It is eventually intended that the system 
computer will automatically be able to determine the filters in use by 
means of the bar-coding the filters---check with your Support Astronomer
for the progress on this feature.) 

At the point where the main beam enters the A\&G unit from the derotation
optics is a dark slide. This should be kept closed except when
observing, to protect the optics from dust.

{\em N.B. Remember---the 
WHT focus must be adjusted to compensate for the total 
thickness of glass of the filter combinations in use.}


\subsection{Beam from telescope to CCD autoguider}
\label{sec:abeam}

As noted in section~\ref{sec:AGlight}, the beam from the telescope to the CCD 
autoguider 
comes to a focus in the reflected focal plane below the autoguider mirror.
In that reflected focal plane are two autoguider probes. Each probe consists 
of a small prism feeding a fibre image-guide, which transfers an image to 
the CCD autoguider, mounted on top of the A\&G unit. The two probes, 
normally referred to as the 'coarse' and
'fine' guide probes, give different scales and field of view. The
coarse probe provides a field of 13 arcsec (3 mm) and a scale at the
CCD autoguider of 0.27 arcsec/pixel. The fine probe provides a field 
of 4.4 arcsec (1 mm) and a scale at the CCD autoguider of 0.13 
arcsec/pixel. The fine fibre is UV transmitting, for guiding in the UV,
the coarse fibre is not. The larger field of the coarse probe means 
that this is more useful for most applications. The fine probe is only 
useful for acquisition and guiding in the UV, or in conditions of 
superlative seeing.

The autoguider probes are mounted on an (x,y) table, making it 
possible to move them around the reflected focal plane in order to 
pick up the image of a potential guide star. The probes can be
positioned in steps of 20~$\mu$m (about 0.09 arcsec). The probes 
can also be moved in the z direction in order to focus the image.
The stepsize for the focus movement is 53~$\mu$m; one z--step 
gives a change in image-size of about 0.02 arcsec.

{\em N.B. Remember---when filters are used in the main beam, and the WHT
focus is adjusted to take account of this, the autoguider focus must 
also be adjusted to compensate for the change in WHT focus. \\
It is planned to fully automate this process of focus compensation 
before 1995, but for the present it must be done manually.} 

During object acquisition, the coarse probe is used to view the field 
at the rotator centre, with the autoguider mirror positioned
so that all the light from the telescope is directed down into 
the reflected focal plane. During an exposure, either guide probe might be 
used for autoguiding on an offset guide star in the outer part of the 
field.     

The light from the autoguider probes can be independently filtered,
by means of a 12 position filter wheel. The autoguider filters are
permanently mounted, and are summarised in Tab.~\ref{tab:autofilt}.
All filters are 2 mm thick, including the fused silica filter in
the clear position. Transmission curves are shown in Fig.~\ref{fig:acurves}.

The optical path which transfers the image output from the fibres to the
CCD autoguider is fairly complex. It is summarised here for information
only; see the nasmyth A\&G Unit optics manual for a more detailed
description. The output from the coarse fibre is first redirected by 
a 45 degree  mirror, then bought to a focus in an intermediate focal 
plane by a pair of achromats. The outputs from the fine fibre and 
the slitviewing fibre (see section~\ref{sec:abeam}) also appear in the 
intermediate focal plane, 
injected into the lightpath by means of prisms on the ends of the fibres. The 
intermediate focal plane therefore contains images of all three fibre
outputs, slightly offset from one another. This combined image is then passed
through the  autoguider filter wheel, and finally reimaged onto the
CCD autoguider by means of two off-axis paraboloids.

Which guide probe is used is determined by reading out only a small window 
of the CCD autoguider, containing the image of the desired probe. The
CCD autoguider can be used in two modes:

\begin{itemize}

\item When being used for target acquisition, the autoguider CCD 
can be switched into a mode where the CCD window corresponding to 
one of the guide probes is continuously read out. The target can 
then be centred on the probe.

\item When being used for autoguiding, the procedure
is first to read out the entire autoguider CCD. The
autoguider software will then search for suitable
guide stars in any of the windows. The observer can
then ask the autoguider to start generating guide errors
by centroiding on one of these stars.

\end{itemize}


\subsection{Return beam from slit to CCD autoguider}
\label{sec:sbeam}

The image reflected from the centre of the slit jaws can be viewed on
the CCD autoguider by means of a fibre-optic image guide, identical to 
the fine guide probe discussed in section~\ref{sec:abeam} (i.e. field of 
view of 4.4 arcsec, scale of 0.13 arcsec/pixel, UV transmitting), except 
that this fibre is fixed in position. The light is filtered by the 
autoguider filter wheel, exactly as for the two guide probes.

The optical path which transfers the image to the
CCD autoguider is fairly complex. It is summarised here for information
only; see the nasmyth A\&G Unit optics manual for a more detailed
description. A mirror supported by a spider is used to view the central
part of the slit jaws. The image is relayed by this mirror and a UV--triplet
lens to a prism on the input end of the fibre image guide. This whole
assembly is supported by the slit--unit, so moves with the slit,
and so can be used at any slit--angle. The output of the slitviewer 
fibre image guide is combined with the output from the
guide fibres, and re-imaged onto the CCD autoguider, as summarised in
section~\ref{sec:abeam}.

\subsection{Return beam from slit to acquisition TV}
\label{sec:tbeam}

The slitviewer fibre image guide gives only a very small field of view.
This is adequate for verifying that the object remains on the slit
during an exposure, but is not adequate for target acquisition. An
additional means of viewing the entire field at a very coarse
scale on an acquisition TV is therefore provided. The scale is 
about 1.14 arcsec/pixel in the X direction on the TV, and about
0.73 arcsec/pixel in the Y direction. This option cannot be used 
whilst an exposure is active.

In order to use the acquisition TV to view the field, it is neccesary to
do three things:

\begin{itemize} 

\item The autoguider mirror must be moved so that the TV pickoff mirror 
views the slit. The image of the slit jaws is then relayed to an ISEC 
intensified TV mounted on top of the A\&G unit.  

\item Unlike the fibre slitviewer, the pickoff mirror for the acquisition
TV is not attached to the slit unit, and so does not move with the slit; 
in order for the return beam from the slit to reach the pickoff mirror,
the slitangle {\em must} be set to zero degrees.

\item The return beam from the slit to the 
pickoff mirror has to pass through the main 
filter wheels; in order to make this possible, the filter wheels must all 
be moved to position 1, so that the beam can pass through specially cut 
holes in the wheels.

\end{itemize}

Even once these actions have been carried out, the field of view of the
TV will still be obstructed; the slit-viewing probe obstructs both the
beam from the telescope to the slit, and the return beam from the slit
to the pickoff mirror.  Fig.~\ref{fig:TVfield}
is a sketch of the TV field, showing the following features:
      
\begin{itemize}

\item The slit itself appears vertical on the TV, running from
top to bottom of the image.

\item There is an obstruction in the centre of the field, preventing
the TV from viewing the central part of the slit. This obstruction
is the slit viewing probe (see below), with its 3 support vanes. 
Since the slitviewing probe and TV both view the slit from the same
angle, it is inevitable that the slitviewing probe obstructs 
the central part of the TV field.

\item There is a further obstruction close to the lower right-hand edge
of the TV field. This obstruction is again the slit-viewing
probe, but this time obstructing the beam from the telescope
to the slit, rather than the return beam from the slit to the
TV.

\item The dekker slide appears in front of the slit jaws, and
contains a dekker mask designed to restrict the slitlength.
The shape of the dekker mask (normally referred to as the
'concorde' dekker) is illustrated in Fig.~\ref{fig:concorde}. 
It moves across
the TV field from right to left, with the narrow end of
the dekker appearing on the right--hand side. Fig.~\ref{fig:TVfield}
shows the appearance of the TV field with this dekker 
mask in different positions. 


\end{itemize}

\begin{figure}
\vskip 20cm
\caption[Field of acquisition TV]{Field of acquisition TV}
\label{fig:TVfield}
\end{figure}

In order to use the TV to view the slitjaws, it is first necessary 
to move the dekker mask out of the way, by moving it to 
close to the top end of its range of movement.

Since the central part of the TV field is obstructed, it is
not possible to use the TV to centre an object on the slit directly.
After pointing the telescope at a new object, the normal 
procedure is to apply a standard aperture offset. This will offset
the telescope so that the object appears in an unobstructed part 
of the TV field. The object can be centred up, and the 
aperture offset then removed to place the object back on the slit. 
\footnote{For higher centering accuracy, place the autoguider probe at 
its central position (ICL command {\tt UAGXY 35540 41200}). Then 
centroid on the star, move the image to a standard position previously 
calculated to correspond to the centre of the slit in both directions. 
By repeating this procedure with a temporarily closed shutter (use the 
ICL {\tt PAUSE UES} command followed by {\tt CONTINUE UES}), proper 
tracking can be checked during the exposure.}   

\subsection{Beam from calibration unit to spectrograph}
\label{sec:cbeam}

The calibration unit is a separate unit mounted to one side of the main 
A\&G unit. Light from the calibration unit enters the A\&G unit via a 
bellow--like interface, and is injected into the main beam to the 
spectrograph by means of a 45 degree mirror mounted on the end of 
the autoguider mirror.

At the end of the calibration unit furthest from the A\&G 
is a set of six lamphouses arranged in a fan. Four of these lamphouses
currently contain lamps; ThAr and FeAr lamps for wavelength calibration, 
and Tungsten and Deuterium lamps for flatfields. In normal use the ThAr 
is the lamp of choice for wavelength calibration, and the Tungsten lamp 
for flatfields. The lamps are driven
by the same type of constant--current power supply as used at Cassegrain;
these are mounted in the A\&G electronics rack. 

Each lamphouse has a shutter, so that it is possible in principle to 
leave the lamp on for it to stabilise before using the lamp. In practice
this is not done, due to the limited lifetime of the lamps.

In normal operation, the light from each lamp is fed via condensor
lenses into a 6--input, 1--output fibre--optic lightguide, the output 
from which is randomised. This fibre-optic mixer makes it possible to 
use as many lamps as desired simultaneously.  The output of the 
fibre-optic mixer is re-imaged by a transfer lens to form the system 
pupil. At this pupil it is possible to locate a diffuser 
and an aperture mask, which mimic the pattern of illumination of
the telescope pupil (in particular, the secondary obstruction). 
Another lens re-images this pupil model to form a virtual image at
the same distance as the telescope pupil. 

There is a choice of two diffusers, one for UV work and one for 
broadband work. In practice, the diffuser greatly reduces the 
throughput of the calibration system, and is often moved 
out of the beam completely. Under these circumstances the 
pupil of the calibration system does {\em not} fully mimic that of the 
telecope. Note that the diffuser cannot be moved under computer 
control; it must be moved manually, and only by a properly trained 
member of staff. 

There are two other means, less frequently used, for increasing the
intensity of the calibration source. It is not possible to select
either of these options under computer control; they must be set--up
by a properly trained member of staff.

\begin{itemize}

\item Instead of re-imaging the ouput of the mixer onto the diffuser,
it is possible to use a condensor to concentrate the light onto the centre
of the slit. When used without diffuser, this yields a much greater 
intensity for short slit/point source observations. 

\item The fibre-optic mixer reduces the intensity of the calibration 
lamps by a factor of 6; if an observer only needs to use one calibration 
lamp, and it is important to get the maximum intensity, it is possible 
to replace the mixer by a one-to-one lightguide, which efficiently relays 
the light from one lamp onto the diffuser. With this option, the obsever
must decide whether to select a flatfield {\em OR} wavelength 
calibration source; both cannot be selected!

\end{itemize}

Just before the diffuser are two filter wheels, for colour and 
neutral--density filtering of the calibration light. The filters
contained within these wheels are summarised in Tabs.~\ref{tab:compfiltc}
and \ref{tab:compfiltnd}. Transmission curves are shown in 
Figs.~\ref{fig:cccurves} and \ref{fig:cndcurves}.
\footnote{
the general philosophy of filter use is to use main-beam filters to:
\begin{itemize}
\item reject unwanted wavelengths (far red for CCD, blue for the IPCS, 
all except one order for long-slit work).
\item match object flux to detector in use so as to avoid saturation 
(mainly a point of consideration with IPCS-II).
\end{itemize}
Having determined the correct main-beam filter for the science exposure,
these must also be used for calibration exposures. 
} 

\subsection{Details of the 1994 upgrades to the UES A\&G unit}
\label{sec:AGupgrade} 

During the summer of 1994 it is expected that an improved A\&G unit will 
be installed and commissioned at UES. The features that will be offered by
the new unit are detailed below:

\begin{center}
REQUIREMENTS FOR UES FIBRES ENHANCEMENT
\end{center}

\begin{enumerate}
\item Only 2 fibres bundles will be required, one for slit viewing and one 
    for off-axis guiding.  It will be possible to view the fields 
    from both fibres on the CCD simultaneously.
\item The enhanced optical/fibre system will work with
    the existing autoguider head.
\item  Each fibre will have a field of view of $20 \times 20$~arcsecs
\item Image scale on CCD will be in range 0.15 to 0.2 arcsec/pixel
\item Overall improvement in sensitivity of off-axis channel 
    will be at least a factor of 20, with a factor of about 10 or possibly 
    more from the fibre/optical components, and a factor of 2 from 
    the autoguider CCD.  This should take the limiting magnitude to
    about 17th in V.
\item Overall improvement in sensitivity of slit-view channel 
    to a similar limiting magnitude (ie. to about 17th magnitude
    including the CCD improvement).
\item  Wavelength coverage will be 400-700 nm. 
\item It will be possible to adjust the focus for each fibre
\end{enumerate}

Additional related enhancements that will be provided are:
\begin{itemize}
\item The range of ND filters will be re-specified.
\item The TCS software will be modified to cope with differential refraction
\item A thinned CCD will be provided in the autoguider head.  This will 
   almost certainly be an EEV device, to minimise the changes required to
   the existing autoguider system.
\item It will be possible to guide using either fibre
\item The autoguider software will allow read out and 
   display of both windows, whilst guiding on either.  
\end{itemize}



\vfill
\eject


\chapter {\bf Instrument performance}
\label{chap:performance}  
\outerhead{\large\bf Performance}

\section{Stability}

        The instrument is extremely stable. Over a 12 hour
        period, with the telescope slewing and tracking,
        no line-shifts greater than 5 microns were measured.


\section{Repeatability}

\section{Scattered light}

        Stray-light, measured between interference orders
        and on stars with black absorption lines, is at a
        very low level, of about 2-3 per cent.

\section{Ghosting}

\section{Throughput}

    The efficiency of the spectrograph, excluding
   the telescope, image derotator and detector, is expected
   to be about 36 per cent. This assumes an efficiency for
   the cross-disperser of 86 per cent, for the echelle of
   60 per cent, and for the camera of about 70 per cent.

   The total throughput of the spectrograph also depends on
   the slit width. A wide slit will let in more light, but will
   degrade the wavelength resolution, and the optimum tradeoff
   between these considerations will vary from observation to
   observation. 

   For a one arcsecond slit, the limiting magnitude of the instrument,
   defined as the magnitude of a star from which 100 counts per 
   resolution element is obtained at a wavelength of 5500 \AA
   with an exposure time of 10,000 seconds, is estimated to be about m$_v$=17.5.

  The throughput of UES+WHT is in fact measured to be very similar
  to that of UCLES+AAT. The extra light collected by the
  WHT is lost in the derotation optics. In general we therefore
  expect UES+WHT to go slightly deeper than UCLES+AAT, due
  to the better seeing conditions on La Palma.


\vfill
\eject



\chapter {\bf Observing with UES}
\label{chap:operation}  
\outerhead{\large\bf UES observing}



\section{Starting up}

\subsection{Instrument control microprocessor}

The UES 4MS microprocessor control system should normally have
been left running. If for any reason you need to reinitialise
or reload the system, press the red reset button on the 4MS. (This is 
located behind the top panel of the 4MS computer rack, you may need to 
unscrew the cover plate to access the red button.)
This will load the system from Eprom.

Having loaded the system, you will need to initialise all mechanisms. 
You can do this from the instrument control computer by typing
{\tt UES\_INIT ALL} at the ICL prompt. 
This takes a long time (about 15 minutes),
so don't reinitialise the 4MS unless you have to.

\subsection{Instrument control computer}

To start up the instrument control computer log on to the instrument 
control VAXstation (LPVS2 as of 1994) as either OBSERVER or OBSTEST 
(passwords WHT\_OBSERVER and WHT\_OBSTEST 
respectively), depending on whether you're running the standard or the test 
system; check the the whiteboard in the WHT control room to see which 
account you should run up.  Then set host to LPVF and login again
with the same username and password. You are now logged into the instrument
control computer.

To start the observing system simply type ICL. You will be prompted
for your initials and PATT/CAT reference number, and then asked to 
select from a menu the instrument combination you want to use. This will
be either UES+CCD or UES+IPCS depending on which detector is mounted. 

If using a CCD, the correct detector must have been defined in {\sc
[observer.config]wht\_detectors.dat} (or {\sc
[obstest.config]wht\_detectors.dat} if logged on under OBSTEST). The
correct values will have been entered by the Duty Technician or Support
Astronomer for you.

\subsection{Instrument hardware}

Once the control system has been started, check that the lightpath 
through the instrument is clear:

\begin{itemize}

\item The darkslide should be opened at the start of the night.
This is normally done by the telescope operator. It should be closed
again at the end of the night, to prevent dust entering the instrument.

\item Check on the mimic that the interface cover is off --- this is a 
manually operated safety shutter blocking light to the detector. If it is
not, it will have to be moved manually; the support astronomer should
normally do this.

\item The camera shutter should be open. If the 4MS has been reset it 
will be closed, in which case type {\tt UCAMSHUT OPEN} at the ICL prompt.

\end{itemize}

\subsection{Telescope Control Computer}

Starting up the instrument control computer should automatically start
up the Telescope Control Computer. The following commands should then be
issued, normally by the telescope operator:

\begin{tabular}{lll}
TCS$>$ & {\tt UES DEROT} & Select UES focal station with derotator\\
TCS$>$ & {\tt INSTRUMENT UES} & Define correct instrument offsets \\
TCS$>$ & {\tt AGSELECT UESCOARSE} & Define autoguider in use \\
TCS$>$ & {\tt ENTER APERTURE 1 -0.5 -3.4} &  Define apoff onto slit \\    
TCS$>$ & {\tt ENTER APERTURE 2 -76.5 -5.4} &  Define apoff for TV acquisition 
\end{tabular}

\subsection{Acquisition TV}

The UES TV system should be switched on as described in the WHT Users
manual. The H scan switch should be up and the V scan switch down.

Mark the TV pixel (148,217), since this will be used as the reference
point for object acquisition.

\subsection{Autoguider}

The autoguider should be powered up as described in the WHT users
manual. Once it has booted, type UES LOAD, and then START-UP.

\subsection{Input of user source catalogue}

At this stage it is usual to input the observer's target source 
catalogue. This can be prepared before hand on one of the VAX/VMS 
machines and then transferred across to the TCS.

The input file should be a simple {\sc ascii} file containing details of
one source per line, of the format:

{\tt 
<source\_name> <right\_ascension> <declination> <equinox>
}

an example might be:

{\tt HD123456 12 34 56.789 11 22 33.44 B1950}

The file can then be transferred to the TCS with the TCS command {\sc 
include} {\tt <catalogue\_name>}. An example might be:

TCS$>$ {\tt INCLUDE LPVE::DISK\$USER1:[GUEST02.CAT]TARGETS}

where the file TARGETS.CAT will be transferred to the TCS.

Full details can be found for these commands in the WHT Users' Manual 
(1994). 

\vfill
\eject

\section{System checks}

Normally the detector should have been mounted so that with the wideband 
collimator and no focal modifier lens, the collimator focus is close 
to the middle of range. If there is time it is sensible to use a 
Hartmann test to check the focus of the spectrograph before the start 
of each nights observing. How to do this is described in 
section~\ref{sec:collfocus}.

\begin{quote}
\bf The performance of UES is constantly monitored. Various quality 
control procedures are carried out at the start of each run. The Support
Astronomer will ensure that the QUALITY CONTROL procedures detailed in 
the UES QUALITY CONTROL folder are carried out.
\end{quote}


*** Include here sections from the quality control folder. ***

\vfill
\eject



\section{Starting observing}

\subsection{Telescope and autoguider focus}
\label{sec:telfoc}

It is necessary to check the focus of the telescope 
at the start of the night. The various means of viewing the field
in order to do this are described in section~\ref{chap:NAG};
there are three fibre light guides, one in a fixed position viewing 
the central part of the slit, and two which can be moved to view 
stellar images in any part of the field directly. In addition, an 
ISEC TV can be used to view most of the field reflected off the 
slitjaws, but at a rather coarse scale.

The focus of the ISEC TV and the slitviewer probe can only be adjusted
manually, and should not need to be checked. However, the focus of
the coarse and fine autoguider probes can be changed under computer
control, and should be checked.

The first thing to do is focus the telescope. The ISEC TV provides
too coarse a scale for this to be done accurately, and so it will
be necessary to do this on one of the three guide probes. The focus
of the telescope and the focus of the offset guide probes are 
interdependent, so until the focus of the offset guide probes has 
been determined it will be necessary to focus on the slitviewing fibre. 

To focus on the slitviewing fibre, acquire a star onto the slit,
and start the autoguider continuously reading out the slitviewer
CCD window (section~\ref{sec:acqprac}). Close the slit right down
and move the dekker out of the way (type {\tt USLITWIDTH 20 MICRON}
and {\tt USLITLEN 10 ARCSEC} at the ICL prompt). Use the TCS handset to
move the star slightly off the slit, and then focus the
he focus of the offset guide probes has 
been determined it will be necessary to focus on the slitviewing fibre. 

To focus on the slitviewing fibre, acquire a star onto the slit,
and start the autoguider continuously reading out the slitviewer
CCD window (section~\ref{sec:acqprac}). Close the slit right down
and move the dekker out of the way (type {\tt USLITWIDTH 20 MICRON}
and {\tt USLITLEN 10 ARCSEC} at the ICL prompt). Use the TCS handset to
move the star slightly off the slit, and then focus the
telescope. This will be difficult, since the field viewed by
this fibre is extremely small !

A more reliable focus can be obtained by acquiring a bright star and 
taking quick exposures at a number of telescope positions. The FWHM of 
the stellar spectrum can be measured using either the DMS or {\sc iraf} 
on the SPARCstation. By plotting FWHM against telescope focus, the best 
focus can be determined. 

It should be noted that the telescope focus is expected to be 
different to that obtained at Cass. It will also be different
with and without the derotation optics mounted. Inserting the derotation
optics requires the telescope to be refocussed by moving the secondary 
mirror downwards by 3.82 mm (see La Palma Technical Note 9). 
See the telescope log or the quick reference section of this
manual for previously used focus settings.

Once the telescope is focussed, focus the autoguider by
acquiring a star onto the coarse guide probe, and starting 
the autoguider continuously reading out the coarse guide probe
CCD window (section~\ref{sec:acqprac}). Adjust the autoguider focus
using the {\tt UAGFOC} command. The autoguider
filters all have the same thickness (including the clear position,
which is actually fused silica), so the focus is independent of 
which filter is selected.

Once the autoguider focus has been checked, at the start of an 
observing run, it should be fairly stable from night to night. It 
should then be possible to check the telescope focus each night
by acquiring a star onto the coarse guide probe, and 
continuously reading out the CCD window whilst
adjusting the focus using the TCS handset.

{\em N.B. Remember---the WHT focus (and consequently the autoguider 
focus) will need to be adjusted to compensate for any change in the 
thickness of main-beam filters used (see sec.~\ref{sec:mbeam}).}


\subsection{CALIBRATE procedure}

Before starting to observe astronomical targets, the CALIBRATE
procedure should be carried out.
It is extremely important not to skip this, since the efficiency 
of object acquisition with UES depends critically on the telescope 
pointing, much more so than with the Cassegrain instruments. 

The CALIBRATE procedure is described in general terms in the telescope
manual. The procedure with UES differs from carrried out at Cassegrain,
in that instead of centring stars on the field-viewing TV, stars
should be centred on the coarse guide probe, with the guide probe 
positioned at the rotator centre with the ICL command {\tt UPROBEVIEW}. 
The autoguider window corresponding 
to the coarse guide probe should be read out continuously, whilst each 
star is centred using the TCS handset. 

The commands to do this are as follows. Commands with the ICL prompt
are issued from the system computer, commands with the TCS prompt
are issued from the Telescope Control System, and commands with
the A\&G prompt are issued from autoguider VME system.

\begin{tabular}{lll}
A\&G$>$ &   1 READOUT-FIBRE & Start continuous readout of coarse probe \\
ICL$>$ &   UPROBEVIEW & More guide probe to rotator centre, move AG mirror\\
TCS$>$ &   CALIBRATE &  Start calibrate procedure \\    
       &     -       &   \\
       &     -       &  Centre all the stars using TCS handset \\
       &     -       &  \\
A\&G$>$ &   STOP-TRACK &  Stop AG continuous readout
\end{tabular}

\vfill
\eject

\section{Acquisition and guiding}

The Nasymth A\&G provides facilities for object acquisition, and
for guiding off both offset guide stars and the slit image. These
facilities are described in section~\ref{chap:NAG}, and
summarised in Tab.~\ref{tab:fvoptions}. 
Sections~\ref{sec:acqprac} and \ref{sec:guiprac} describe 
how to carry out acquisition 
and guiding, whilst section~\ref{sec:AGlimmag} describes the 
limiting magnitude of the system.

\begin{table}[hbt]
\caption{Options for field viewing and guiding}
\label{tab:fvoptions}  
\begin{tabular}{llll}
Option             &   Field      &   Scale      &  Notes \\
                   &   (arcsec)   & (arcsec/pix) &        \\ 
                   &              &              &       \\
TV slitviewer      & $\approx$300 & 1.4 in X     & Centre of slit not visible\\
                   &       & 0.8 in Y     & TV not useable during an exposure \\
Coarse guide probe &  13      & 0.27  & Not UV ($<3500$\AA\ transmitting)\\
Fine guide probe   &  4.4     & 0.13          & UV transmitting \\
Slitviewing probe  &  4.4     & 0.13          & UV transmitting
\end{tabular}
\end{table}

\subsection{Object acquisition}
\label{sec:acqprac}  

The three principal field viewing options described above (TV slitviewer,
coarse guide probe, slitviewing probe) provide a sequence of improving
plate scale at the cost of decreasing field of view. For objects bright 
enough to be visible with all three options, the most
general acquisition sequence is to use the TV slitviewer for 
field verification and coarse centering of the target, then
to switch to the coarse guideprobe to centre up more accurately,
and finally to switch to the slitviewing probe to centre up on the
slit. 

{\em Experience has shown that exposures are often not sufficiently well
centred on the slit. An automatic procedure using the coarse guide probe
to accurately centre on the slit as a last step in the centering process
is under development---check with your support astronomer for status.}

In practice, as long as the telescope is performing properly, and the
target coordinates are accurate, it is not usually necessary to carry out 
first step in this sequence. It is possible to acquire a
target directly onto the coarse guide probe. The TV is therefore
only needed in cases where uncertainty over the field exists, due perhaps to 
inaccurate coordinates.

The majority of UES observations will require the sky PA of the
spectrograph  slit
to be set to the parallactic angle. Two options exist here, either to 
have the rotator track the parallactic angle during the obervation, or 
to set the rotator (static) at or near the parallactic angle at the start of 
the observation. Ask the telescope operator to do 
this before starting the acquisition process.

The three field-viewing options view different parts of the telescope
focal plane, and it is therefore necessary to define three apertures
in the focal plane. It is then straightforward to apply an aperture
offset to move between these three apertures. Table~\ref{tab:apoffs} 
summarises the parameters of these three apertures.

\begin{table}[hbt]
\caption{Aperture offsets for UES acquisition}
\label{tab:apoffs}  
\begin{tabular}{lccl}
Aperture no  &   X offset  &   Y offset & Function \\
             &    (arcsec) &   (arcsec) &          \\
0            &      0      &     0      &  For viewing rotator centre \\
             &             &            &  using coarse probe at (35540,41200) \\
1            &     -0.5    &   -3.4     &  For viewing centre of slitjaws \\
             &             &            &  using slitviewing probe \\
2            &    -76.5    &   -5.4     &  For viewing slitjaws using \\
             &             &            &  unobstructed part of TV field \\
             &             &            &  TV coordinates are (148,217)
\end{tabular}
\end{table}

The detailed procedure is as follows. Commands with the ICL prompt
are issued from the system computer, commands with the TCS prompt
are issued from the Telescope Control System, and commands with
the AG prompt are issued from autoguider VME system.

\begin{tabular}{llp{10cm}}
TCS$>$ & {\tt GOCAT NGC4151} &  Move telescope to target \\    
TCS$>$ & {\tt APER 2} &  Apply aperture offset to unobstructed part of TV field\\    
ICL$>$ & {\tt UTVVIEW} & Configure A\&G for TV viewing \\
       &          & Use TCS handset to centre object on TV pixel (148,217) \\       
TCS$>$ & {\tt APER 0} & Apply aperture offset to rotator centre\\    
ICL$>$ & {\tt UENDTVVIEW} & Reset slit angle and dekker \\
ICL$>$ & {\tt UPROBEVIEW} & Move guide probe to rotator centre, move AG mirror\\
A\&G$>$ & {\tt SELECT COARSE} & Select coarse probe \\
A\&G$>$  & {\tt ACQUIRE ON}  & Start continuous readout of coarse probe \\
       &          & Use TCS handset to centre object \\       
TCS$>$ &   APER 1 & Apply aperture offset to slit\\    
A\&G$>$  & {\tt AQUIRE OFF}   &  Stop continuous readout of coarse probe \\
A\&G$>$ & {\tt SELECT FINE} & Select fine probe \\
A\&G$>$ & {\tt ACQUIRE ON}  & Start continuous readout of slitviewing probe \\
       &          & Use TCS handset to centre object 
\end{tabular}

Note that in order to use the TV viewer, the {\tt UTVVIEW} procedure sets
the slitangle to zero and moves the dekker out of the beam. 
Before you start observing again the slitangle
and the slitlength must be reset to their previous values with the command 
{\tt UENDTVVIEW}.

For objects too faint to be visible on the field-viewing probes,
the procedure summarised above should be followed on a nearby bright
star, and a blind offset then used to centre the target on the slit.


\subsection{Guiding}
\label{sec:guiprac}  

\subsubsection{Autoguiding using offset guide stars --- found using GSS}

The principal difference between offset guiding at Cassegrain and with
UES is the much smaller field visible through the Nasymth A\&G guide
probes.  It is essential to have some means of predicting where to put
the guide probes in order to pick up a guide star.  The Guide Star
Server is now available and provides a useful means of quickly locating
guide stars. 

The normal procedure for offset guiding is to use the Guide Star Server
(GSS) to locate a guide star.  Documention for the GSS is located in the
WHT Control Room.  The GSS is presently run on the ING VAX/VMS cluster
to which you should have a GUEST account.  To set up the symbols needed
to run the GSS, execute the command procedure:

{\tt @DISK\$USER3:[GSS]GSS\_INIT}

Then type {\tt GSS} to start the software, which will respond  with 
a  GSS$>$  prompt. 
A simple GSS session follows:

\begin{tabular}{lll}
\$ GSS & \\
GSS$>$ &  CONFIG WHT UESCOARSE & Configure for UES \\
GSS$>$ &  ROTATOR  {\em n}  & Set  rotator to position  {\em n} \\
GSS$>$ &  SEARCH 12  34 56.23 30 00 02 J2000 & Coords of science object \\
GGS$>$ &  EXIT & End session  \\ 
\$ TYPE  OUTPUT.GS & 
\end{tabular}

This finds upto the 10 brightest guide stars available for 
the WHT UES focus at the specified position for rotator 
position angle {\em n} (where the rotator position angle is the rotator 
position on the sky---often set to the parallactic angle for 
observations of point sources). 
The position and probe coordinates for the guide 
star are given in OUTPUT.GS, which is the default output file name.  
.
the required slitlength. The larger the field required
at the slit, the smaller the field available for finding
guide stars; this is a critical tradeoff to consider, particularly
out of the galactic plane, where the number of guide stars
available is small.
Table~\ref{tab:AGholes} summarises
the unvignetted and partially vignetted field provided by each of the options.
Figure~\ref{fig:vignetting} shows plots of the vignetting along the slit.

Having got light from the guide star down the guide probe, the procedure
to follow is almost identical to that for guiding at Cass. Take a test 
exposure to locate potential guide stars, start generating guide errors,
and tell the telescope to start correcting for the guide errors. It is
possible to vary the autoguider integration time, and also to select 
from a range of autoguider filters.


The detailed procedure is as follows.  This example assumes observations
using a short slit, and autoguiding using the coarse guide probe. 
Commands with the ICL prompt are issued from the system computer, and
commands with the TCS prompt are issued from the Telescope Control
System, whilst commands with the A\&G promopt are given at the
autoguider terminal. 

\begin{tabular}{llp{10cm}}
A\&G$>$ & UES & Select UES focal station for autoguider\\
& & Should be selected at start of each night - once only\\
TCS$>$ &  AGSELECT UESCOARSE & Tell TCS which guide probe is being used\\
       &                     & (Relevant options are UESCOARSE or UESFINE)\\
ICL$>$ &  UMIRROR SHORTSLIT & Select appropriate position of autoguider mirror\\
       &            & (Relevant options are POINTSOURCE, SHORTSLIT, LONGSLIT)\\
ICL$>$ &  UAGXY COARSE x y  &  Drive coarse guide probe to pick up guide star\\
A\&G$>$ & SELECT COARSE & Select coarse fibre \\
A\&G$>$ & ACQUIRE ON & Turn on continous acquistion \\
A\&G$>$ &  ACQINT {\em n} & Set integration time ({\em n})of test exposure in msecs\\
A\&G$>$ & ADD SLIT & Should see target on slit, guide star on coarse probe\\
& & At this stage tweak the telescope position to ensure that the target is on the slit\\
& & The coarse probe may need to be moved slightly to re-centre the guide star\\
A\&G$>$ & ACQUIRE OFF & Turn off continous acquistion \\
A\&G$>$ & SELECT COARSE & Select coarse fibre for guiding\\
A\&G$>$ & ADD SLIT & Show slit as well\\
A\&G$>$ & GUIDE ON & Close loop and start generating guiding errors\\
A\&G$>$ & GUIINT {\em n} & Adjust guide time - typically 1000---2000 msecs\\
TCS$>$ &  AUTOGUIDE ON & Start telescope guiding \\
\end{tabular}

Before moving to a different target , type: 

\begin{tabular}{lll}
TCS$>$ &  AUTOGUIDE OFF & Stop telescope guiding \\
A\&G$>$ &  GUIDE OFF  & Stop generating guiding errors
\end{tabular}

Note that it is not necessary to use the PROBE command to
tell the TCS the guide probe coordinates. This is necessary
at Cassegrain because the autoguider orientation is a 
function of the probe coordinates; this is not the case
at Nasymth. Further the A\&G FIELD command is not needed at UES. 

\noindent {\em Ful details on the use of the autoguider can be found in
the WHT Autoguider User Manual.  \\ [1ex] It is planned to eventually
implement all commands presently issued at the A\&G console at the ICL
console.  }



\subsubsection{Autoguiding using offset guide stars---found using TV}

In cases where there is no suitable guide star found when using the
Guide Star Server, it is possible, before starting an exposure, to use
the TV slitviewer to search for possible guide stars in the outer part
of the field.  The coordinates of the guide star can then be read using
the TV cursor, and either the coarse or fine guide probe driven to the
correct position to view that guide star. 


The following points should be noted:
\begin{itemize}
\item Using the TV viewer to select guide stars requires the slit angle 
to be set to zero degrees and the dekker to be moved out of the
beam. Having selected the guide star, it is
important to remember to set the slitangle and slitlength back to 
that required for the observation with the command {\bf UENDTVVIEW}.
\item  The relationship between guide probe coordinates and TV 
coordinates may change, for example if the TV is exchanged. If
this happens, the relationship must be recalibrated as discussed
in section~\ref{sec:rotenc} 
before the procedure described here can be expected to work. 
\end{itemize}

The detailed procedure is as follows.  This example assumes observations
using a short slit, and autoguiding using the coarse guide probe. 
Commands with the ICL prompt are issued from the system computer,
commands with the TCS prompt are issued from the Telescope Control
System, and commands with the A\&G prompt are entered at the A\&G
terminal. 

\begin{tabular}{lll}
TCS$>$ & {\tt AGSELECT UESCOARSE} & Tell TCS which guide probe is being used\\
       &                     & (Relevant options are UESCOARSE or UESFINE)\\
ICL$>$ & {\tt UTVVIEW} &  Setup for slit viewing of field \\    
       &           &  Determine TV pixel coordinates (x,y) of guide star \\
ICL$>$ & {\tt UENDTVVIEW} & Reset slitangle and dekker to values required for \\
ICL$>$ & {\tt UMIRROR SHORTSLIT} & Select appropriate position of autoguider mirror\\
       &            & (Relevant options are POINTSOURCE, SHORTSLIT, LONGSLIT)\\
ICL$>$ & {\tt UGDXY COARSE x y}  &  Drive coarse guide probe to pick up guide star\\
A\&G$>$ & {\tt SELECT COARSE} & Select coarse fibre \\
A\&G$>$ & {\tt ACQUIRE ON} & Turn on continous acquistion \\
A\&G$>$ & {\tt ACQINT} {\em n} & Set integration time ({\em n}) of test exposure in msecs\\
A\&G$>$ & {\tt ADD SLIT} & Should see target on slit, guide star on coarse probe\\
A\&G$>$ & {\tt ACQUIRE OFF} & Turn off continous acquistion \\
A\&G$>$ & {\tt SELECT COARSE} & Select coarse fibre for guiding\\
A\&G$>$ & {\tt ADD SLIT} & Show slit as well\\
A\&G$>$ & {\tt GUIDE ON} & Close loop and start generating guiding errors\\
TCS$>$ &  {\tt AUTOGUIDE ON} & Start telescope guiding \\
\end{tabular}

Before moving to a different target, type:

\begin{tabular}{lll}
TCS$>$ &  AUTOGUIDE OFF & Stop telescope guiding \\
A\&G$>$ &  GUIDE OFF & Stop generating guiding errors
\end{tabular}


\subsubsection{Autoguiding on the slit image}

If no offset guide stars are available, and the object being
observed is bright enough to be visible on the slit using
the slitviewing probe, then it is possible to autoguide on
this image. The procedure is very similar to that described
above for offset guiding. It is made difficult in practice
by the small field of view available.

The detailed procedure is as follows. 
Commands with the ICL prompt
are issued from the system computer, and commands with the TCS prompt
are issued from the Telescope Control System.

\begin{tabular}{llp{10cm}}
ICL$>$ &  UMIRROR SHORTSLIT & Make full field visible at slit\\
TCS$>$ &  AGSELECT UESSLIT & Tell TCS which guide probe is being used\\
A\&G$>$ &  SELECT COARSE & Setlect coarse fibre \\
A\&G$>$ & ACQUIRE ON & \\
& & Once the target object is found, tweak the telescope to centre it on the coarse fibre\\
A\&G$>$ & ACQUIRE OFF & \\
A\&G$>$ & SELECT SLIT & now centre object on slit \\
A\&G$>$ & GUIDE ON & start generating guiding errors\\
& & Use GUIINT {\em n} to change guiding time\\
TCS$>$ &  AUTOGUIDE ON & Start telescope guiding 
\end{tabular}

Before moving to a different target, type:

\begin{tabular}{lll}
TCS$>$ &  AUTOGUIDE OFF & Stop telescope guiding \\
A\&G$>$ &  GUIDE OFF  & Stop generating guiding errors
\end{tabular}

\subsubsection{Manual guiding off the slit image}

It is possible that the object is visible on the slit, but
is not suitable for autoguiding. For example, the object
may be too extended, too faint for the software centroiding,
or the slit may be too wide for the software centroiding
algorithm. In such a case it may be possible to guide manually
on the slit image.

The procedure is to set the CCD autoguider continuously
reading out the window corresponding to the slitviewing
probe, and then use the TCS handset to guide. 

The commands to do this are as follows.Commands with the ICL prompt
are issued from the system computer, commands
with the A\&G prompt are issued from the autoguider terminal.

\begin{tabular}{llp{10cm}}
ICL$>$ & {\tt UMIRROR SHORTSLIT} & Make  field visible at slit\\
    &      & (Possible options are \\
              POINTSOURCE, SHORTSLIT, LONGSLIT, CLEAR)\\
A\&G$>$ & {\tt SELECT SLIT} & Select slit for guiding \\
A\&G$>$ & {\tt AQUIRE ON} & Start continuous readout of slitviewing probe\\
      &             & Now guide manually using TCS handset \\
& & Adjust acquire time with {\tt ACQINT} {\em n} msecs if needed \\
A\&G$>$ & {\tt ACQUIRE OFF}  & Stop continuous readout of slitviewing probe
\end{tabular}

\subsection{Limiting magnitudes for acquisition and guiding}
\label{sec:AGlimmag}  

The limiting magnitude for the coarse guide probe is at about m${\rm_v}$=14.5.
The limiting magnitude for the slitviewing probe is at about m$_{\rm v}$=15.5

\section{Spectrograph configuration}

As discussed in section~\ref{sec:uconfig}, it is necessary to specify the 
following parameters in order to configure the spectrograph to take
data:

\begin{itemize}

\item Choice of echelle grating, central wavelength and order 
      number. 

\item Slitwidth and length

\end{itemize}

The commands {\tt UCENWAVE31} and {\tt UCENWAVE79} configure the spectrograph
for observations with the 31.6 and 79.0 lines/mm echelles respectively.
The central wavelength must be specified as the first parameter.
The order number is an optional second parameter; if it is not
specified the order will be selected which puts the central wavelength
closest to the peak of the blaze function, as shown in 
Tabs.~\ref{tab:31orders} and \ref{tab:79orders}.

The required echelle grating will be moved into the beam, and the
echelle theta and gamma angles, the slit angle and the prism
position for the requested wavelength selected. The optimum
collimator will be selected (wideband or UV); if the collimator
is exchanged a predetermined focus offset will be applied.

Set the slitwidth and slitlength using the {\tt USLITLEN} and {\tt 
USLITWIDTH}
commands. The values can be given explicitly; in the case of the
slitlength it is possible to get the control system to select the
slitlength automatically by typing {USLITLEN AUTO} (the slitlength is 
set to the longest possible value consistent with there being 
adequate interorder spacing).

Some examples follow:

\begin{tabular}{lll}
ICL$>$ &  UCENWAVE79 5000 & Use 79.0 echelle at 5000 \AA\ 
(order 45 automatically selected) \\
ICL$>$ &  USLITLEN 12 ARCSEC & Set slitlength to 12 arcsec \\
ICL$>$ &  USLITWIDTH  1 ARCSEC & Set slitwidth to 1 arcsec \\
                                    \\
ICL$>$ &  UCENWAVE31 3269 & Use 31 echelle at 3269 \AA\ 
(order 174 automatically selected) \\
ICL$>$ &  USLITLEN AUTO & Set slitlength automatically 
(will be set to ?? ARCSEC) \\
ICL$>$ &  USLITWIDTH  1 ARCSEC & Set slitwidth to 1 arcsec \\
                                    \\
ICL$>$ &  UCENWAVE31 6000 95 & Use 31 echelle at 6000 \AA\ 
(order 95 automatically selected) \\
ICL$>$ &  USLITLEN AUTO & Set slitlength automatically \\
ICL$>$ &  USLITWIDTH  1 ARCSEC & Set slitwidth to 1 arcsec 
\end{tabular}

\section{Data acquisition---Notes for the observer}
\label{sec:obsnotes}

\subsection{Notes to the observer}

The reduction of spectra collected using the modern CCD and IPCS detectors
often require complex procedures in order to ensure that the best
possible results are obtained. In many cases, the dataset which the 
observer brings back from the Observatory is incomplete in the sense that
some of the data required for an ideal reuction is missing. It is therefore
vital for the observer to ensure that equal effort is paid to obtaining
a comprehensive set of calibration frames, to that which was expended on
the 'Object' frames. Different types of object will produce different
requirements in terms of calibration and the following are merely 
guidelines.  

\subsubsection{Orientation of spectra}

The detectors are frequently aligned on the Spectograph such that the
central order falls (mainly) parallel to the detector 
rows or columns. The orders themselves however, are often not parallel 
to each other.  The algorithms used for tracing orders assume the
orders run approximately in the horizontal direction.
It is therefore necessary to rotate any
column-parallel frames before reduction (through 90 degrees).

The package is very flexible as to the exact order orientation and highly
sloped and severly distorted orders can usually be extracted without
difficulty {\em provided that a tracing frame of sufficient quality is
provided}.  This will generally in the form of a 
bright star exposure, or a template trace frame such as
an exposure of a continuum lamp (with a narrow dekker preferably).

If the target object under study is sufficiently bright, then the object
frame itself can of course be used as the trace template frame. The
package is capable of tracing very poor object frames, {\em but} with the
result that the modelled order positions will be less well determined,
impacting on all subsequent phases of a reduction. The user is therefore
strongly encouraged to provide the best order tracing template possible.


\subsubsection{CCD bias frames}

A bias current is routinely applied to CCD detectors to ensure that they
are operating in as near as possible linear manner. This current has the
effect that a non-zero count is recorded in all pixels. The observer should
ensure that a number of 'bias frames' are obtained to adequately estimate
the effect. The average of the bias frames should be taken, and the result
subtracted from all other frames before using them in a reduction.
Failure to account for the bias may have a detrimentel effect on the 
S/N in the final spectrum.         

\subsubsection{CCD overscan}

CCD frames typically include a nunber of rows/columns not exposed to the
light. The pixels in these rows often contain high counts and can affect
some of the automatic reduction procedures. It is prudent to clip off
these rows/columns before reduction proceeds. They will be the same for
all frames and can thus be removed using a simple looping command procedure.


\subsubsection{Dark count }

Dark frames are essential for some applications. They are advisable when 
using on-chip binning. For CCDs, the dark current may also be high if it has
been exposed to too much light, or if power has been interrupted to a cold
chip. A number of long exposure (30 to 60 mins) dark frames should be
combined using a median filter, and the result scaled according to the
object frame exposure time. This frame may then be subtracted from the
object frame before reduction begins. If you wish to ensure that the 
error properties are accounted for then the dark frame should be copied
into the object frame variance array.

Again for CCDs only, a further advantage of collecting long exposure
dark frames is the option of deriving an independent estimate of the
rate of cosmic ray events as a function of their intensity.  This can
provide a useful comparison with long exposure object frames and a check
on how reliably cosmic ray removal has been. 


                                     
\subsubsection{Flat fielding}

A bright quartz lamp should be used with a dekker size a few steps larger
than that used for the object observations, but order overlapping
should of course be avoided. It is important to ensure that
all orders are as bright as possible. It may be
necessary to use different flat field exposures to obtain good frames
when observing in a spectral region where the quartz lamp intensity
or detector efficiency changes rapidly. Each flat field frame should be
constructed by calculating the median of a large number of runs
where possible. If you wish to include the errors on the flat field then 
they should be placed in the flat field variance array. If no variance
estimates are provided then the package will assume root N statistics apply.
The package can utilise different flat field frames for different orders
if required.

\subsubsection{CCD gain}

Many of the algorithms used assume that photon counting statistics
apply. However, it is unnecessary to correct raw frames since the
conversion factor (ADUs/photon) is prompted for when required.


\subsubsection{Arc frames}

In general arc frames should be obtained to bracket each object exposure
in time, allowing us to check that no shift has occured during the
exposure. An advantage of using a single frame (possibly generated 
by co-adding the before and after arc
frames) is that this allows the resolution of the final spectrum to be
easily investigated. This is because the arc spectrum is always
extracted in an identical manner to that of the object; using the first
(and in this case only) supplied arc frame. As with the flat field frame
it may also be advantageous to take multiple arc frames, each exposed
correctly to ensure high S/N in particular orders. The package is
capable of using a different arc frame for each order if required. 


\section{Data acquisition with the CCD}
\label{sec:dataccd}

\subsection{Setting up and acquiring data}

The data acquisition system is described in detail in the Data
Acquisition System (DAS/CCD) users manual, and hence a full description will not
be repeated here. 

To make the system ready to take data, the correct CCD format must be set 
up. Type SETUP UES at the ICL prompt.
You will be prompted for the size in $x$ and $y$ of the image, the system
will suggest default values. 
(N.B. The default sizes are also listed on the Whiteboard in the 
WHT Control Room. At present (Jan 1994) the 
two main CCD's have sizes: EEV3, EEV6: $1280 \times 1180$; TEK1, 
TEK2: $1124 \times 1124$.)

Unless you have been briefed to use an unusual CCD format, you should accept
the default values; remember that you can later cut down the size of the images
by windowing and binning.

Select the readout mode of the CCD using the {\tt TURBO, SPEEDY, SLOUCH} or 
{\tt SLOW} commands,
for example:
\begin{verbatim}
   ICL> SPEEDY UES 
\end{verbatim}
(N.B. In addition to the above mentioned readout modes there is a
further mode giving the fastest readout. This mode is called {\tt 
NONASTRO}
and is meant for setup purposes only due to the high readout noise. A
full description of the CCD readout modes can be found in the CCD
quality control folder kept in the WHT Control Room.)

To make an observation use the RUN command, for example:
\begin{verbatim}
   ICL> RUN UES 100 "NGC1068"
\end{verbatim}
This requests an observation of 100 seconds, with the observation
title NGC1068.
The system will prepare the detector, expose the detector for the requested 
time, collect the image data in the DMS, collect header information 
describing the observation, and write the image and headers to a disk 
file on the system computer.
The system will have allocated a run number to the run and will have sent you
a message stating the number. The run number is also to be 
seen on the MIMIC display.

The datafile will have been created in the directory pointed to by the logical
name RUN\_FILES. All the datafiles from a given night's observing appear in 
the same directory on disk. Type the command DIR at the ICL prompt
if you want to check the contents of this directory. The naming convention 
for files is such that run number 94151 would be written to a file named 
R0094151.SDF. (Hence in the near future: run number 10010 will be 
written as R010010.SDF).


\subsection{Quick-look and setup}

If you want to take a quick look at data, displaying it on the DMS or
SPARCstation, but not collecting header information or copying the data
to disk on the system computer, do a glance exposure:
\begin{verbatim}
   ICL> GLANCE UES  5
\end{verbatim}
In this example, a 5-second exposure is made and the data appears in 
the DMS. The data can then be inspected before proceeding further.

%The third parameter --- the exposure type --- is important if you want 
%to use the GLANCE command to take a dark exposure or bias frame 
%(see section~\ref{Ucal}.

If you decide you want to keep this data on the system computer after all,
type
\begin{verbatim}
   ICL> KEEP UES [TITLE="<title>"]
\end{verbatim}
This command will assign a run number, collect headers and write the data to
a disk file in RUN\_FILES a for a normal run.
Note that if you have changed the instrumental setup between taking the glance
exposure and saving it the headers will be incorrect.

To make an observation that you do not intend to retain, but which you want to
save to disk on the system computer, use the {\tt WINK} command.
\begin{verbatim}
   ICL> WINK UES 1 <observation type> <exposure time> [TITLE="<title>"]
\end{verbatim}
causes the data (image plus headers) to be written to 
a `scratch file' S1.SDF 
in the directory SCRATCH\_FILES.
Scratch files have headers but aren't allocated run numbers; they are temporary
files that should not be exported from LPO.

Any number of such scratch files may be created (subject to disk-space
constraints) by substituting another file number for the 1 in the command.
If you make a scratch exposure into an existing scratch file, the new data
over-writes the old.

SCRATCH\_FILES is initially the same directory as RUN\_FILES but this can be 
changed by redefining the logical name {\em at job level}.
\footnote{If you don't understand this fully, don't try it.} 

An example definition would be:

\begin{verbatim}
$ DEFINE/JOB SCRATCH_FILES <directory path>
\end{verbatim}

If you later find that you want to keep a scratch file, you can convert it
to a proper run using the {\tt PROMOTE} command.
\begin{verbatim}
   ICL> PROMOTE 1
\end{verbatim}
causes scratch file 1 to be allocated a run number and moved to RUN\_FILES.

\subsection{Windowing and binning CCD data}

To window a CCD, type the following. 
\begin{verbatim}
   ICL> WINDOW UES
\end{verbatim}
You will then be prompted for the number of windows to be set up,  and the
start position and size of each one.
Setting up more than one window per channel may be counter-productive in terms
of the final image size: discuss this with your support astronomer.

(N.B. To date (Jan 1994) the active areas of the CCD's are:
EEV---x=?--?, y=?--?; TEK---x=?--?, y=?--?. This information is also to
be found in the CCD Quality Control Folder, kept in the WHT Control Room.)

To bin the CCD, use commands such as
\begin{verbatim}
   ICL>  BIN UES 2 2 
   ICL>  BIN UES 2 1 
\end{verbatim}
where the parameters give the binning factors in $x$ and $y$.

You can temporarily disable windowing, return to reading 
out the whole CCD, and then re-enable the windows:
\begin{verbatim}
   ICL> DISABLE_WINDOWS UES
   ICL> RUN UES 10
   ICL> ENABLE_WINDOWS UES
\end{verbatim}

Note that enabling and disabling the windows does not change the binning.
Binning factors are reset to (1,1) and windows are disabled when a channel is
set up.

\subsection{Stopping and starting CCD exposures}

If you need to pause and then restart a CCD exposure, do so using the
following commands:
\begin{verbatim}
   ICL> PAUSE UES
   ICL> CONTINUE UES
\end{verbatim}

You can change the exposure time of a run in progress by issuing 
the following command:
\begin{verbatim}
ICL> NEWTIME UES <time in secs>
\end{verbatim}

If you need either to abort a CCD  exposure or stop it before the
pre-set exposure time has elapsed, you can either set a new exposure 
time as above or use the following commands:
\begin{verbatim}
   ICL> ABORT UES
   ICL> FINISH UES
\end{verbatim}
Remember that the {\tt ABORT} command throws the data away!

\subsection{Multiple sequential exposures}

For each of the single exposure commands defined above, a multiple
exposure version exists. 
\begin{verbatim}
ICL> MULTARC UES <number of runs> <time in secs>
\end{verbatim}

For example, use the following command
to take ten 60 second  science exposures:
\begin{verbatim}
   ICL>  MULTRUN UES 10 60
\end{verbatim}

\section{Data acquisition with the IPCS-II}

Full details of the IPCS-II detector are given in the IPCS-II User Guide
(Dicks et al 1989). Hence only a brief summary of its use will be given 
here.

\begin{quote}
\bf Saturation of the IPCS-II detector will destroy the S20 photcathode.
Hence caution should be used when working with this detector system in 
ensuring that strong light NEVER illuminates the detector. 
\end{quote}

\subsection{Setting up and aquiring data}

\subsection{Quick-look and setup}

\subsection{Stopping and starting IPCS-II exposures}

\subsection{Recovering from an `overillumination' situation}


\section{Calibration}

To take a calibration frame you will need to move the A\&G mirror
so that light from the calibration unit is directed into the
spectrograph, and then turn on one of the comparison lamps. You
may wish to select one of the filters in the calibration unit
filter wheels. A typical command sequence might be as follows:

\begin{tabular}{lll}
ICL$>$ &  UMIRROR ULAMPS & Move mirror \\
ICL$>$ &  ULAMPS THAR & Turn on ThAr lamp \\
ICL$>$ &  UCOMPFILTC RG780 & Select colour filter \\
ICL$>$ &  UCOMPFILTND ND3.0 & Select ND filter \\
ICL$>$ & ARC UES 30 "THAR ARC 10S" & Take arc exposure of 30s
\end{tabular}

If you require a very uniform illumination, you should use one of
the diffusers in the calibration unit. Ask your support astronomer
to select this. This should not normally be necessary, and it is
normally much more efficient to observe without the diffuser.

To take a calibration frame, use the most appropriate of the 
following commands: {\tt FLAT, SKY, ARC, MAP, DARK, BIAS} and {\tt 
FLASH}.  
The first four of these commands ({\tt FLAT, SKY, ARC, MAP})
differ only from the {RUN} command discussed above in that a different 
observation type is written
to the header, in order that data-reduction software can recognise
calibration exposures and process them accordingly. 
The {\tt DARK} command carries out an exposure 
of the specified length, but without
opening the CCD shutter, whilst the {\tt BIAS} and {\tt PREFLASH} 
commands carry out zero length exposures. 

It is possible to take multiple exposures using
one of the following commands: {\tt MULTFLAT, MULTSKY, MULTARC, MULTMAP, 
MULTDARK, MULTBIAS} and {\tt MULTFLASH}.  

\subsection{Atlas of the Thorium-Argon lamp}
\label{sec:tharatlas}

As an aid to the identification of the lines in the Th-Ar arc spectra, 
RGO has produced an atlas giving the identifications for the Thorium and
Argon lines in the spectrum of the hollow-cathode comparison lamps used 
for wavelength calibration of UES. (La Palma Tech.\ Note No.\ 91, 1993)

This publication can be found in the control room of the WHT. 
Copies can also be obtained from Bill Martin at RGO (wlm@mail.ast.cam.ac.uk).

\section{Common problems}.

\subsection{Spectrograph not configured properly}

If you get an error message saying that the spectrograph has 
not configured to a specified central wavelength, the most 
likely cause is that one of the echelle mechanisms has not reached the 
demanded position. In the first instance initialise the mechanism that 
shows {\em red} on the mimic with the command:
\begin{verbatim}
ICL> UES_INIT <mechanism>
\end{verbatim}
Then reissue the {\tt CENWAVE31} (or {\tt CENWAVE79}) command. 
If any of the mechanisms still 
fail to reach their demanded positions then call the Duty Tech or 
Support Astronomer to investigate the problem further. 


\subsection{No calibration light reaching the detector}

Check the following:

\begin{itemize}

\item The comparison lamps should be on, {\em and} the 
comparison lamp shutters open. It is possible to check
that the comparison lamps are drawing current by inspecting
the meters in the NAG electronics rack on the Nasymth platform.

\item Check the mimic to see which diffuser is in the beam.
At a wavelength of 5000 \AA, the wideband diffuser decreases 
the intensity by a factor of about 350 compared to having no 
diffuser in the beam. 
At a wavelength of 3500 \AA, the UV diffuser decreases 
the intensity by a factor of about 40 compared to having no 
diffuser in the beam. 
The diffuser is only normally essential for longslit work.
Changing the diffuser can {\em only} be done manually; ask your 
Support Astronomer.

\item Check the mimic to see that the autoguider mirror is in the
ULAMPS position.

\item Check the mimic to see whether the slit shutter
opens and closes during an exposure.

\item The echelle gratings have dust covers, which should have
been raised at the start of the observing run. The only way
to check this is by opening up the thermal enclosure, so only try 
this after trying everything else first. Only
the support astronomer or duty tech should open up the enclosure.

\item Check on the mimic display that the camera shutter is out.

\item Check on the mimic display that the interface cover is off.
The interface cover cannot be moved under computer control;
ask your support astronomer or duty tech if it needs to be
moved.

\end{itemize}

\subsection{No starlight reaching acquisition system}

Check the following:

\begin{itemize}

\item Check that the dome is not vignetting the telescope. The
dome azimuth and telescope azimuth on the telescope status
display should be the same. If not, someone has probably turned
the dome motors off.

\item Check that the primary mirror cover is open, and that
the UES Nasymth flat (Nasymth 2 on the engineering console)
has been selected.

\item Check the mimic to make sure that the dark slide has been
opened. The dark slide has to be opened manually;
ask your support astronomer or telescope operator.

\item Check that the autoguider filter is not in the opaque
position (or Nd=5.0 or 3.0!). 

\end{itemize}

\subsection{No starlight reaching detectors}

Check the following:

\begin{itemize}

\item Check that the dome is not vignetting the telescope. The
dome azimuth and telescope azimuth on the telescope status
display should be the same. If not, someone has probably turned
the dome motors off.

\item Check that the primary mirror cover is open, and that
the UES Nasymth flat (Nasymth 2 on the engineering console)
has been selected.

\item Check the mimic to make sure that the dark slide has been
opened. The dark slide has to be opened manually;
ask your support astronomer or telescope operator.

\item Check the mimic to see that the autoguider mirror is in one
of the following positions; {\tt CLEAR, POINTSOURCE, SHORTSLIT, 
LONGSLIT.}

\item Check the mimic to see whether the slit shutter
opens and closes during an exposure.

\item The echelle gratings have dust covers, which should have
been raised at the start of the observing run. The only way
to check this is by opening up the thermal enclosure, so only try 
this after trying everything else first. Only
the support astronomer or duty tech should open up the enclosure.

\item Check on the mimic display that the camera shutter is out.

\item Check on the mimic display that the interface cover is off.
The interface cover cannot be moved under computer control;
ask your support astronomer or duty tech if it needs to be
moved.

\item When using IPCS-II, check that the camera shutter is open, after 
resetting following use of the red panic button. 


\end{itemize}

\subsection{Telescope drives off object when autoguider loop closed}

This is probably because the guide errors generated by the autoguider
are being applied in the wrong sense, due to the assumed orientation
of the guide probe being wrong. Check the following:

\begin{itemize}

\item Has the correct guide probe been selected using the TCS AGSELECT
      command ?

\item Is there a possible error with the positioning of the derotation
      optics ? Check that the absolute and incremental encoders are
      reading the same value on the TCS encoders page. Check that with
      the slit angle set to zero, using the handset to move an object
      in the Y direction moves it along the slit. See Section~\ref{sec:rotenc}
      for more details.

\item Could the orientation of the guide fibre itself have been disturbed ?
      Unlikely, but see Section ~\ref{sec:probeor} for more details.

\end{itemize}

\vfill
\eject

%----------------------------------------------------------------------------


\chapter {\bf Setup and alignment procedures}
\label{chap:setup}  
\outerhead{\large\bf SETUP PROCEDURES}

\section{Checking the positioning of the derotator}
\label{sec:rotenc}

The TCS is set up so that if the UES focal station is selected
with the derotator option enabled (type {\tt UES DEROT} at the TCS), and
the slit angle set to zero, the (X,Y) coordinate system used by 
the handset will always be aligned with the spectrograph slit, 
regardless of the sky PA. Offsetting a star in Y will move it 
along the slit, and offsetting it in X should move it perpendicular 
to the slit. 

If there is any evidence that the derotator is not being positioned 
correctly (if for example attempting to close the autoguider loop 
results in the telescope driving off the object), the positioning 
of the derotator can easily be checked by viewing a star on the TV, 
and checking that the (X,Y) handset works as advertised. 

If it doesn't, the first thing to check is that the absolute and
incremental encoders are reading the same. Check this on the TCS
encoders page (type {\tt PAGE ENC} on the TCS). If they appear different,
try zerosetting the incremental encoder by typing {\tt ZERO UES ROT} 
on the TCS.

If the absolute encoder has been moved, it will be necessary
to redetermine the encoder zeropoint. The simplest way to
do this is to use the TCS {\tt ZEROSET} command to zeroset the
UES derotator to a specified position (i.e. type {\tt ZERO UES
ROT TO <position>}). Try different positions until the behaviour
of the TCS handset is as advertised above. You will now be
able to observe normally. Stop the rotator, and write down the
value of both absolute and incremental encoders as displayed
on the TCS encoders page, so that the newly determined zeropoint
can be set up in the telescope parameter file. You will be
able to observe, but until the the zeropoint has been set up in
the parameter file, it will be lost each time you shut down
and start up the TCS.

N.B. If it is neccessary to redetermine the postion of the absolute
encoder, please ensure that Telescope Operator notes this in the WHT
Log Book and also enters a fault in the Fault Database.

\section{Orientation of coarse guide fibre}
\label{sec:probeor}

If an object is visible on the coarse autoguider fibre, then using the
TCS handset to offset in the $-$Y direction should move the image
towards the top right of the CCD, and offsetting in the $-$X direction
should move the image towards the bottom right of the CCD; the angle
between the autoguider CCD y axis and the TCS handset Y axis is
approximately 70 degrees.

If this has changed, it will be necessary to use GSEXAM to modify
the TCS variable GUI\_GD\_ROTATION(3), otherwise the loop cannot be 
locked. This is the rotation angle of the autoguider CCD in radians,
currently set to 1.213 radians (about 70 degrees). Once this has
been set correctly, and the autoguider loop succesfully closed,
have the constant GUI\_GD\_ROTATION(GUI\_K\_UESCOARSE) in the
WHT.INI startup file modified and do a slow startup of the TCS.


\section{Spectrograph focus; adjusting the CCD camera}

{\em The CCD camera is routinely setup by the Duty Technician or the
Support Astronomer before the start of each run. The Observer should
not change the CCD Dewar on the camera mount.}

The steps that need to be performed to bring the spectrograph into
focus are as follows:

\subsection{Aligning the CCD Camera for Rotation}
\label{sec:rotfocus}

In order to ease extraction of the individual spectral orders the CCD
camera should be aligned so that the central order runs vertically
along the CCD. Note that due to curvature of the echellogram (see
Fig.~\ref{fig:echellogram})  it will not be possible to have all the
individual orders running vertically. The CCD camera can be rotated;
the securing Allen bolts have to be loosened, and the CCD dewar
rotated. The rotation position is measured with micrometer D. A change
in micrometer reading of +1mm gives a rotation of approximately ?? 
pixels end to end on the TEK chip.

Before and after  each adjustment to the dewar take a short glance
exposure with the echelle configured to the wavelength to be used, a
tungsten lamp and slit length set to automatic. The commands for this
would be:
\begin{center}
\begin{tabular}{llp{10cm}}
\icl & {\tt UCENWAVE31 5000} & Set 31.6 echelle to 5000\AA \\
\icl & {\tt UMIRROR ULAMPS} & Move mirror to comparison lamps position \\
\icl & {\tt ULAMPS W} & Turn on tungsten lamp \\
\icl & {\tt USLITWIDTH 1.5 ARCSEC} & Set slit width to about 2--3 pixels \\
\icl & {\tt USLITLEN AUTO} & Set slit length automatically \\
\icl & {\tt GLANCE UES 2} & Take a glance exposure \\
\end{tabular}
\end{center}
Each glance run can be transferred to the SparcStation where the \iraf 
{\sc imexamine} routine can be used to measure the position of the 
echelle order at the top and bottom of the CCD image. 

It may be neccassary to make more than one adjustment to the CCD dewar
rotational postion before the echelle orders are satisfactorily aligned
on the detector.

\subsection{Adjusting the CCD Camera for Tilt}
\label{sec:tiltfocus}

It will be neccassary to determine the tilt of the CCD camera and
adjust the CCD dewar on the kinematic mount so that it lies coplanar.
The CCD dewar tilt can be adjusted by means of the three capstans; A, B
and C.

In order to determine the degree of tilt a Hartmann test must first be
performed. This involves moving the Hartmann unit into the light path
and then taking two arc exposures with the Hartmann shutters in the up
and down positions. Measuring the Hartmann shifts at the edges of the
detector then gives the degree of tilt. For maximum accuracy the
spectrograph must be roughly in focus before carrying out these tests. 
Hence it may be neccessary carry out the collimator focus as described
in the following section before correcting for tilt.

The following commands are required at the ICL prompt in order to take
the exposures to measure tilt, issue the following commands at the ICL
console (here it is assumed that the echelle has been configured to the
desired central wavelength and that the slit length has been set):
\begin{center}
\begin{tabular}{llp{10cm}}
\icl & {\tt UHART IN} & Put Hartmann unit into the beam \\
\icl & {\tt UHARTPOS DOWN} & Put in bottom Hartmann shutter \\
\icl & {\tt UMIRROR ULAMPS} & Set A\&G mirror to comparison lamps position \\
\icl & {\tt ULAMPS THAR} & Turn on the ThAr comparison lamp \\
\icl & {\tt ARC UES 30 "UHART DOWN 30S"} & Take arc exposure (may need 
longer or shorter exposure time depending on central wavelength \\
\icl & {\tt UHARTPOS UP} & Move upper Hartmann shutter into the beam \\
\icl & {\tt ARC UES 30 "UHART UP 30S"} & Take arc exposure \\
\end{tabular} 
\end{center}
The Hartmann shifts in the positions of the arc lines taken at the
edges of the CCD frames should now be determined. At present the
easiest way to mesure these shifts is to extract portions of individual
orders of the arc from each of the corners of the image and one from
the centre. Then collapse these down to form 1-D spectra and cross
correlate the corresponding spectra from the `UP' and `DOWN' images.

(N.B. At a future date {\sc figaro} and/or \iraf routines will be
available to perform these cross-correlations automatically: please
check with your Support Astronomer if these routines are available.)

Depending on the degree and direction of the tilt it will be neccessary
to adjust the CCD dewar capstans. Below the effects of moving the
capstans are indicated:
\begin{itemize}
\item A change of +1mm of the A capstan will give a change 
in the tilt from ?? to ?? of aprroximately ?? pixels
\item A change of +1mm of the B capstan will give a change 
in the tilt from ?? to ?? of aprroximately ?? pixels
\item A change of +1mm of the C capstan will give a change 
in the tilt from ?? to ?? of aprroximately ?? pixels
\end{itemize}
After having altered the caostan settings, repeat the Hartmann
exposures and re-measure the tilt. Some iteration of this procedure may
be required before all tilt has been removed.


\subsection{Adjusting the CCD Camera for Optimal Collimator Focus}
\label{sec:collposfocus}
 
The collimator may be adjusted to bring the spectrograph into focus. If
the collimator has to be set far from its optimum position astigmatism
will result. The optimum collimator position for the {\em wide}
collimator is at about 10000 microns. If best focus is obtained outside
of the range $10000 \pm 5000$ microns then the CCD dewar should be
repositioned either further or closer to the camera mount. This is
achieved by turning capstans A, B and C by the same amount. As a guide:
\begin{itemize}
\item an increase of +1mm on the capstans will give a change in the 
collimator focus of ?? microns. 
\end{itemize}
For example, if you achieve a focus with the collimator at
20000~microns, changing the capstan settings of A, B and C by ??mm will
bring the spectrograph into focus at a collimator position of
10000~microns.

(N.B. Care here in altering the capstans should mean that no further
tilt is introduced into the system!)


\section{Spectrograph focus; adjusting the collimator}
\label{sec:collfocus}

This is the final `fine' focus of the spectrograph. This should be the
only stage that the Observer need concern him/herself with as the
previous stages will have been performed before the run starts by the
Support Astronomer or Duty Technician.

Again, use a Hartmann test to focus the spectrograph. The procedure to
follow is outlined above in Sec.~\ref{sec:tiltfocus} and briefly
repeated here:

To carry out the Hartmann test, you will have to set up the calibration
unit to illuminate the slit with a comparison lamp. 
Use a reasonably wide slit (say 2.5 pixels) so that
the line profiles are adequately sampled.
Move the Hartmann unit in, and take pairs of exposures with
the Hartmann shutter up and down for several different
collimator settings. Measure the Hartmann shift for each
pair of images. There are two ways of doing this:

\begin{itemize}
\item The faster but less accurate approach is to use the
DMS Y--FIND function. Once each image has been displayed
on the DMS, type Y--FIND on the DMS keyboard, position
the cursor on a bright/isolated/unsaturated line close
to the centre of the detector, and
hit return. The DMS will display the line profile and
calculate the line centroid. The Hartmann shift is
equal to the difference in the line centroid between
each pair of images.

\item A slower but more accurate approach is to transfer
the data to the VAX, and use {\sc figaro} to cross-correlate
each image pair. Use the {\sc figaro}  EXTRACT routine to
extract spectra from close to the centre of each image,
and use SCROSS to cross-correlate the resulting spectra
to obtain the Hartmann shift.
\end{itemize}

Plot the Hartmann shift as a function of focus, determine
the value of the focus for which the shift is zero, and
move the collimator to that position. Check the focus
by taking a further pair of exposures with the Hartmann
shutter up and down, and check that the Hartmann shift is
close to zero.

It may be useful to know that a Hartmann shift of one pixel
corresponds to a shift of about 4000 $\mu$m on the UV collimator
and about 3600 $\mu$m on the wideband collimator. If 
cross-correlating the spectrum taken with the Hartmann shutter up 
with the spectrum taken with the Hartmann down ({\sc figaro} 
command SCROSS <up-file> <down-file>) produces a negative shift, then
the collimator focus needs to be increased. 

The spectrograph focus depends on which collimator is being used
(UV or wideband) and which focal modifier lens is being used (red,
blue or none).  If either the collimator or the focal modifier
lens is changed, then it is necessary to apply an offset to the
collimator focus. Fortunately the focus is not wavelength dependent,
so the offset is constant. The offsets are summarised in
Table~\ref{tab:focoff}.

\begin{table}[hbt]
\begin{center}
\caption{Offsets to spectrograph focus}
\label{tab:focoff}  
\begin{tabular}{lll}
\\
Collimator  &   Focal    & Offset to add   \\
                 & modifier   & to collimator   \\
                 &            & focus (microns)  \\
                 &            &                   \\
Wide         &  None      &    0      \\
UV           &  None      &   $-$1700  \\
\end{tabular}
\end{center}
\end{table}

{\em N.B. In practice UES is not used with a focal modifier lens hence the
only offset of importance is when the collimator is changed from Wide
to UV (see sec.~\ref{sec:modlen[Ds}).}

In Spring 1994 an automatic \icl focus procedure will be avaliable
(probably to be called UES\_FINEFOCUS). This will take up and down
Hartmann exposures at a range of collimator positions and determine the
optimum collimator position at best focus. Please check with the
Support Astronomer for availability.


\chapter {\bf Command reference section}
\label{chap:UEScmd}  
\outerhead{\large\bf Command list}

\section{Command reference section}

This section contains a detailed description of the commands available 
for controlling UES and its A\&G unit from ICL. The order of the commands
roughly follows the light-path from the telescope to detector.

\parindent=70pt
\parskip 0pt

\vspace{7mm}
\noindent{\bf Notation: }  
%
\begin{list}{$\bullet$}{\setlength{\itemsep}{-0.5mm}\setlength{\topsep}{0mm}}
 \item  Examples of commands entered at the terminal are in typewriter font:
        {\tt USLITWIDTH 50};
 \item  Angle brackets denote parameter values or character strings:
        {\tt $<$angle$>$};
 \item  Square brackets denote optional input: {\tt [x,y]}; all other 
        parameters are obligatory;
 \item The command names are also referred to as `mechanism names', e.g.
the {\tt UES\_INIT} command.
\end{list}

\parindent=70pt

\subsection {Acquisition, comparison and autoguider mirror}

\subsubsection {UMIRROR}

Moves autoguider mirror in UES A\&G unit

\helpitem{Format:   }  {\tt UMIRROR <parameter>}
\helpitem{Parameter: } The position of the mirror. This can be a real
                      number specifiying the linear displacement of
                      the mirror, or a character string specifying one
                      of a set of standard operational positions.
\helpitem{Units:    }  mm or none
\helpitem{Range:    }  0 $<$ {\tt <parameter>} $<$ 406, or
                       one of the following character strings:
                       CLEAR, GUIDEONLY, POINTSOURCE, LONGSLIT,
                       SHORTSLIT, ULAMPS. 
\helpitem{Defaults: }  Defaults to uninitialised on power--up. \\
                       Initialises to position 203 mm.
\helpitem{Examples : } {\tt UMIRROR 0, UMIRROR POINTSOURCE}
\helpitem{Comments: }  The standard operational positions of
                       this autoguider mirror have the following effect:
                       CLEAR allows all the light through to the spectrograph
                       slit, and is the position required when the observer
                       wishes to use the TV to view the slit. GUIDEONLY
                       directs all the light to the offset guide probes.
                       POINTSOURCE, LONGSLIT and SHORTSLIT allow 
                       light from an object at the field centre to reach
                       the slit, and direct light in the outer part
                       of the field to the offset guide probe. ULAMPS
                       directs light from the comparison lamp system into
                       the spectrograph.
                       The positions CLEAR, GUIDEONLY, POINTSOURCE, 
                       LONGSLIT, SHORTSLIT, ULAMPS
                       correspond to linear displacements of
                       the mirror of 0, 83, 138, 225, 312 and 406 mm respectively.

\subsection{Autoguide probe}

\subsubsection{UAGX}

Sets X coordinate of autoguide probe

\helpitem{Format:   }  {\tt UAGX <parameter>}
\helpitem{Units:    }  microns
\helpitem{Range:    }  0  $<$ {\tt <parameter>} $<$ 73600
\helpitem{Defaults: }  Defaults to uninitialised on power-up. \\
                       Initialises to 
\helpitem{Examples : } {\tt UAGX 30000}
\helpitem{Comments: }  

\subsubsection {UAGY}

Sets Y coordinate of autoguide probe

\helpitem{Format:   }  {\tt UAGY <parameter>}
\helpitem{Units:    }  microns
\helpitem{Range:    }  0  $<$ {\tt <parameter>} $<$ 73200
\helpitem{Defaults: }  Defaults to uninitialised on power-up. \\
                       Initialises to 
\helpitem{Examples : } {\tt UAGY 30000}
\helpitem{Comments: }  

\subsubsection {UAGXY}

Sets X and Y coordinates of autoguide probe

\helpitem{Format:   }  {\tt UAGXY <parameter1> <parameter2> }
\helpitem{Units:    }  microns
\helpitem{Range:    }  0  $<$ {\tt <parameter1>} $<$ 73600 \\
                        0  $<$ {\tt <parameter2>} $<$ 73200
\helpitem{Defaults: }  Defaults to uninitialised on power-up. \\
                       Initialises to 
\helpitem{Examples : } {\tt UAGXY 20000 25000}
\helpitem{Comments: }  This is equivalent to using UAGX and UAGY separately

\subsubsection {UGDXY}

Moves the autoguide probe to the appropriate coordinates to pick up
an offset guide star seen on the slit-viewing TV.

\helpitem{Format:   }  {\tt UGDXY <parameter1> <parameter2> <parameter3> }
\helpitem{Parameter1: } Which guide probe to use (COARSE or FINE)
\helpitem{Parameter2: } X coordinate of star on TV (pixels) 
\helpitem{Parameter3: } Y coordinate of star on TV (pixels) 
\helpitem{Examples : } {\tt UGDXY COARSE 194 271}
\helpitem{Comments: }  

\subsubsection {UAGFOC}

Sets focus of autoguide probe

\helpitem{Format:   }  {\tt UAGFOC <parameter>}
\helpitem{Units:    }  microns
\helpitem{Range:    }  0  $<$ {\tt <parameter>} $<$ 200
\helpitem{Defaults: }  Defaults to uninitialised on power-up. \\
                       Initialises to 
\helpitem{Examples : } {\tt UAGFOC 100}
\helpitem{Comments: }  

\subsubsection {UAUTOFILT}

Selects autoguider filter

\helpitem{Format:   }  {\tt UAUTOFILT <parameter>}
\helpitem{Units:    }  None
\helpitem{Range:    }  1 $<$ {\tt <parameter>} $<$ 12 or filter name
\helpitem{Defaults: }  Defaults to uninitialised on power-up. \\
                       Initialises to 
\helpitem{Examples : } {\tt UAUTOFILT 6, UAUTOFILT GG495}
\helpitem{Comments: }  

\subsubsection {UAUTONAME}

Sets names of filters in autoguider filter wheel

\helpitem{Format:   }  {\tt UAUTONAME}
\helpitem{Comments: }  The procedure sets up default names, then 
                       prompts
                       for the name and position of each filter.

\subsection{Comparison system}

\subsubsection {ULAMPS}

Turns comparison lamps on or off

\helpitem{Format:   }  {\tt ULAMPS <parameter>}
\helpitem{Parameter:}  Lamp names separated by +, OFF turns all
                       lamps off.
\helpitem{Defaults: }  Defaults to off on power-up.
\helpitem{Examples : } {\tt ULAMPS THAR, ULAMPS D+W, ULAMPS OFF}
\helpitem{Comments: }  This command switches on or off the requested
                      lamps, and opens or closes the corresponding lamp
                      shutters.

\subsubsection {ULAMPSHUT}

Sets state of shutters on lamp-houses

\helpitem{Format:   }  {\tt ULAMPSHUT <parameter>}
\helpitem{Parameter:}  Lamp names separated by +, CLOSE closes all
                       shutters.
\helpitem{Defaults: }  
\helpitem{Examples : } {\tt ULAMPSHUT W}
\helpitem{Comments: }  This command only controls the lamp shutters,
                       not the lamps themselves.

\subsubsection {ULAMPNAME}

Sets names of comparison lamps mounted.

\helpitem{Format:   }  {\tt ULAMPNAME}
\helpitem{Comments: }  The procedure sets up default names, then 
                       prompts
                       for the name and position of each lamp.

\subsubsection {UCOMPFILTND}

Selects neutral density filter for comparison lamps

\helpitem{Format:   }  {\tt UCOMPFILTND <parameter>}
\helpitem{Units:    }  None
\helpitem{Range:    }  1 $<$ {\tt <parameter>} $<$ 12 or filter name
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UCOMPFILTND 6, UCOMPFILTND ND3.0}
\helpitem{Comments: }  

\subsubsection {UCNNAME}

Sets names of neutral density filters for comparison lamps

\helpitem{Format:   }  {\tt UCNNAME}
\helpitem{Comments: }  The procedure sets up default names, then 
                       prompts
                       for the name and position of each filter.



\subsubsection {UCOMPFILTC}

Selects colour filter for comparison lamps

\helpitem{Format:   }  {\tt UCOMPFILTC <parameter>}
\helpitem{Units:    }  None
\helpitem{Range:    }  1 $<$ {\tt <parameter>} $<$ 12 or filter name
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UCOMPFILTC 6, UCOMPFILTC R}
\helpitem{Comments: }  

\subsubsection {UCCNAME}

Sets names of colour filters for comparison lamps

\helpitem{Format:   }  {\tt UCCNAME}
\helpitem{Comments: }  The procedure sets up default names, then 
                       prompts
                       for the name and position of each filter.



\subsection {A\&G main filter wheels}

\subsubsection {UFILTPOL}

Moves main polariser wheel in UES A\&G unit

\helpitem{Format:   }  {\tt UFILTPOL <parameter>}
\helpitem{Units:    }  None
\helpitem{Range:    }  1 $<$ {\tt <parameter>} $<$ 11 or component name
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UFILTPOL 6, UFILTPOL POLAROID}
\helpitem{Comments: }  

\subsubsection {UFPNAME}

Sets names of components in main polariser wheel

\helpitem{Format:   }  {\tt UFPNAME}
\helpitem{Comments: }  The procedure sets up default names, then 
                       prompts
                       for the name and position of each component.

\subsubsection {UFILTND}

Moves main neutral density filter wheel in UES A\&G unit

\helpitem{Format:   }  {\tt UFILTND <parameter>}
\helpitem{Units:    }  None
\helpitem{Range:    }  1 $<$ {\tt <parameter>} $<$ 11 or filter name
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UFILTND 6, UFILTND ND3.0}
\helpitem{Comments: } 

\subsubsection {UFNNAME}

Sets names of filters in main neutral density filter wheel

\helpitem{Format:   }  {\tt UFNNAME}
\helpitem{Comments: }  The procedure sets up default names, then 
                       prompts
                       for the name and position of each filter.

\subsubsection {UFILTC}

Moves main colour wheel in UES A\&G unit

\helpitem{Format:   }  {\tt UFILTC <parameter>}
\helpitem{Units:    }  None
\helpitem{Range:    }  1 $<$ {\tt <parameter>} $<$ 11 or filter name
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UFILTC 6, UFILTC B}
\helpitem{Comments: }  

\subsubsection {UFCNAME}

Sets names of filters in main colour filter wheel

\helpitem{Format:   }  {\tt UFCNAME}
\helpitem{Comments: }  The procedure sets up default names, then 
                       prompts
                       for the name and position of each filter.



\subsection {UES Slit-area}
\subsubsection {USLITANGLE}

Sets the UES slit angle

\helpitem{Format:   }  {\tt USLITANGLE <parameter>}
\helpitem{Units:    }  Millidegrees
\helpitem{Range:    }  -12000 $<$ {\tt <parameter>} $<$ 11400
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt USLITANGLE 500} 
\helpitem{Comments: }  The slit angle mechanism has insufficent range to be set 
vertical over the entire wavelength range. The effect will be that the slit will
be slightly tilted with respect to its optimum orientation.
However this can be corrected for by data reduction software.


\subsubsection {USLITWIDTH}

Sets the UES slit width

\helpitem{Format:   }  {\tt USLITWIDTH <parameter> <units> }
\helpitem{Units:    }  ARCSEC, MICRON, PIX
\helpitem{Range:    }  20 $<$ {\tt <parameter>} $<$ 20000 microns
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt USLITWIDTH 50} 
\helpitem{Comments: }  The slitwidth can be specified in microns
                       at the slit, arcsec on the sky, or projected
                       pixels on the detector. In order to calculate
                       the slitwidth in pixels, the pixelsize must have 
                       been specified using the PIXSIZE command.

\subsubsection {USLITSHUT}

Opens or closes the UES slit shutter

\helpitem{Format:   }  {\tt USLITSHUT <parameter>}
\helpitem{Units:    }  None
\helpitem{Range:    }  0, 1, OPEN, CLOSE
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt USLITSHUT 0} 
\helpitem{Comments: }  This command is only provided for test purposes.
                       During normal operation the shutter is controlled
                       by the detector. This command may be useful for
                       closing the shutter if it does not close properly
                       at the end of an exposure.

\subsubsection {UEXPOSE}

Opens the UES slit shutter for a specified time

\helpitem{Format:   }  {\tt UEXPOSE <parameter>}
\helpitem{Units:    }  millisecs
\helpitem{Range:    }  1500 $<$ {\tt <parameter>} $<$ 640000
\helpitem{Examples : } {\tt UEXPOSE 50000} 
\helpitem{Comments: }  This command is only provided for test purposes,
                       or for timing exposures with non-standard detectors.
                       During normal operation the shutter is controlled
                       by the CCD or the IPCS detector. 

\subsubsection {UDEKKER}

Sets the position of the UES dekker, which controls the UES slit length.

\helpitem{Format:   }  {\tt UDEKKER <parameter>}
\helpitem{Units:    }  Microns
\helpitem{Range:    }  0 $<$ {\tt <parameter>} $<$ 123530
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UDEKKER 100000} 
\helpitem{Comments: }  The USLITLEN command should normally be
                       used instead of the UDEKKER command.

\subsubsection {USLITLEN}

Sets the UES slit length, by moving the dekker. 

\helpitem{Format:   }  {\tt USLITLEN <parameter> <units>}
\helpitem{Units:    }  ARCSEC, MM, PIX
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt USLITLEN 5 ARCSEC, USLITLEN 20 MM }
\helpitem{Comments: }  The slitlength can be specified in mm
                       at the slit, arcsec on the sky, or projected
                       pixels on the detector. In order to calculate
                       the slitlength in pixels, the pixelsize must have 
                       been specified using the PIXSIZE command. \\
                       {\tt USLITLEN AUTO} automatically determines 
                       appropriate slitlength according to echelle and 
                       central wavelength combination in use.

\subsubsection {UMODLENS}

Selects the UES focal modifier lens.

\helpitem{Format:   }  {\tt UMODLENS <parameter>}
\helpitem{Units:    }  None
\helpitem{Range:    }  1 $<$ {\tt <parameter>} $<$ 7 or name of component
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UMODLENS 5, UMODLENS BLUE} 
\helpitem{Comments: }  The red and blue focal modifier lenses mounted
                       in this wheel convert the f/11 telescope beam to
                       f/13.9.  With the focal modifier lenses in, there
                       is no overfilling of the echelle; note that this
                       is opposite to the case of the UCLES spectrograph.

\subsubsection {UFMNAME}

Sets names of lenses in focal modifier wheel

\helpitem{Format:   }  {\tt UFMNAME}
\helpitem{Comments: }  The procedure sets up default names, then 
                       prompts
                       for the name and position of each lens

\subsection {UES collimator and Hartmann unit}

\subsubsection {UCOLL}

Selects the UES collimator

\helpitem{Format:   }  {\tt UCOLL <parameter>}
\helpitem{Units:    }  None
\helpitem{Range:    }  1, 2, WIDE or UV
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UCOLL WIDE}
\helpitem{Comments: }  

\subsubsection {UFOCUS}

Sets the UES collimator focus

\helpitem{Format:   }  {\tt UFOCUS <parameter>}
\helpitem{Units:    }  Microns
\helpitem{Range:    }  0 $<$ {\tt <parameter>} $<$ 20000
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UFOCUS 500} 
\helpitem{Comments: }  

\subsubsection {UHART}

Moves the Hartmann unit in or out of the beam.

\helpitem{Format:   }  {\tt UHART <parameter>}
\helpitem{Units:    }  None
\helpitem{Range:    }  0, 1, OUT or IN
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UHART 0} 
\helpitem{Comments: }  

\subsubsection {UHARTPOS}

Selects the position of the Hartmann shutter

\helpitem{Format:   }  {\tt UHARTPOS <parameter>}
\helpitem{Units:    }  None
\helpitem{Range:    }  0, 1, 2, 3, 4, UP, LEFT, DOWN, RIGHT, ROTATE
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UHARTPOS 1}
\helpitem{Comments: }  Note that if continuous rotation is selected
                       ({\tt <parameter>} = ROTATE or 4), it may not
                       be possible to stop it.

\subsection {UES prism}

\subsubsection {UPRISM}

Moves prism table in or out of the beam. {\em This command has been disabled,
by disconnecting the motor.}

\helpitem{Format:   }  {\tt UPRISM <parameter>}
\helpitem{Units:    }  None
\helpitem{Range:    }  0, 1, OUT or IN
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UPRISM IN}
\helpitem{Comments: }  With the prism out of the beam,
                        a flat mirror is in the beam. 

\subsubsection {UPRISMPOS}

Sets the prism position

\helpitem{Format:   }  {\tt UPRISMPOS <parameter>}
\helpitem{Units:    }  0.1 mm
\helpitem{Range:    }  0 $<$ {\tt <parameter>} $<$ 2400
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UPRISMPOS 500} 
\helpitem{Comments: }  

\subsection {UES echelles}

\subsubsection {UECHELLE}

Selects which echelle grating is in the beam.

\helpitem{Format:   }  {\tt UECHELLE <parameter>}
\helpitem{Units:    }  None
\helpitem{Range:    }  1, 2, E31, E79
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UECHELLE E31}
\helpitem{Comments: }  

\subsubsection {UTHETA31}

Sets theta (tilt angle) for the 31.6 grooves/mm echelle

\helpitem{Format:   }  {\tt UTHETA31 <parameter>}
\helpitem{Units:    }  Millidegrees
\helpitem{Range:    }  $-$2500 $<$ {\tt <parameter>} $<$ 2500
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UTHETA31 1000}
\helpitem{Comments: }  

\subsubsection {UTHETA79}

Sets theta (tilt angle) for the 79.0 grooves/mm echelle

\helpitem{Format:   }  {\tt UTHETA79 <parameter>}
\helpitem{Units:    }  Millidegrees
\helpitem{Range:    }  $-$2500 $<$ {\tt <parameter>} $<$ 2500
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UTHETA79 1000}
\helpitem{Comments: }  

\subsubsection {UGAMMA31}

Sets gamma (rotation angle) for the 31.6 grooves/mm echelle

\helpitem{Format:   }  {\tt UGAMMA31 <parameter>}
\helpitem{Units:    }  Millidegrees
\helpitem{Range:    }  -2290  $<$ {\tt <parameter>} $<$ 2290
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UGAMMA31 1000}
\helpitem{Comments: }  

\subsubsection {UGAMMA79}

Sets gamma (rotation angle) for the 79.0 grooves/mm echelle

\helpitem{Format:   }  {\tt UGAMMA79 <parameter>}
\helpitem{Units:    }  Millidegrees
\helpitem{Range:    }  -2290 $<$ {\tt <parameter>} $<$ 2290
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UGAMMA79 1000}
\helpitem{Comments: }  

\subsection {UES camera}

\subsubsection {UCAMLAMP}

Switches flatfielding LEDs in camera on

\helpitem{Format:   }  {\tt UCAMLAMP <parameter>}
\helpitem{Units:    }  None
\helpitem{Range:    }  0, 1, 2, OFF, ON1, ON2
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UCAMLAMP 1}
\helpitem{Comments: }  Lamp 1 is a yellow LED, intended for use with the
                       IPCS, whilst lamp 2 is a red LED, intended for
                       use with the CCD

\subsubsection {UCAMSHUT}

Opens or close the camera shutter. 

\helpitem{Format:   }  {\tt UCAMSHUT <parameter>}
\helpitem{Units:    }  None
\helpitem{Range:    }  0, 1, OPEN or CLOSE
\helpitem{Defaults: }  Defaults to closed on power--up
\helpitem{Examples : } {\tt UCAMSHUT 0}
\helpitem{Comments: }  This is a safety shutter, which
                       opens slowly but closes fast. It is not 
                       normally used for timing exposures.

\subsubsection {UPINMASK}

Opens or closes the pinhole mask camera shutter.

\helpitem{Format:   }  {\tt UPINMASK <parameter>}
\helpitem{Units:    }  None
\helpitem{Range:    }  0, 1, OUT or IN
\helpitem{Defaults: }  Defaults to uninitialised on power--up
\helpitem{Examples : } {\tt UPINMASK 0}
\helpitem{Comments: }  The pinhole mask is intended to be illuminated
                       with the flatfielding LED, when a pattern
                       of reference marks will be projected onto
                       the detector. This makes it possible to
                       determine detector distortion.


\subsubsection {UPIXEL}

Sets pixel size in slit width and slit length directions --- 
as used to calculate projected slitlength, slitwidth and dispersion

\helpitem{Format:   }  {\tt UPIXEL <parameter1> <parameter2>}
\helpitem{Units:    }  Microns
\helpitem{Range:    }  
\helpitem{Defaults: }  Defaults to $22.5 \times 22.5$ microns on power--up
\helpitem{Examples : } {\tt UPIXEL 22.0 22.0}
\helpitem{Comments: }  Set the pixel size in the $x$ and $y$ directions, 
$x \neq y$ for detectors with rectangular detector elements such as 
IPCS-II.

\subsection {Temperature control}

\subsubsection {UTEMP}

Reads all 8 UES temperature sensors

\helpitem{Format:   }  {\tt UTEMP }


\subsection{Initialisation, status and cancel commands}

\subsubsection {UES\_INIT}

Initialise specified mechanism

\helpitem{Format:   }  {\tt UES\_INIT <parameter>}
\helpitem{Units:    }  None
\helpitem{Parameter:}  Any individual mechanism name, or ALL, NAG or UES
\helpitem{Examples : } {\tt UES\_INIT USLITWIDTH}
\helpitem{Comments: }  If ALL is specified, all mechanisms are initialised.
                  If NAG is specified, only A\&G mechanisms are initialised,
                  and if UES is specified, only spectrograph mechanisms 
                  are initialised. Note that initialisation of all UES
                  mechanisms is slow.
 

\subsubsection {UES\_UPDATE}

Gets status of specified mechanism and updates the ICL {\sc mimic} 
display.

\helpitem{Format:   }  {\tt UES\_UPDATE <parameter>}
\helpitem{Units:    }  None
\helpitem{Parameter:}  Any individual mechanism name, or ALL, NAG, UES or TEMP
\helpitem{Examples : } {\tt UES\_UPDATE USLITWIDTH}
\helpitem{Comments: }  If ALL is specified, status is obtained for all 
                  mechanisms are initialised.
                  If NAG is specified, status is only obtained for A\&G 
                 mechanisms, and if UES is specified, status is only 
                 obtained for spectrograph mechanisms. If TEMP
                 is specified, then all temperature sensors are read. 
 

\subsubsection {UES\_CANCEL}

Cancels ADAM action on specified mechanism

\helpitem{Format:   }  {\tt UES\_CANCEL <parameter>}
\helpitem{Units:    }  None
\helpitem{Parameter:}  Any individual mechanism name.
\helpitem{Examples : } {\tt UES\_CANCEL USLITWIDTH}
\helpitem{Comments: }  

\subsubsection {UNAMES}

Sets up names of components in all filter wheels.

\helpitem{Format:   }  {\tt UNAMES}
\helpitem{Comments: }  The procedure sets up default names, then 
                       prompts
                       for the name and position of any component differing
                       from the default.


\section{Commands for instrument configuration}

This section contains a detailed description of the commands available 
from ICL for more complex configuration of UES and its A\&G unit.

\subsection{Acquisition procedures}

\subsubsection {UTVVIEW}

Configures UES and A\&G for viewing the field using the ISEC TV.

\helpitem{Format:   }  {\tt UTVVIEW}
\helpitem{Examples : } {\tt UTVVIEW}
\helpitem{Comments: }  This command moves the A\&G mirror to the field
                    viewing position, sets the slit angle to zero, moves the dekker out of the beam, and moves all three A\&G main filter wheels to position 1

\subsubsection {UENDTVVIEW}

Re-configures UES and A\&G for {\em after} viewing the field using the ISEC TV.

\helpitem{Format:   }  {\tt UENDTVVIEW}
\helpitem{Examples : } {\tt UENDTVVIEW}
\helpitem{Comments: }  This command re-sets the slit angle, dekker and 
all three A\&G main filter wheels to the positions that they 
had before using the {\tt UTVVIEW} command.


\subsubsection {UPROBEVIEW}

Configures A\&G for viewing the field centre using the coarse
autoguider probe.


\helpitem{Format:   }  {\tt UPROBEVIEW}
\helpitem{Comments: }  This command moves the A\&G mirror so that
                    all light is directed to the autoguider (x,y)
                    table, then moves the autoguider coarse probe
                    to the field centre.


\subsection{Spectrograph configuration}

\subsubsection {UCENWAVE31}

Configures spectrograph for a specified central wavelength and order
number, assuming the 31.6 l/mm grating is being used.

\helpitem{Format:   }  {\tt UCENWAVE31 <parameter1> [parameter2]}
\helpitem{Parameter1:}  Central wavelength
\helpitem{Units1:    }  Angstrom
\helpitem{Parameter2:}  Order number
\helpitem{Units2:    }  None
\helpitem{Examples : } {\tt UCENWAVE31 5000 0}
\helpitem{Comments: }  The correct echelle will be moved into the beam 
                       if it is not already there.
                       If the order number is left out, or is
                       equal to 0, then the blaze peak
                       will be chosen. This command alters
                       the two echelle angles and prism translation
                       in order to select the central wavelength,
                       changes the slit angle to get it vertical
                       on the detector, and
                       selects the UV or wideband collimator.
                       
\subsubsection {UCENWAVE79}

Configures spectrograph for a specified central wavelength and order
number, assuming the 79.0 l/mm grating is being used.

\helpitem{Format:   }  {\tt UCENWAVE79 <parameter1> [parameter2]}
\helpitem{Parameter1:}  Central wavelength
\helpitem{Units1:    }  Angstrom
\helpitem{Parameter2:}  Order number
\helpitem{Units2:    }  None
\helpitem{Examples : } {\tt UCENWAVE79 5000 0}
\helpitem{Comments: }  The correct echelle will be moved into the beam 
                       if it is not already there.
                       If the order number is left out, or is
                       equal to 0, then the blaze peak
                       will be chosen. This command alters
                       the two echelle angles and prism translation
                       in order to select the central wavelength,
                       changes the slit angle to get it vertical
                       on the detector, and
                       selects the UV or wideband collimator.


\subsubsection {USLITOFF}

Applies an offset to the slit angle as calculated from the
spectrograph model.

\helpitem{Format:   }  {\tt USLITOFF <parameter1> }
\helpitem{Parameter1:}  Offset to apply to angle
\helpitem{Examples : } {\tt USLITOFF 1234 }
\helpitem{Comments: }  Offset is measured in MDEG---see 
sec.~\ref{sec:echoffset} for use of this offset.
   

\subsubsection {UTHETAOFF}

Applies an offset to the value of theta as calculated from the
spectrograph model.

\helpitem{Format:   }  {\tt UTHETAOFF <parameter1> <parameter2>}
\helpitem{Parameter1:}  Offset to apply to angle
\helpitem{Parameter2:}  Units of offset (MDEG or PIX)
\helpitem{Examples : } {\tt UTHETAOFF 1234 MDEG}
\helpitem{Comments: }  See sec.~\ref{sec:echoffset} 
for use of this offset.

\subsubsection {UGAMMAOFF}

Applies an offset to the value of gamma as calculated from the
spectrograph model.

\helpitem{Format:   }  {\tt UGAMMAOFF <parameter1> <parameter2>}
\helpitem{Parameter1:}  Offset to apply to angle
\helpitem{Parameter2:}  Units of offset (MDEG or PIX)
\helpitem{Examples : } {\tt UTHETAOFF 1234 MDEG}
\helpitem{Comments: }  See sec.~\ref{sec:echoffset} 
for use of this offset.

\vfill
\eject

%---------------------------------------------------------------------------


\chapter{\bf ECHWIND}
\label{chap:echwind}
\outerhead{\large\bf ECHWIND}

\parindent=0pt
\parskip=10pt

\section{Introduction to ECHWIND}

A full description of the use of ECHWIND can be found in Starlink User 
Note No.\ ??

\section{Use of ECHWIND at the WHT}

*** Include details from the user guide, quick reference here only ***

\vfill
\eject

%------------------------------------------------------------------------------------------------


\chapter {\bf Data reduction}
\label{chap:datared}  
\outerhead{\large\bf Data reduction}

\parindent=0pt
\parskip=10pt

\section{ECHOMOP}

The {\sc echomop} package provides facilites for the extraction of 
spectra from 2D-data frames, 
such as those typically provided using Echelle spectographs.
The package was written primarily for the reduction of data from the 
UCL Echelle Spectograph (installed on the AAT), but is sufficiently
flexible to process data from a wide variety of instruments producing
2-D multi-order/object spectra. 

A substantial degree of automation is provided, particularly in the
traditionally manual functions for cosmic ray contamination detection,
and arc line wavelength calibration. The automated functions can also
be overridden by interactive alternatives when required. Features include
robust and flexible order tracing, optimal extraction, support for variance
arrays, and 2-D distortion fitting and extraction.

In the interests of maximum flexibility the package provides both
a highly interactive shell task which guides the user through the operations
usually required, as well as providing unitary tasks for all significant
operations, allowing the construction of powerful batch reduction jobs for
processing multiple frame datasets. Facilities for automated archiving of
results, and flexible transport of models between different reductions are
also provided.

The package was developed under funding from the S.E.R.C. and has 
benefitted from constant involvement with the personnel of the Optical
Science Labarotory (at UCL) where the UCLES instrument was designed 
and built. The current implementation uses the {\sc figaro} environment as
installed at all UK STARLINK sites, and an ADAM version is being produced.
                    


\subsection{Introduction}


   This version of the package runs under the {\sc figaro} environment,
   and this environment must be set up before the programs can be
   used.  The package is prepared for use by typing the command

{\tt ECHOMOP\_SETUP}

  at the system command prompt (\$ on a VMS system). The setup procedure
   sets up any environments required (eg {\sc figaro}), and then lists the 
   commands which are available for reduction.

   New users can obtain an on-line introduction to the use of the package
   by typing the command

{\tt   @ECHOMOP\_SOURCE:ECH\_DEMO}

   This runs a demonstration reduction using a set of included data frames.
   It demonstrates the main functions of the package and traces a simple
   reduction from start to the production of an extracted, wavelength
   calibrated spectrum.
           

\subsection{Preparing for a reduction}

The frames neccesary for the reduction should be first converted into
{\sc figaro} standard data files. {\sc figaro} contains a set of tape reading and
format translation utilities to help you do this.
Any pre-reduction processing as outlined above should then be performed
on the raw data frames.
 
In addition it may then be neccesary to rotate all the frames through
90 degrees to ensure that the orders run mainly parallel to the frame
rows.


\subsection{Starting up}

{\sc echomop} may be used in a variety of ways depending upon the
   expertise of the user.

   The most convenient method for normal use is to start
   the main {\sc echomop} task itself. This task provides a guided
   path through the processes in a standard reduction.

{\sc echomop} is a menu driven program which drives all the other
   programs in the package. {\sc echomop} will always provide a default
   for the next task to be performed, and this will usually be
   the correct one for a standard reduction. To accept the recommeded
   next step , it is only necessary to hit /return/.

   The package uses a disc based 'reduction file' to pass objects
   between its various component tasks. The user will initially be asked to
   provide a filename for this file , which will be created in the
   current directory. This file is  permanently associated
   with a particular set of data frames (object,arc,flat etc.)
   thereby providing the ability to replay any aspect of the reduction
   at a later date. Reduction files can occupy a large amount of
   disk space however, and many users will wish to delete them as
   soon as the reduced spectrum has been obtained.

   To start a reduction type

{\tt  ECHOMOP}

   at the command line (\$) prompt.



\subsection{A standard reduction}

The simplest method of using the package is via the monolithic task
{\sc echomop}  which has access to all the processing modules, along with a set
of utilities along interactive tuning of parameters, and plotting of
graphs of intermediate results.  As reduction progresses, the details 
and results of each task are stored in a disk file allowing the user to
repeat/alter any aspect of the reduction at any stage.

The package prompts the user for the name of this 'reduction structure'
file when it starts. If the name of an existing reduction-structure file
is entered then this file will be opened, otherwise the package will
create a new file using the name provided. The name of the file may 
also be provided on the startup command line. Eg:

{\tt       ECHOMOP ECH\_RDCTN=<filename>}

Once the reduction-structure file has been opened the main menu is 
presented. This menu consists of all the major steps in the reduction
process, along with a set of utility options, and some more specialised
options (Eg. 2-D distortion correction).
An option is selected by typing its number followed by carriage return.
Some options may also be selected by entering a keyword (or its first
character) followed by carriage return. Eg. {\tt PLOT} or {\tt P} would select the
graph plotting utility.
The package attempts to provide the most sensible option (for a standard
reduction) as the default, and the user can accept this simply by
typing a carriage return. Option {\tt 0} always provides help information on
the default option, and then allows the user to browse the help library
for more detailed information.
Most options invoke processing modules. These modules will usually require
the specification of a number of parameters which will be automatically
prompted for by the program. It is possible to preview/edit the parameters
for any option by entering its number prefixed by a minus sign. 
Eg. -3 would allow preview/edit of the parameters used by option 3.

N.B. In general, once a parameter has been provided by the user it will
     {\em not} be re-prompted for by any module which requires it. The modules
     will simply re-use the value already supplied. The -option strategy
     overrides this behaviour and allows the user to change any parameter
     at any point.

All parameters can optionally be provided on the startup command line, in
which case the modules will use the value provided without prompting.


\subsection{Standard steps}

The following steps constitute a standard reduction as implemented by
the monolithic {\sc echomop}  task. The user can follow this sequence by hitting
carriage return at each main menu prompt, and supplying data frame names
and parameters when they are prompted for. 

\begin{tabular}{r c l }
     1 & = & Start a reduction \\
     2 & = & Trace the orders and fit polynomials \\
     3 & = & Clip polynomial fits   \\
     4 & = & Determine dekker/object limits \\
     5 & = & Model flat field per-pixel balance factors \\
     6 & = & Model sky background \\
     7 & = & Model object profile \\
     8 & = & Extract object and arc spectra \\
     9 & = & Locate arc lines and fit gaussian profiles \\
    10 & = & Identify arc lines and fit wavelength scales \\
    11 & = & Model blaze profile and apply to object spectrum \\
    12 & = & Scrunch object spectrum \\
    14 & = & Write results file 
\end{tabular}

   The demonstration provided by {\tt ECH\_DEMO}  follows this sequence and
   the reader is encouraged to try it before using the package in earnest.

   Steps 9 through 12 would be omitted if no wavelength calibration
   was required. Step 5 would be omitted if no flat field was available.
   
   In cases where multiple object frames have been taken, it would be
   efficient to use only steps 6,7,8,11,12 for additional frames.

   A quick look extraction may be performed as soon as step 4 has been 
   completed (option 20).


\subsection{Parameters and prompts}

  Most of the information required by {\sc echomop} from the user is
   obtained using the {\sc figaro}  parameter system. This standard method
   of obtaining values leads to a consistency of user interace
   between all {\sc figaro}  based tasks. However in some cases it is
   more convenient to present the user with a menu of choices
   and this approach is used for the top level selection of
   processing steps , and also during interactive graphics
   intensive steps.

   When a {\sc figaro} parameter is prompted for, the default value
   is indicated enclosed
   in [ ] brackets. As well as entering a value the user may
   also use the following special responses which are processed
   by the {\sc figaro} parameter system :

   \begin{itemize}

      \item ? provides information on parameter type,
                     minimum and maximum allowed values etc.

      \item ?? provides same information as above plus
                      any detailed help text available.

      \item !! requests an abort of the task

      \item Backslash causes all subsequent parameters to adopt
                     their default values {\em without} further prompts.


     \end{itemize}

\subsection{ Tuning parameters}

   The {\sc echomop}  uses a number of 'hidden' parameters. These quantities
   will not normally need to be changed, but provide a greater
   flexiblity when processing problem data. They are also used
   by {\sc echomop}  to configure itself for 'quick-look' extraction.

   The {\tt ECH\_TUNER} option/task allows the user to interactively examine
   and alter any of these parameters. They may also be supplied
   on tasks command lines. By default {\sc echomop} tasks always indicate
   the values of any {\tt TUNE\_} parameters which have been set differently
   from the hard-coded defaults.



\vfill
\clearpage

\appendix
\chapter{Filter transmission}
\outerhead{{\large\bf Filter transmission}}

\begin{figure}
\vskip 20cm
\caption[Transmission of main beam colour filters]{Transmission of
       main beam colour filters}
\label{fig:mccurves}
\end{figure}

\begin{figure}
\vskip 20cm
\caption[Transmission of main beam ND filters]{Transmission of
       main beam ND filters}
\label{fig:mndcurves}
\end{figure}


\begin{figure}
\vskip 20cm
\caption[Transmission of autoguider filters]{Transmission of
       autoguider filters}
\label{fig:acurves}
\end{figure}


\begin{figure}
\vskip 20cm
\caption[Transmission of comparison colour filters]{Transmission of
       comparison colour filters}
\label{fig:cccurves}
\end{figure}

\begin{figure}
\vskip 20cm
\caption[Transmission of comparison ND filters]{Transmission of
       comparison ND filters}
\label{fig:cndcurves}
\end{figure}


\clearpage


\chapter{UES and Nasmyth A\&G manuals}
\label{app:uesmanuals}



\begin{verbatim}


Below an extract from my system overview in the technical manuals. Is this 
a suitable appendix?????          Jaap



\end{verbatim}


UES was constructed in Utrecht, NAG in Roden. Detectors, the kernel of the
4MS system, most peripherals and the VAX software are of RGO origin.
Manuals are therefore many and varied. Those listed below concern UES and
NAG.\\

\section{System}
\vspace{3mm}
\begin{itemize}

\item
Users' manual (Steve Unger, Max Pettini, Nic Walton). This manual.

\item
Duty-tech manual (Jaap Tinbergen). Introduction and diagnostic procedures.

\item
Quick Reference Guide (Jaap Tinbergen). Detailed information for 
fault diagnosis via 4MS. 

\item
4MS (Jaap Tinbergen). A single 4MS drives both UES and NAG. Description of
the system, and a listing of the FORTH screens.

\item
VAX-to-4MS interface description `WHT-UES-1' (Marion Fisher).

\item
4MS Reference manual (Ben Murdin); RGO reference manual.

\item
Kernel description for ISIS 4MS system (Alan Popplestone, John Maclean);
RGO reference manual. The UES/NAG kernel is an adaptation of that for 
ISIS. \\

\end{itemize}


\section{UES}
\vspace{3mm}
\begin{itemize}

\item
General description (Jaap van Nieuwkoop; substantial contributions by Ton 
Schoenmaker and Jan Willem Pel). Contains a wealth of mechanical 
and optical detail, with detailed alignment and adjustment procedures.\\

\item
Electronic manuals (Jacques van Amerongen and Gerard van Gelder):

\begin{itemize}

\item
Control system: introduction to UES and its control system (`Grey Book')

\item
Assemblies: descriptions, diagrams, photographs of the main units of UES
(`Blue Book')

\item
SECU (Standard Electronic Control Unit): description and circuit diagrams
of all p/c boards  (`Green Book') 

\item
SECU microprocessor software: describes the interactions of mechanisms,
SECU and 4MS (`Red Book') 

\item
PC software aids: tests and diagnostics using the Utrecht-supplied PC
'Charly' (`Orange Book') 

\item 
Temperature measurement box: descriptions, diagrams (`Thin Green Book')

\end{itemize}

\item
Mechanical drawings (several volumes; Ruud van Stappershoef and Mari 
Hanegraaf)

\item
Tamson/Neslab: details of the commercial cooler-heater system\\

\end{itemize}

\section{NAG}
\vspace{3mm}
\begin{itemize}

\item
System overview (Jaap Tinbergen). 

\item
Optics (Jaap Tinbergen). Description of principles and component
specifications.  

\item
Mechanics (Arie de Jong, Hans Hendriksen). Description and 3 volumes of
reduced-size AUTOCAD drawings. 

\item
Electronics (Bob Rijf, Aad van der Helm, Sieds Damstra). Description and 2
volumes of diagrams, connector and cable listings.

\item
Barcode reader module (Alan Popplestone). Standard RGO. 

\item
Comparison lamp supply (John Maclean). Standard RGO.\\


\end{itemize}

\begin{verbatim}

NIC,    PLEASE,  IF YOU THINK SUCH A LISTING OF MANUALS IS A GOOD IDEA, 

add references to manuals for TCS, CCD controllers, ADAM, CFS, ICL, DMS, 
Autoguider VME and what have you.


\end{verbatim}

\clearpage


\chapter{Focal modifier lenses}
\outerhead{{\large\bf Focal modifier lenses}}
\label{app:modlens}) 

\section{Principles of operation}

When designing a spectrograph it is necessary to decide how
to match the size of the collimated beam, which is elliptical 
in shape, to the size of the grating, which is rectangular in shape.
Two possible solutions are:

\begin{itemize}

\item Extreme underfilling of the grating. The normal approach is 
for the diameter of the collimated beam  to be equal to the size 
of the grating. This means that the corners of the grating 
are not illuminated.

\item Extreme overfilling of the grating. An alternative is for 
the entire grating to be illuminated. However, in order to 
illuminate the corners of the grating with a circular beam, 
the diameter of the beam must be larger than the size of the 
gratig, and hence some light will be lost at the edge of the beam.

\end{itemize}

Solutions intermediate between these two extremes are also
possible. There are two options available with the UES.
With the focal modifier lenses out of the beam, the input
f/ratio of f/11.1 results in a collimated beam of diameter
215 mm. The effect of inserting the focal modifier lenses 
into the beam is to modify the f/ratio of the telescope beam 
to f/13.9, resulting in the diameter of the collimated
beam being reduced to 172 mm. Both of these options result in
some overfilling of the grating, as summarised in 
Table~\ref{tab:lens}.


\begin{table}[hbt]
\begin{center}
\caption{Properties of focal modifier lenses}
\label{tab:lens}  
\begin{tabular}{lll}
\\
                                 & Without focal    & With focal\\
                                 & modifier         & modifier  \\
                                 &                  &            \\
Input focal ratio                & f/11.1           & f/13.9     \\
Collimated beam diameter (mm)    & 215              & 172        \\
Light loss at echelle (per cent) & 31               & 14      
\end{tabular}
\end{center}
\end{table}

It can be seen that the light lost due to overillumnation is greater
with the lens out of the beam; the geometrical efficency of the
instrument without the lens is 80 per cent of that with the lens.

It should be noted that the effect of the UES focal modifier
lenses is precisely opposite to the effect of the UCLES
focal modifier lenses. The UES focal modifier lenses
decrease the degree of overillumination, whereas the
UCLES focal modifier lenses increase it.

Inserting the focal modifier lenses can either increase 
or decrease the overall throughput of the spectrograph, 
for the following reasons. 

\begin{itemize}

\item The collimated beam in UES overfills the grating. With 
the focal modifiers in the beam, the beam diameter is larger,
and so light losses at the grating due to overfilling are
also larger. 

\item The demagnification factor, which depends on the ratio 
of the collimator to the camera focal lengths, increases
with the focal modifier lenses in the beam. It is therefore 
possible to use a larger  entrance slit, whilst keeping the
slitwidth projected onto the detector constant, so
preserving spectral resolution, and reducing slit losses.

\item We expect there will be losses associated with the
focal modifier lenses themselves.

\end{itemize}

The choice of whether or not to use the lenses depends on 
which of these effects dominates, as discussed in the next 
section.

\section{Performance of the modifier lenses}

We noted above that the geometrical efficency of the
instrument without the focal modifier lens is 80 per cent 
of that with the lens. In other words, inserting the
focal modifier lenses increases the geometrical efficency
of the instrument by 25 per cent. At first sight it would
therefore seem best to operate the instrument with the
lens in the beam.

However, removing the lens increases the input f/ratio of 
UES from f/11.1 to f/13.9, and makes it possible to increase 
both the slit length and
the slit width by 13.9/11.1, a factor of 1.25, whilst
leaving the resolution at the detector constant. The 
gain this provides in spectrograph efficiency depends
on the type of object being observed. For a spatially extended
source, where the amount of emission detected is limited
both by the slit length and the slitwidth, the improvement
in slit-losses is 1.25$^2$, or an extra 50 per cent.
For stellar work, slit-losses are due to broadening of the image
by seeing, and depend on the ratio of the seeing FWHM to the 
slitwidth; in this case we can expect gains of up to 25
per cent, depending on the seeing. 
 
The other reason for for removing the lens is that the transmission
of the lens is low. The transmission was measured
by illuminating the slit with a diffuse source of light.
Spectra were taken with the focal modifer lenses both
in and out of the beam, adjusting the slitwidth and
length as described above. Under these circumstances
we expect the spectrum taken without the focal modifier
lenses in the beam to be 25 per cent brighter than the
spectrum with the focal modifier lenses in the beam (a 50
per cent increase due to the larger slit, partially offset
by a 20 per cent reduction due to overfilling of the grating)

In practice we found that at all wavelengths the spectra 
taken without the focal modifier lenses in the beam were
over 50 per cent brighter than the spectra with the focal 
modifier lenses in the beam. For the red focal modifier
lenses, between 5000 and 7000 \AA, the factor was
even larger.

This result implies losses due to the focal modifiers
themselves of at least 20 per cent. Taken together
with the existence of slit losses, this more than offsets
the slight gain in efficency at the grating
obtained by using the focal modifiers. {\em There are 
therefore no circumstances under which it makes sense
to use the focal modifier lenses.}




\end{document}

    
%-----------------------------------------------------------------------------

% Useful sub-templates
    
% Main list
    
\begin{list}{$\bullet$}{\setlength{\itemsep}{0mm}}
 \item 
 \item 
 \item 
\end{list}

% Nested list

  \begin{list}{$\circ$}{\setlength{\itemsep}{0mm}}
   \item 
   \item 
   \item 
  \end{list}

% Figures

\begin{figure}[t]
\centering
\input %%%
\caption{\label{fig:context}}
\end{figure}

