\documentclass[11pt,twoside]{article}  % Leave intact
\usepackage{adassconf}

\begin{document}   % Leave intact

\paperID{P2-21}


\title{Spectrum and Bandpass Services for the Virtual Observatory}


\author{L\'aszl\'o\ Dobos\altaffilmark{1}, Tam\'as\ Budav\'ari\altaffilmark{2},
Istv\'an\ Csabai\altaffilmark{1}, Alexander S. Szalay\altaffilmark{2}}

\iffalse	% Original Institutes
\altaffiltext{1}{Dept. of Physics of Complex Systems,
E\"otv\"os Lor\'and University, H-1117 Budapest, Hungary}

\altaffiltext{2}{Dept.\ of Physics \& Astronomy, Johns Hopkins
University, Baltimore, MD 21218, USA}
\else
\vspace*{2ex}   % Corrected style FO
\altaffilmark{1}\affil{
   Dept. of Physics of Complex Systems,
   E\"otv\"os Lor\'and University, H-1117 Budapest, Hungary}
\altaffilmark{2}\affil{
   Dept.\ of Physics \& Astronomy, Johns Hopkins
   University, Baltimore, MD 21218, USA}
\fi


\contact{Laszlo Dobos}
\email{dobos@pha.jhu.edu}


\paindex{Dobos, L.}
\aindex{Budav\'ari, T.}     
\aindex{Csabai, I.}     
\aindex{Szalay, A. S.}


\authormark{Dobos, Budav\'ari, Csabai \& Szalay}


\keywords{spectra, SED, filter profile, band pass, Virtual Observatory: table, ConeSearch,
web services}


\begin{abstract}          % Leave intact
We present easy-to-use web applications and XML Web Services to search,
plot and manage spectral energy distributions and filter profiles.
We provide keyword search, advanced query forms and SQL interfaces
to select spectra and band passes that may be retrieved in a variety
of formats including XML, VOTable and ASCII.
All SDSS DR1 spectra had been loaded into a database as well as the
entire 2dF catalog that adds up to half million SEDs but registered
users can upload their own data making it available for the rest of
the community and are free to modify or delete them at any time. Scientific
services allow to build rest-frame composite spectra out of selected spectra.
The filter profile database has a growing collection of photometric filters
and the same search interfaces. Using the spectrum and filter profile core
services, we plan to build higher level services to help astronomers create
color-color diagrams, simulated catalogs and to estimate distances to
extragalactic objects.
\end{abstract}


\section{Introduction}

The Virtual Observatory (VO) is an Internet based system to federate the large
astrophysical archives without centralization by defining communication standards
to allow astronomers and astrophysicists to access data in an easy manner from
different sources and incorporate them into their scientific applications (Szalay \& Gray 2001).

The VO Community has already built several data services containing
and publishing photometric data and images. We present Web Services
that publish spectral energy distributions\footnote{http://www.voservices.net/wave/} (SEDs) in
the wavelength range which should have been organized in a VO
compliant way.

\section{Virtual Observatory Services}

\subsection{Spectrum Services}

The database contains SDSS DR1 and 2dFGRS spectra (almost half a million).
Registered users can upload their own spectra. SDSS spectra are calibrated and
can be used to calculate synthetic magnitude and color when convolved with filter curves.
Search functions: keyword, redshift, ConeSearch, advanced, SQL. The ConeSearch uses
Hierarchical Triangular Mesh indexing (Kunszt et al. 2001).

The library provides functions to resample, redshift and normalize spectra.
Composite spectra generation with different templates for near galaxies and QSOs
(median, average) and convolution with filter curves to calculate magnitude and color
are also available. A graphical module is built for visualizing SEDs on graphs
and to plot color--color diagrams.

\begin{figure}
\label{P2-21:fig_screenshot}
\epsscale{0.9}
\plotone{P2-21_1.eps}
\caption{Screenshots from the website at http://voservice.net/wave.
Left picture shows a resultset of a spectrum query, the right picture shows the advanced
query form.}
\end{figure}

\subsection{Bandpass Services}

The database contains the band passes of the main astronomical instruments used
in large scale surveys. Users can upload their own filter profiles and
search for keyword and advanced criteria. Native SQL search is also available.

Functions are provided to resample and normalize filter curves. Convolution with spectra
(magnitude, color calculation) and visualization on graph are also available.

\section{Implementation Details}

\subsection{Data representation and DB schema}
We built a relational database of SEDs and implemented
effective search algorithms as well as common
spectrum and bandpass manipulation functions in the form of XML Web
Services. Our implementation may be considered as a prototype of a VO
standard of XML representation of astronomical data in the wavelength
domain.  Although we worked out this new data model and schema, our
web service supports the overall Virtual Observatory standard VOTable
format.

\begin{figure}
\label{P2-21:fig_structure}
\epsscale{0.8}
\plotone{P2-21_2.eps}
\caption{The structure of the server-side software layers.}
\end{figure}

The schema was defined on the basis of SDSS spectra which today consists of 250 thousand
SEDs, but we didn't want to limit the database to the SDSS and built an expandable
database where users can register, modify or delete their own spectra and filter band passes.

\subsection{Platform and tools}

The server--side modules are implemented on Microsoft`s .Net platform
using the C\# language. On the server-side different modules are communicating
via native .Net calls, but all essential functions of the libraries are
exported via the XML Web Services and can be called by any SOAP client.
The web site also uses native .Net connection instead of SOAP calls to speed
up displaying query results. Figure 2. shows the structure of the server--side
software layers.

The database server is a dual Xeon processor PC running Windows 2000
and Microsoft SQL Server 2000. The size of the database is over 45GB, the
response time of an advanced query is under 1 second.

\subsection{Web interface}

We designed an easy-to-use web interface for the services to provide human
readable output to ordinary users.

All basic functions can be accessed from the web interface, spectacular graphs
can be generated on-the-fly.

\section{Sample Client}

A downloadable sample client is written in C\# using the .Net web service client
and Windows Forms for the graphical interface. This tiny client doesn't contain
any intelligence, that is all operations --- like composite calculation or graph
generation --- are performed on the remote server and not on the local computer.

The downloadable source code demonstrates how to query the spectra data\-base,
retrieve spectra and send them to the graph generator function.

The sample client can be downloaded from the web site of the service, under the
``downloads" menu.

\section{Web addresses}

\begin{list}{}{}
\item You can access the web service on the Internet:\newline
\htmladdURL{http://voservices.net/wave}.
\item To access other Virtual Observatory Web Services visit\newline
\htmladdURL{http://voservices.org}.
\item To learn more about XML and Web Services visit\newline
\htmladdURL{http://msdn.microsoft.com/webservices/} or\newline
\htmladdURL{http://java.sun.com/webservices/}.
\end{list}

\section{Summary and Future Works}

The main goal of the system is that band passes of the astronomical instruments are also
available in the database and the web service provides functions for calculating synthetic
magnitudes, thus you can generate virtual photometric catalogs, which would be useful
in instrument design for simulation or in photometric redshift calculations.

In the future the system is intended to be able to deal with data in the time domain, which
is useful for super nova search. Additional services, such as on-the-fly synthetic spectrum
generation based on several models are also under development.


\begin{acknowledgments}
The project was supported by the MTA-NSF grant 124. and 
partly supported by the Hungarian Scientific
Research Fund: OTKA T037548.
\end{acknowledgments}

\begin{references}
\reference Kunszt, P. Z., Szalay, A. S., \& Thakar, A., 2001, {\it{}``The
	Hierarchical Triangular Mesh''} in Mining the Sky: Proc.\ of the
	MPA/ESO/MPE workshop, Garching, A. J. Banday, S. Zaroubi,
	M. Bartelmann (ed.), (Springer-Verlag Berlin Heidelberg), pp.\
	631-637
\reference Szalay, A. S., et al. 2002, Proc.\ of SPIE, 4846, {\it `Web
   Services for the VO'}
\reference Szalay, A. S., \& Gray, J., 2001, {\em{}Science}, {\bf{}293}, 
	pp.\ 2037-2038 

\end{references}




\end{document}  % Leave intact
