%APN3_PROCEEDINGS_FORM%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% TEMPLATE.TEX -- APN3 (2003) ASP Conference Proceedings template.
%
% Derived from ADASS VIII (98) ASP Conference Proceedings template
% Updated by N. Manset for ADASS IX (99), F. Primini for ADASS 2000,
% D.Bohlender for ADASS 2001, and H. Payne for ADASS XII and LaTeX2e.
%
% Use this template to create your proceedings paper in LaTeX format
% by following the instructions given below.  Much of the input will
% be enclosed by braces (i.e., { }).  The percent sign, "%", denotes
% the start of a comment; text after it will be ignored by LaTeX.  
% You might also notice in some of the examples below the use of "\ "
% after a period; this prevents LaTeX from interpreting the period as
% the end of a sentence and putting extra space after it.  
% 
% You should check your paper by processing it with LaTeX.  For
% details about how to run LaTeX as well as how to print out the User
% Guide, consult the README file.  You should also consult the sample
% LaTeX papers, sample1.tex and sample2.tex, for examples of including
% figures, html links, special symbols, and other advanced features.
%
% If you do not have access to the LaTeX software or a laser printer
% at your site, you can still prepare your paper following the
% instructions in the User Guide.  In such cases, the editors will
% process the file and make any necessary editorial adjustments.
% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
\documentclass[11pt,twoside]{article}  % Leave intact
\usepackage{adassconf}

% If you have the old LaTeX 2.09, and not the current LaTeX2e, comment
% out the \documentclass and \usepackage lines above and uncomment
% the following:

%\documentstyle[11pt,twoside,adassconf]{article}

\begin{document}   % Leave intact

%-----------------------------------------------------------------------
%			    Paper ID Code
%-----------------------------------------------------------------------
% Enter the proper paper identification code.  The ID code for your
% paper is the session number associated with your presentation as
% published in the official conference proceedings.  You can           
% find this number locating your abstract in the printed proceedings
% that you received at the meeting or on-line at the conference web
% site; the ID code is the letter/number sequence proceeding the title 
% of your presentation. 
%
% This will not appear in your paper; however, it allows different
% papers in the proceedings to cross-reference each other.  Note that
% you should only have one \paperID, and it should not include a
% trailing period.
%
% EXAMPLE: \paperID{O4-1}
% EXAMPLE: \paperID{P7-7}
%

\paperID{P9-7}
%%%% ID=P9-7

%-----------------------------------------------------------------------
%		            Paper Title 
%-----------------------------------------------------------------------
% Enter the title of the paper.
%
% EXAMPLE: \title{A Breakthrough in Astronomical Software Development}
% 
% If your title is so long as to fill the page header when you print it,
% then please supply a short form as a \titlemark.
%
% EXAMPLE: 
%  \title{Rapid Development for Distributed Computing, with Implications
%         for the Virtual Observatory}
%  \titlemark{Rapid Development for Distributed Computing}
%

\title{Survey Definition Tool}
%\titlemark{ }

%-----------------------------------------------------------------------
%		          Authors of Paper
%-----------------------------------------------------------------------
% Enter the authors followed by their affiliations.  The \author and
% \affil commands may appear multiple times as necessary (see example
% below).  List each author by giving the first name or initials first
% followed by the last name.  Authors with the same affiliations
% should grouped together. 
%
% EXAMPLE: \author{Raymond Plante, Doug Roberts, 
%                  R.\ M.\ Crutcher\altaffilmark{1}}
%          \affil{National Center for Supercomputing Applications, 
%                 University of Illinois Urbana-Champaign, Urbana, IL
%                 61801}
%          \author{Tom Troland}
%          \affil{University of Kentucky}
%
%          \altaffiltext{1}{Astronomy Department, UIUC}
%
% In this example, the first three authors, "Plante", "Roberts", and
% "Crutcher" are affiliated with "NCSA".  "Crutcher" has an alternate 
% affiliation with the "Astronomy Department".  The fourth author,
% "Troland", is affiliated with "University of Kentucky"

\author{Martin Folger, Mark Casali, Andrew Vick}
\affil{UK Astronomy Technology Centre, Royal Observatory, Blackford Hill,
Edinburgh EH9 3HJ, UK}

%-----------------------------------------------------------------------
%			 Contact Information
%-----------------------------------------------------------------------
% This information will not appear in the paper but will be used by
% the editors in case you need to be contacted concerning your
% submission.  Enter your name as the contact along with your email
% address.
% 
% EXAMPLE:  \contact{Dennis Crabtree}
%           \email{crabtree@cfht.hawaii.edu}
%

\contact{Martin Folger}
\email{M.Folger@roe.ac.uk}

%-----------------------------------------------------------------------
%		      Author Index Specification
%-----------------------------------------------------------------------
% Specify how each author name should appear in the author index.  The 
% \paindex{ } should be used to indicate the primary author, and the
% \aindex for all other co-authors.  You MUST use the following
% syntax: 
%
% SYNTAX:  \aindex{Lastname, F. M.}
% 
% where F is the first initial and M is the second initial (if
% used).  This guarantees that authors that appear in multiple papers
% will appear only once in the author index.  
%
% EXAMPLE: \paindex{Crabtree, D.}
%          \aindex{Manset, N.}        
%          \aindex{Veillet, C.}        
%
% NOTE: this information is also used to build the author list that
% appears in the table of contents.  Authors will be listed in the order
% of the \paindex and \aindex commmands.
%

\paindex{Folger, M.}
\aindex{Casali, M. M.}     % Remove this line if there is only one author
\aindex{Vick, A.}    % Remove this line if there is only one author

%-----------------------------------------------------------------------
%		      Author list for page header	
%-----------------------------------------------------------------------
% Please supply a list of author last names for the page header. in
% one of these formats:
%
% EXAMPLES:
% \authormark{Lastname}
% \authormark{Lastname1 \& Lastname2}
% \authormark{Lastname1, Lastname2, ... \& LastnameN}
% \authormark{Lastname et al.}
%
% Use the "et al." form in the case of seven or more authors, or if
% the preferred form is too long to fit in the header.

\authormark{Folger, Casali \& Vick}

%-----------------------------------------------------------------------
%			Subject Index keywords
%-----------------------------------------------------------------------
% Enter a comma separated list of up to 6 keywords describing your
% paper.  These will NOT be printed as part of your paper; however,
% they will be used to generate the subject index for the proceedings.
% There is no standard list; however, you can consult the indices
% for past proceedings (http://adass.org/adass/proceedings/).
%
% EXAMPLE:  \keywords{visualization, astronomy: radio, parallel
%                     computing, AIPS++, Galactic Center}
%
% In this example, the author noticed that "radio astronomy" appeared
% in the ADASS VII Index as "astronomy" being the major keyword and
% "radio" as the minor keyword.  The colon is used to introduce another
% level into the index.

\keywords{surveys: definition, catalogs, observing: preparation, Java,
WFCAM, UKIRT: Infrared Deep Sky Survey}

%-----------------------------------------------------------------------
%			       Abstract
%-----------------------------------------------------------------------
% Type abstract in the space below.  Consult the User Guide and Latex
% Information file for a list of supported macros (e.g. for typesetting 
% special symbols). Do not leave a blank line between \begin{abstract} 
% and the start of your text.

\begin{abstract}          % Leave intact
% Place the text of your abstract here - NO BLANK LINES
A Survey Definition Tool (SDT) has been developed at the UK Astronomy Technology Centre (UK ATC) in Edinburgh.
It automatically fills an area of sky with telescope positions
selecting suitable guide stars in the process.
The telescope positions are grouped together in tiles, i.e.
user defined patterns of positions that depend on the detector layout of
the instrument as well as on the observation and data reduction strategy used.
The resulting list of positions is split into manageable chunks and
formatted for use by the telescope's observation control system.
The SDT was developed for the Infrared Deep Sky Survey (UKIDSS) at the UK Infrared Telescope (UKIRT)
in Hawaii. The survey instrument, WFCAM, is currently being built at the UK ATC.
The SDT is implemented in Java and can easily interface to other Java packages
used in astronomy.
\end{abstract}

%-----------------------------------------------------------------------
%			      Main Body
%-----------------------------------------------------------------------
% Place the text for the main body of the paper here.  You should use
% the \section command to label the various sections; use of
% \subsection is optional.  Significant words in section titles should
% be capitalized.  Sections and subsections will be numbered
% automatically. 
%
% EXAMPLE:  \section{Introduction}
%           ...
%           \subsection{Our View of the World}
%           ...
%           \section{A New Approach}
%
% It is recommended that you look at the sample papers, sample1.tex
% and sample2.tex, for examples for formatting references, footnotes,
% figures, equations, html links, lists, and other special features.  

\section{Background}

In 2004 a survey instrument,
WFCAM\footnote{http://www.roe.ac.uk/atc/projects/wfcam},
will be commissioned on UKIRT (Henry et al. 2003). This will require some changes to the way
observations are set up. Currently an
Observation Preparation Tool (OT)
is used to set up the observation parameters such as instrument settings,
filters etc. (Folger et al. 2002). In common-user mode the telescope position for an individual
observation is also set manually in the OT.
However, manually selecting the hundreds or thousands of telescope positions
that make up a survey would be cumbersome.
Instead a Survey Definition Tool (SDT) has been developed to automate this task.
The output of the SDT (telescope positions and guide stars) can be combined
with the output of the OT (instrument settings etc.)
to form a complete definition of the survey (see Section \ref{P9-7:interfaceOCS}).

Apart from its use for WFCAM/UKIDSS (Warren 2002) at UKIRT the SDT can be readily
modified for use with other telescopes and instruments. Its use with future instruments on the
James Clerk Maxwell Telescope (JCMT), such as SCUBA-2 (Holland et al. 2003) and ACSIS
(Hovey et al. 2000) is being considered.

\section{Tiling Algorithm}

{\em Tiles:} Each telescope position results in a detector footprint on the sky. For various reasons it can be
necessary to group several of these footprints together to form a tile. In the case of
multi-detector instruments tiles can be used to fill the gaps between the
detectors (see Figure \ref{P9-7-Tile}). Alternatively, tiles may be designed
such that the detector footprints have large overlaps if this is desired for data reduction.

\begin{figure}
\epsscale{0.6}
\plotone{P9-7-Tile.eps}
\caption{Tile for multi-detector instrument WFCAM.
$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;$
(i) One telescope position with footprint (four detectors).
$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;$
(ii) Four telescope positions forming a filled-in tile.} \label{P9-7-Tile}
\end{figure}

{\em Survey areas:} A survey is made up of a number of {\em rectangular} or {\em circular} survey areas.
Rectangles are defined in terms of the coordinates of two of their corners.
Circles are defined as a centre position and a radius.
Areas that should be excluded can also be specified.

A distinction is made between the {\em input} and the {\em output coordinate system}. The former is
used to specify the rectangular and circular survey areas. The latter is used for the
coordinates of the telescope positions which make up the tiles that fill the survey areas.
These tiles are placed along rows of constant declination or latitude in the output coordinate system.

\begin{figure}
\epsscale{0.9}
\plotone{P9-7-Gal.eps}
\caption{Tiling Algorithm: Survey Area transformed and filled with
tiles/telescope pointings} \label{P9-7-Gal}
\end{figure}

Figure \ref{P9-7-Gal} shows how this approximately looks like for a small survey area defined by two points $P_1 = (260.0, 20.0)$
and $P_2 = (265.0, 25.0)$, in degrees,  using galactic coordinates as input coordinate system (a).
Plotting this as a Cartesian coordinate system yields a rectangle (b) 
which is converted to the output coordinate system, in this case FK5 
J2000.0 (c). This is then tiled, with each tile comprising 2 x 2 
telescope positions (d).

{\em Automatic guide star selection:}
A Java class has been developed which reads locally installed binary USNO catalogue files and is
compatible with the catalogue handling in ESO's
JSkyCat\footnote{http://archive.eso.org/skycat}.
This makes it easy to switch between
the local catalogue and online catalogues.
If a suitable guide star cannot be found for one or more positions in a tile then this tile
is shifted back until guide stars for all its positions can be retrieved from the catalogue.
The following tiles in the same row are shifted accordingly.

\section{User Interface}
The SDT is implemented in Java. It uses some classes from the UKIRT/JCMT OT
and the JSky\footnote{http://archive.eso.org/JSky} package.

\begin{figure}
\epsscale{0.8}
\plotone{P9-7-Sdt.eps}
\caption{User Interface} \label{P9-7-Sdt}
\end{figure}

Figure \ref{P9-7-Sdt} depicts the SDT halfway through creating the telescope positions for a survey area:
main window (top left), survey area with telescope positions (bottom left)
and autoguider footprint (diamond) with guide star catalogue query results.

Users can specify tile and position offsets, autoguider dimensions and guide star selection criteria
in a configuration file.

\section{Interface to Observation Control System (OCS)} \label{P9-7:interfaceOCS}

One use of the SDT is as a generic standalone application that
writes the defined telescope positions in a simple format to an ASCII
file. The latter might then be read as data by other systems.

Additionally the SDT provides functionality for close integration with
the UKIRT/JCMT OCS (Bridger et al. 2000; Rees et al. 2002).
The telescope positions created by the SDT can be
read into a TOML\footnote{Telescope Observation Mark-up Language,
http://omp.jach.hawaii.edu/schema/TOML} Science Program (de Witt et al. 2004, in 
preparation), an XML-based description of observations used by the
Observation Management Project (Economou et al. 2002).

%\footnote{See
%Observation Managemant Project (OMP), http://omp.jach.hawaii.edu,
%based on the Observatory Reduction and Acquisition Control (ORAC) system,
%http://www.jach.hawaii.edu/JACpublic/UKIRT/software/orac}.
%
%The telescope positions created by the SDT can be
%read into a {\em TOML}\footnote{Telescope Observation Mark-up Language,
%http://omp.jach.hawaii.edu/schema/TOML} Science Program.
%This is an XML based description of observations used by the OCS.

The user can create template observations using the OT.
In these template observations all parameters needed to set up an
observation are specified (i.e. exposure time, filter etc.), except the
telescope position. The SDT will
automatically break down its list of telescope positions, combine them with the
template observations and
group them into {\em Minimum Schedulable Blocks} which make up a TOML Science
Program.

Optionally any of these observations can be individually loaded into the OT
which can display telescope position, guide star and detector footprint in
a JSkyCat window and the settings
can be modified if necessary.

\acknowledgments

We would like to thank those members of the UK Astronomy Technology
Centre, the Institute for Astronomy of the University of Edinburgh and the Joint
Astronomy Centre in Hilo, Hawaii who have offered advice during the design of the Survey
Definition Tool and helped testing it.

%-----------------------------------------------------------------------
%			      References
%-----------------------------------------------------------------------
% List your references below within the reference environment
% (i.e. between the \begin{references} and \end{references} tags).
% Each new reference should begin with a \reference command which sets
% up the proper indentation.  Observe the following order when listing
% bibliographical information for each reference:  author name(s),
% publication year, journal name, volume, and page number for
% articles.  Note that many journal names are available as macros; see
% the User Guide listing "macro-ized" journals.   
%
% EXAMPLE:  \reference Hagiwara, K., \& Zeppenfeld, D.\  1986, 
%                Nucl.Phys., 274, 1
%           \reference H\'enon, M.\  1961, Ann.d'Ap., 24, 369
%           \reference King, I.\ R.\  1966, \aj, 71, 276
%           \reference King, I.\ R.\  1975, in Dynamics of Stellar 
%                Systems, ed.\ A.\ Hayli (Dordrecht: Reidel), 99
%           \reference Tody, D.\  1998, \adassvii, 146
%           \reference Zacharias, N.\ \& Zacharias, M.\ 2003,
%                \adassxii, \paperref{P7.6}
% 
% Note the following tricks used in the example above:
%
%   o  \& is used to format an ampersand symbol (&).
%   o  \'e puts an accent agu over the letter e.  See the User Guide
%      and the sample files for details on formatting special
%      characters.  
%   o  "\ " after a period prevents LaTeX from interpreting the period 
%      as an end of a sentence.
%   o  \aj is a macro that expands to "Astron. J."  See the User Guide
%      for a full list of journal macros
%   o  \adassvii is a macro that expands to the full title, editor,
%      and publishing information for the ADASS VII conference
%      proceedings.  Such macros are defined for ADASS conferences I
%      through XI.
%   o  When referencing a paper in the current volume, use the
%      \adassxii and \paperref macros.  The argument to \paperref is
%      the paper ID code for the paper you are referencing.  See the 
%      note in the "Paper ID Code" section above for details on how to 
%      determine the paper ID code for the paper you reference.  
%
\begin{references}
\reference Economou, F., Jenness, T., Tilanus, R., Hirst, P.,
    Adamson, A.\ J., Rippa, M., Delorey, K., Isaak, K.\ 2002, \adassxi, 488

\reference Folger, M., Bridger, A., Dent, B., Kelly, D., Adamson, A., Economou,
    F., Hirst, P., Jenness, T.\ 2002, \adassxi, 453

\reference Henry, D.\ M., Casali, M.\ M., Montgomery, D., Burch, K., Laidlaw,
K., Ives, D.\ J., Vick, A.\ J.\ A., Bridger, A., Lunney, D., Adamson, A.\ J.,
Rees, N.\ P., Chylek T., Chuter, T.\ C.\ 2003, Proc.\ SPIE, 4841, 63

\reference Holland, W.\ S., Duncan, W., Kelly, B.\ D., Irwin, K.\ D., 
Walton, A.\ J., Ade, P., A.\ R., Robson, E.\ I.\ 2003, Proc.\ SPIE, 
4855, 1

\reference Hovey, G.\ J., Burgess, T.\ A., Casorso, R.\ V., Dent, W.\ R.,
Dewdney, P.\ E., Force, B., Lightfoot, J.\ F., Willis, A.\ G., Yeung, K.\ K.\
2000, Proc.\ SPIE, 4015, 114

\reference Rees, N.\ P., Economou, F., Jenness, T, Kackley, R.\ D., Walther, C.\
A., Dent, W.\ R.\ F., Folger, M., Gao, Xiaofeng; Kelly, D., Lightfoot, J.\ F.,
Pain, I., Hovey, G.\ J., Redman, R.\ O.\ 2002, Proc.\ SPIE, 4848, 283

\reference Warren, S.\ 2002, Proc.\ SPIE, 4836, 313

\reference Wright, G.\ S., Bridger, A.\ B., Economou, F., Adamson, A.\ J.,
Currie, M.\ J., Pickup, D.\ A., Tan, M., Rees, N.\ P., Purves, M., Kackley,
    R.\ D., Folger, M.\ 2001, \adassx, 137

\end{references}

% Do not place any material after the references section

\end{document}  % Leave intact
