%ADASS_PROCEEDINGS_FORM%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% ImgCutout, an Engine of Instantaneous Astronomical Discovery
% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
\documentclass[11pt,twoside]{article}  % Leave intact
\usepackage{adassconf}

\begin{document}   % Leave intact

%-----------------------------------------------------------------------
%			    Paper ID Code
%-----------------------------------------------------------------------

\paperID{O8-4}
%%%% ID=O8-4

%-----------------------------------------------------------------------
%		            Paper Title 
%-----------------------------------------------------------------------

\title{ImgCutout, an Engine of Instantaneous Astronomical Discovery}
\titlemark{ImgCutout}

%-----------------------------------------------------------------------
%		          Authors of Paper
%-----------------------------------------------------------------------

\author{Mar{\'\i}a A. Nieto-Santisteban and Alexander S. Szalay}
\affil{Department of Physics \& Astronomy, The Johns Hopkins
University, Baltimore, MD 21218, USA. Email: nieto, szalay@pha.jhu.edu}

\author{Jim Gray}
\affil{Microsoft Research, San Francisco, CA 94105, USA. Email: gray@microsoft.com}

%-----------------------------------------------------------------------
%			 Contact Information
%-----------------------------------------------------------------------
\contact{Mar{\'\i}a A. Nieto-Santisteban}
\email{nieto@pha.jhu.edu}

%-----------------------------------------------------------------------
%		      Author Index Specification
%-----------------------------------------------------------------------
\paindex{Nieto-Santisteban, M.}
\aindex{Szalay, A. S.}
\aindex{Gray, J.}

%-----------------------------------------------------------------------
%                     Author list for page header
%-----------------------------------------------------------------------
\authormark{Nieto-Santisteban, Szalay, \& Gray}

%-----------------------------------------------------------------------
%			Subject Index keywords
%-----------------------------------------------------------------------

\keywords{SDSS, Virtual Observatory, web services, visualization, databases}

%-----------------------------------------------------------------------
%			       Abstract
%-----------------------------------------------------------------------

\begin{abstract}
ImgCutout is a Web application that enables professional astronomers and
the general public to interactively visualize and explore large, complex
astronomical data sets. The application consists of a Web interface that
calls a Web service, which accesses SkyServer, a 1 TB SQL Server
database containing catalog data for 100 million objects, spectra and
images from the Sloan Digital Sky Survey. ImgCutout builds, in real
time, color mosaic-images of user-selected regions of the sky, and
overlays additional information about astronomical and spatial objects
in the database including: boundaries of survey fields and aperture
plates, outlines of individual objects and data quality masks, in
addition to locations of photometric and spectroscopic objects. The tool
can search for lists of known objects, allows new database queries, and
provides detailed information about selected objects.
\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. 
\section{Introduction}

The Sloan Digital Sky Survey (SDSS) is digitally mapping one-quarter of
the sky in 5 spectral bands. SDSS will ultimately obtain 40 TB of raw
pixel data, spectra of 1 million objects, and photometry for more than
200 million objects.

Raw survey data from the telescope are processed at Fermilab to produce
various image and data files. These data files are then loaded into the
SkyServer database at Johns Hopkins University (JHU) after further
processing (Thakar, Szalay, \& Gray 2004). SkyServer is a relational
database that is tuned and heavily indexed to allow fast exploration and
analysis of the data. The SkyServer database occupies 1 TB for Data
Release One (DR1), but it will grow to about 6 TB for the full survey.

We handle quick database queries interactively
\htmladdnormallinkfoot{SkyServer Web site}{http://skyserver.sdss.org/},
but queries longer than a minute are handled by the Batch Query System
(O'Mullane et al.\ 2004), which requires registration.

\section{ImgCutout Web interface}

The \htmladdnormallink{SkyServer Web site}{http://skyserver.sdss.org/}
provides interactive access to images and associated catalog data via
Visual Tools, which include the Finding Chart, Navigator, Image List,
and Explorer. These interlinked tools exchange information about the
current selected object, allowing transparent mobility between data
views. All of these visual interfaces use a common underlying SOAP
Web service, \htmladdnormallinkfoot{ImgCutout}%
{http://skyservice.pha.jhu.edu/dr1/ImgCutout/ImgCutout.asmx}.

\subsection{The big picture of the sky} 

To allow rapid data visualization, images are stored in JPEG format.
During the preprocessing stage, FITS images in 3 of the original 5 bands
are combined to create a color JPEG image. The JPEGs are stored in the
database at 5 zoom levels, along with associated astrometry information.
This preprocessing facilitates rapid recovery of the frames and
geometric transformations needed to create dynamically a mosaic of any
region of interest. Mosaics can be as big as 2048 $\times$ 2048 pixels,
covering approximately 34 $\times$ 34 degrees.

Many interesting features can be overplotted on top of the images. The
Field option displays the boundaries of the original FITS images used to
construct the mosaic. The Plates checkbox shows the boundaries of the
aperture plates used to obtain spectra chosen from a list of potential
Targets. Selecting SpecObjs or PhotoObjs highlights objects in the image
with spectroscopic or photometric data. Outline and BoundingBox options
mark the pixels associated with each object (Figure 1). 

\begin{figure}
\epsscale{.70}
\plotone{O8-4_f1.eps}
\caption{Snapshot of the Finding Chart ImgCutout Web interface}\label{O8-4:T1.10-fig-1}
\end{figure}

\subsection{Data quality} 

Due to bad weather, bright stars, satellite trails, or other anomalies,
10--15\% of the raw survey data are substandard. The SkyServer Mask 
option allows easy identification of regions with poor data
quality. This visualization tool helps guide data analysis and lets
users decide quickly whether particular data are useful for their
purposes.

\subsection{Viewing known sources. Making new discoveries} 

Using the Image List tool, users can simultaneously view thumbnails of
SDSS images for objects specified by a list of coordinates. The
thumbnails provide a visual index for objects specified by the user or
returned by an SQL query of the database. More 
detailed data views can be interactively selected
from the Image List tool allowing creation of Finding Charts, for example.

\begin{figure}
\plotfiddle{O8-4_f2a.eps}{1.20in}{0}{30}{30}{-195}{-80}
\plotfiddle{O8-4_f2b.eps}{1.30in}{0}{38}{38}{-22}{20}
\caption{Possible lensed quasar and spectrum.} \label{O8-4:T1.10-fig-2}
\end{figure}

The most interesting feature of this tool is that users can generate a
list of coordinates and associated thumbnails by querying the database
directly using SQL. For example, visual inspection of the thumbnails
generated in response to the following search for high-redshift quasars:
%
\begin{list}{}{\itemsep=-3pt}
\item SELECT specObjId, ra, dec 
\item FROM SpecObj
\item WHERE specClass = 3 and z $>$ 3
\end{list}
% 
yields a potential lensed quasar. Selecting the thumbnail brings up a
more detailed image in the Navigator. Inverting the colormap improves
the visibility of faint background objects. Selecting PhotoObjs shows 5
closely spaced objects present in the photometric catalog. The Explore
tool then allows detailed investigation of colors, morphological type,
and spectrum (see Figure 2). Based on similar colors for some of the 
objects, followup observations were requested to test whether or not 
this particular group of sources is indeed a lensed quasar.

\section{Design and Technologies}

The user interfaces described above are all layered on the ImgCutout Web
service for SDSS data in the SkyServer database, but the same principles
would work equally well for other surveys.
Interactive tools must respond quickly to be successful, so JPEG images
and database indexing should be considered for any generic image cutout
service. In general terms, the system is constructed as follows:

\begin{enumerate}
\item Combine and convert FITS into JPEG.
\item Store JPEGs with several zoom levels in the database.
\item Store astrometry for frames and objects.
\item Store other relevant information (masks, plates, etc).
\item Construct a spatial index,  HTM2 (Fekete, Szalay, \& Gray 2004).
\end{enumerate}

The database provides images and object data to an image cutout
service in response to SQL queries. The cutout service assembles
the images into mosaics and displays the mosaics with the selected
overlays. In the specific case of the SDSS, we perform these
tasks using the following technologies:

\begin{itemize}
\item Database: Microsoft SQL Server 2000.
\item HTM2 libraries: implemented with C++ and C\#.
\item Web interface: ASP pages and Java Scripts.
\item Web service: implemented in .Net and C\#.
\end{itemize}
%
The ImgCutout Web service can be accessed in various ways:
\begin{itemize}
\item Via our \htmladdnormallinkfoot{Web site}{http://skyserver.sdss.org/}.
\item Through other Web sites using \htmladdnormallinkfoot{HTTP protocol}%
{http://skyserver.sdss.org/dr1/en/tools/chart/chart.asp}.
\item Using the SOAP protocol. A detailed \htmladdnormallinkfoot{tutorial}%
{http://www.ivoa.net/twiki/bin/view/IVOA/WebgridTutorial} is available on
  the IVOA Web site about how to implement clients in a number of languages
  and on different platforms.
\item Using the Virtual Observatory (VO) Simple Image Access Protocol (SIAP) 
service for SDSS data.
\end{itemize}
%
All of the ImgCutout software, a 1.3 GB subset of the SkyServer DR1
database, and the SkyServer Web site code and content are available for download 
in the \htmladdnormallinkfoot{MySkyServer site}%
{http://www.skyserver.org/myskyserver/}.  MySkyServer database and software 
are useful for experimenting with queries and seeing how the tools are implemented.

%-----------------------------------------------------------------------
%			      References
%-----------------------------------------------------------------------

\begin{references}
\reference Fekete, G., Szalay, A., \& Gray, J.\ 2004, \adassxiii, \paperref{P3-9}
\reference O'Mullane, W., Gray, J., Li, N., Budavari, T., Nieto-Santisteban, M., \& Szalay, A.\ 2004, \adassxiii, \paperref{O4-4}
\reference Thakar, A., Szalay, A., \& Gray, J.\ 2004, \adassxiii, \paperref{P1-6}
\end{references}

% Do not place any material after the references section

\end{document}  % Leave intact
