%%% Modifs FO
%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{P2-2}
%%%% ID=P2-2

%-----------------------------------------------------------------------
%		            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{Using a Reversed Exposure Time Calculator for Querying Uncalibrated Archives}
\titlemark{ Reversed Exposure Time Calculator }

%-----------------------------------------------------------------------
%		          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{Bruno Voisin, Seathr\'un \'O Tuairisg, Ray Butler, Aaron Golden, Andy Shearer}
\affil{Computational Astrophysics Laboratory, National University of Ireland, Galway, Ireland}

\author{Alberto Micol}
\affil{European Space Agency, Space Telescope - European Coordinating Facility, Karl Schwarzschild Strasse 2
D-85748 Garching bei M\"unchen, Germany}


%-----------------------------------------------------------------------
%			 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{Bruno Voisin}
\email{bruno.voisin@nuigalway.ie}

%-----------------------------------------------------------------------
%		      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{Voisin, B.}
\aindex{Micol, A.}     % Remove this line if there is only one author
\aindex{OTuairsg@\'{O}Tuairisg, S.}     % Remove this line if there is only one author
\aindex{Butler, R.}     % Remove this line if there is only one author
\aindex{Golden, A.}     % Remove this line if there is only one author
\aindex{Shearer, 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{Voisin, Micol, \'O'Tuairisg, Butler, Golden, Shearer}

%-----------------------------------------------------------------------
%			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{Virtual Observatory, instrument simulation}

%-----------------------------------------------------------------------
%			       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
Mining large quantities of uncalibrated archives, for specific sources can prove
to be a hard task. Even an automated search engine able to use an archive
metadata (instrument, a filter, exposure time...) is not completely sufficient.
Indeed, without calibration it is difficult to know whether an interesting
source can be seen on images without actually looking. Here, we show how a
``reversed'' exposure time calculator can be used to efficiently process the
database-stored image descriptors of the ESO/Wide Field Imager (WFI) archive,
and compute the corresponding limiting magnitudes. The end result is a more
scientific description of the ESO/ST-ECF archive contents, allowing a more
astronomer-friendly archive user interface, and hence increasing the archive
useability in the context of a Virtual Observatory. This method is developed for
improving the Querator search engine of ESO/HST archive, in the context of the
EC funded ASTROVIRTEL project. 
\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{Introduction}
With the increasing number of large-scale surveys in various wavebands,
astronomers find themselves with more data than they can actually deal with.
While so much available data makes multi-waveband studies easier, the logistics
problems faced in this area are twofold: finding out which datasets amongst the
archives are of interest for a specific study, and then comparing heterogeneous
data coming from different sources. Though this paper's interest lies with the
former, references concerning a data mining approach of the latter can be found
in Voisin (2002) and Voisin \& Donas (2001). %(Voisin02) and (Voisin01).

The ST-ECF/ESO archive, physically stored in Garching, Germany, is typical of
this data `mine' too huge to efficiently parse by usual queries. It contains
more than 10 terabytes of scientific data obtained with the ESA/NASA HST, with
the ESO NTT, VLT and with the Wide Field Imager on the ESO/MPI 2.2m Telescope,
and keeps growing at a rate of 4.5 terabytes per year. Thus, a simple
multi-waveband study of a source in a given sky area could easily require the
analysis of 50 to 100 images, from various telescopes using various filters. Of
course, depending on the type of source studied, some/most of those images might
prove of no interest as the depth/filter can prevent the source from being seen
on the final image. It might also happen that the sky region the scientist is
interested in proves to have been observed in an insufficient number of
wavebands for conductiong the study. This manual archive `mining' work proves to
be time consuming for the scientist, especially as a lot of data in the
ST-ECF/ESO archive is uncalibrated, and makes multi-waveband research
inefficient on a larger scale than a few sources.

The ASTROVIRTEL project 
(Pierfederici et al., 2001; Micol \& Pierfederici, 2004), supported by the
European Commission and managed by the ST-ECF on behalf of ESA and ESO, aims at
enhancing the scientific return of the ST-ECF/ESO Archive, by focusing on the
creation of tools and methods allowing one to efficiently access archives as
virtual telescopes. Among those tools, a search/query engine called Querator
(Pierfederici, 2001) has been developed with this multi-waveband idea in mind,
making it easier to parse through the whole ST-ECF/ESO archive and find
specified sky regions that have been observed in a minimum number of wavebands.
This is currently used for multiple data archive studies such as the one
presented in \'O'Tuairisg (2004).

Though one of the problems is solved, the other one (images of unsufficient
depth, poor filter for a specific source) is only slightly improved. Querator,
through the use of observation metadata (telescopes, generic filters, exposure
time...) allows the user to give constraints on the images he wants to get. But
these constraints proved to be difficult to use, hence the need for a simpler,
more generic approach, such as specifying the faintest magnitude of the objects
we want to see in the images. As the images are uncalibrated, limiting magnitude
information is not available. Our approach is to use intrument simulation (a
reversed exposure time calculator) for computing this value.

\section{Mining Archives with Querator}
Querator is a search engine developped at the ESO in the context of the
ASTROVIRTEL project. Querator is a search engine addressing the need for
astronomers to get multicolour image data. Linked with the naming engine SIMBAD,
Querator can be given either a sky box, an object name, or a list of objects,
and is then able to process the entire ST-ECF archive for every corresponding
image matching a number of user-defined constraints. Main constraints available
for the user to fix are:

\begin{itemize}
\item {\bf instrument} used for the observation, to select in a list of all ESO and HST instruments for which images are stored in the ST-ECF archive,
\item {\bf minimum exposure time} of observations to include,
\item {\bf start time} of the observation. Here a minimum/maximum date or a date range can be specified,
\item {\bf wavelength} of the observations. This can be a specific, a list or a range of wavelength,
\item {\bf minimum filter number} in which the area has to be observed for Querator to return images,
\item {\bf filter type} lets the user select all filter types or restrain search to broad/\-narrow bands.
\end{itemize}

Though those constraints make it possible to narrow an image search, it is still
difficult to use Querator to look for sources of a known spectral type and of a
known magnitude. Indeed, if one doesn't want to get lots of images not deep
enough to sort out, the only way of doing a pre-selection is to select a large
enough minimum exposure time. But this value alone is very difficult to
apprehend as it depends on other observation parameters.

\section{From Exposure Time to Photometric Magnitude}
To compute a limiting magnitude without reprocessing the whole ESO archive
images, we chose to use the ESO exposure time calculator. This instrument
simulation tool is generally used before observations for computing the minimum
exposure time required for getting a specific signal to noise ratio on sources
of a given spectral type/magnitude. The main formula used by the ETC for
computing the number $N$ of counts a source will give is:

$$N=\frac{F.\Delta_{i}.T.E.S.\Omega_{i}}{P}$$

where $N$ is the number of electrons per bin, $F$ is the incident flux,
$\Delta_{i}$ is the filter band width , $T$ the total exposure time, $E$ the
efficiency, $S$ the telescope surface, $\Omega_{i}$ is the solid angle subtended
by the integration element, and $P$ the energy of one photon. A signal to noise
ratio $S/N$ can then be computed as:


$$\frac{S}{N}=\frac{N_{Obj}}{\sqrt{N_{Obj}+n_{bin}.N_{Sky}+n_{bin}.RON^{2}+n_{pi
x}.DARK.T}}$$

where $RON$ is the contribute to the detected counts due to the Read Out Noise,
$DARK$ is the similar term due to the dark counts, $n_{bin}$ is the number of
integration bins to evaluate the $DARK$ contribute to $S/N$, and $n_{pix}$ is
the number of integration pixels to evaluate the $RON$ contribute to $S/N$.

Considering that we know the exposure time $T$, and that we fix a minimum signal
to noise ratio, we can rearrange the formula for computing a minimum flux $FObj$
a source should produce as:

$$F_{Obj}=\frac{\frac{S}{N}}{2.a.T}.\Biggl[\frac{S}{N}+\sqrt{{\Bigl(\frac{S}{N}\Bigr)}^{2}+4.c}\Biggr]$$

with $a$ and $c$ such as:

$$a=\frac{\Delta_{i}.E.S}{P}$$
$$c=n_{bin}.a.F_{Sky}.T.\Omega_{i}+n_{bin}.{RON}^2+n_{pix}.{DARK}.T$$

From this minimum flux, we can then compute a corresponding theoretical limiting
magnitude for the image. Sources fainter than this magnitude should
theoretically not be seen. Computing magnitudes by this method is far easier
than doing it by reprocessing the entire image, and it can be done for the
entire archive at a small computing cost. Once Querator has been tuned for
taking this information into account, it will be possible for uninteresting
images to be discarded directly by the search engine, instead of returning them
to the user. Of course, the multi-waveband aspect has to be taken care of, so
the reversed ETC (or LMC for Limiting Magnitude Calculator) is able to convert
magnitude between bands for various known spectral types. Finally, in case of
missing metadata, the LMC can simulate some values (sky brightness according to
moonphase, airmass tables for telescope locations...), at the price of a loss of
accuracy.

\section{Conclusion}
So far, the LMC is only processing images of a few instruments, due to the low
availability of metadata on some other archives. An observation metadata `data
model' is actually under construction, and should be designed in accordance to
the IVOA interoperability requirements. Another interesting thought is the
question whether the LMC should just be used for computing limiting magnitudes
that Querator would then use, or if the LMC should be entirely plugged in the
search engine, and compute limiting magnitude information `on-the-fly'. The
latter would definitely be the more interesting since it would allow the user to
fix herself the signal-to-noise ratio she'd like to have on certain sources, but
this might require too much computation, and delay further the query answering.

%On a conclusive note, let's specify that the LMC is implemented as a Perl module, and that it is designed to be usable also with archives other that the ST-ECF/ESO's. It is actually another Perl module which manages the link between the LMC and the ST-ECF archive, and this module would be the only one to reimplement.

%\smallskip
%{\tiny This work was carried out as part of the CosmoGrid project, funded under the Programme for Research in Third Level Institutions (PRTLI) administered by the Irish Higher Education Authority under the National Development Plan and with partial support from the European Regional Development Fund. The support given by ASTROVIRTEL, a Project funded by the European Commission under FP5 Contract No. HPRI-CT-1999-00081, is acknowledged. Thanks also goes to Pascal Ballester for his work on the ESO ETC [Ballester03], and his help.}




\acknowledgments{This work was carried out as part of the CosmoGrid project,
funded under the Programme for Research in Third Level Institutions (PRTLI)
administered by the Irish Higher Education Authority under the National
Development Plan and with partial support from the European Regional Development
Fund. The support given by ASTROVIRTEL, a Project funded by the European
Commission under FP5 Contract No. HPRI-CT-1999-00081, is acknowledged. Thanks
also goes to Pascal Ballester for his work on the ESO ETC (Ballester 2004), 
and his help.}

%-----------------------------------------------------------------------
%			      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 Ballester, P., 2004, \adassxiii, \paperref{O5-1}

\reference Micol, A., Pierfederici, F., 2004, \adassxiii, \paperref{P2-25}

\reference Pierfederici, F. 2001, Astronomical Data Analysis, 
   Proceedings of SPIE 4477

\reference \'O'Tuairisg, S. et al., 2004, \adassxiii, \paperref{P4-21}

\reference Pierfederici, F. et al. 2001, \adassx, 141

\reference Voisin, B., 2002, Ph.D, Universit\'e de Toulon et du Var

\reference Voisin, B., Donas J., 2001, Astronomical Data Analysis, Proc. of SPIE 4477


\end{references}

% Do not place any material after the references section

\end{document}  % Leave intact
