%% Modif. FO
%ADASS_PROCEEDINGS_FORM%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% SAMPLE2.TEX -- ADASS XII (2002) ASP Conference Proceedings sample
% paper with complicated markup. Based on ADASS XI (01) version.
%
% This is a comprehensive example, meaning that we have made use of each
% of the capabilities of the LaTeX + the ASPCONF macro package that we think
% you may need to use.  If you want to see a "base-bones" sample paper,
% take a look at sample1.tex.
%
% 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.  
%
% 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.
%

\paperID{P2-29}
%%%% ID=P2-29

%-----------------------------------------------------------------------
%		            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{WFPC2 Associations Pipeline: Publishing HST archives within VO}
\titlemark{ WFPC2 Associations Pipeline }

%-----------------------------------------------------------------------
%		          Authors of Paper
%-----------------------------------------------------------------------
% Enter the authors followed by their affiliations.  The \author and
% \affil commands may appear multiple times as necessary.  List each
% author by giving the first name or initials first followed by the
% last name.  Authors with the same affiliations should grouped
% together. 
%
% Try to limit the front matter to no more than three \author
% commands.  Group authors with the same affiliations.  Too many
% \author commands fills the first page of the paper with little
% actual text.

\author{D.\ Durand\altaffilmark{1}, Alberto Micol\altaffilmark{2}, David Schade\altaffilmark{1}, Luc Simard\altaffilmark{1},
	Michael Corbin\altaffilmark{3}, Richard Hook\altaffilmark{2,3}, Anton Koekemoer\altaffilmark{3}, Megan Donahue\altaffilmark{4}}
%\affil{CADC,National Research Council Canada, Victoria, Canada, Email: daniel.durand@nrc.ca}}

% Notice that some of these authors have alternate affiliations, which
% are identified by the \altaffilmark after each name.  The actual alternate
% affiliation information is typeset in footnotes at the bottom of the
% first page, and the text itself is specified in \altaffiltext commands.
% There is a separate \altaffiltext for each alternate affiliation
% indicated above.

\iffalse	%%% Original, bad style
\altaffiltext{1}{Canadian Astronomy Data Centre, Herzberg Institute of Astrophysics, National Research Council Canada, Victoria, Canada} 
\altaffiltext{2}{Space Telescope - European Coordination Facility, ESA, Garching bei Muenchen, Germany} 
\altaffiltext{3}{Space Telescope Science Institute, 3700 San Martin Drive, Baltimore, MD 21218, U.S.A.}
\altaffiltext{4}{Dept. of Physics \& Astronomy, Michigan State University, East Lansing, MI 48824-1116. , U.S.A.}
\else		%%% NEW STYLE
\vspace*{2ex}   % Corrected style FO
\altaffilmark{1}\affil{
    Canadian Astronomy Data Centre, Herzberg Institute of Astrophysics, 
    National Research Council Canada, Victoria, Canada}
\altaffilmark{2}\affil{
   Space Telescope - European Coordination Facility, ESA, Garching
   bei Muenchen, Germany}
\altaffilmark{3}\affil{
   pace Telescope Science Institute, 3700 San Martin Drive, Baltimore, 
   MD 21218, U.S.A.}
\altaffilmark{4}\affil{
   Dept. of Physics \& Astronomy, Michigan State University, East Lansing, 
   MI 48824-1116. , U.S.A.}
\fi

%-----------------------------------------------------------------------
%			 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.

\contact{Daniel Durand}
\email{daniel.durand@nrc.ca}

%-----------------------------------------------------------------------
%		      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.  

\paindex{Durand, D.}
\aindex{Micol, A.}
\aindex{Schade, D.}
\aindex{Simard, L.}
\aindex{Corbin, M.}
\aindex{Hook, R.}
\aindex{Koekemoer, A.}
\aindex{Donahue, M.}

%-----------------------------------------------------------------------
%                     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{Durand et al.}

%-----------------------------------------------------------------------
%			Subject Index keywords
%-----------------------------------------------------------------------
% Enter 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 ADASS
% proceedings (http://iraf.noao.edu/ADASS/adass.html). 

\keywords{HST, WFPC2, pipelines, processing, Virtual Observatory}

%-----------------------------------------------------------------------
%			       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
After releasing the first version of the new HST WFPC2 associations
in November 2002, the CADC, ST-ECF and STScI are jointly releasing
Version 2. This presentation will discuss the software pipeline
steps that were put in place to construct these associations, and the quality tests we will perform on them. Our goals are the following: Firstly, to make available higher quality products for scientists using the HST archives. Secondly, to translate all the necessary parameters used for the processing into
a data model for inclusion in the Virtual Observatory. We will then
present the different products which are accessible to the potential
user. 

\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. 

%\vspace*{-15ex}
\section{History and definitions of associations}

The WFPC2 associations concept was started back in February 1998 by an ST-ECF based team (Micol et al., 1998). Their goals at the time was
trying to combine images originating from very similar pointings in order to minimize the number of cosmic ray hits on the
final image. Since that time, multiple enhancements to the basic algorithm were brought up by CADC and ST-ECF, working 
jointly on this problem. The first joined releases occurred in November 2001 and then in November 2002 (Micol et al., 2000). At present, the team is working toward
a final release which, with the help of another team based at STScI, should generate very high quality products ready for ingestion
into the Virtual Observatory. 
%%%%%%%%%%%%%% MOVED text (FO)
%The actual release is available at 
%\setcounter{footnote}{4}
%\htmladdnormallinkfoot{CADC}{http://cadcwww.hia.nrc.ca/wfpc2/}, 
%\htmladdnormallinkfoot{ST-ECF}{http://archive.eso.org/archive/hst/wfpc2_asn/3sites/}
%and \htmladdnormallinkfoot{STScI}{http://archive.stsci.edu/hst/wfpc2/}.

The current (released) associations are defined following these simple rules:
\iffalse  %%%% Takes too much space -- let it as a text
\begin{enumerate}
\item An association includes observations grouped by filter and observing program.
\item These observations occupied the same position on the sky (within 100 Wide Field Camera pixels, or 10 arc seconds).
\item Finally, the observations were obtained with the spacecraft at the same roll angle within 5 arc seconds (in order to avoid rotation of images when stacked).
\end{enumerate}
\else  %%%% Other wau
{\em(1)} an association includes observations grouped by filter and observing 
    program;
{\em(2)} these observations occupied the same position on the sky 
    (within 100 Wide Field Camera pixels, or 10 arc seconds);
{\em(3)} finally, the observations were obtained with the spacecraft at the same
    roll angle within 5 arc seconds (in order to avoid rotation of images 
    when stacked).
\fi

\noindent %%%%%%%%%%%%%% MOVED text (FO) here ------------------------
The actual release is available at 
\setcounter{footnote}{4}
\htmladdnormallinkfoot{CADC}{http://cadcwww.hia.nrc.ca/wfpc2/}, 
\htmladdnormallinkfoot{ST-ECF}{http://archive.eso.org/archive/hst/wfpc2_asn/3sites/}
and \htmladdnormallinkfoot{STScI}{http://archive.stsci.edu/hst/wfpc2/}.

\section{Goals}

% We reset the footnote counter for the hyperlink since it does not
% appear to recognize the previous 3 footnotes generated from the
% altaffilmarks.  The command \htmladdnormallinkfoot puts the link as a
% footnote in the printed paper.  The command \htmladdnormallink with
% the same arguments will ignore the link in the printed copy.
In order to produce reliable high quality products for the final release of the WFPC2 associations, 
we put together the following requirements:
\begin{enumerate}
\item The associations will facilitate archive browsing.
\item They should be ready for science usage, i.e. the should be well calibrated photometrically and astrometrically.
\item They should be well described, with their processing history present in their headers.
\item They should be as deep as possible, given the fact that all the pipelines are running unattended.
\item Proper error propagation should be implemented
\item Weight maps should be available.
\item Powerful  processing facilities required (21,000 stacks $\times$ 30 minutes each).
\item Enhanced metadata for data mining should be available for each data products (see below).	%%% FO later replaced below
\end{enumerate}


% In this section, we see the use of the \subsection command to set off
% an independent subsection.  We only have one here; usually there would
% be several.
%
% We show the use of several of the displayed math environments
% described in the User Guide, and you get a healthy dose of
% mathematical typesetting examples.  Also, observe the use of the LaTeX
% \label command after the \subsection to give a symbolic tag to the
% subsection for cross-referencing in a \ref command.  LaTeX
% automatically numbers the sections, equations, tables, etc. as it
% goes, so in general you don't know what number something is going to
% have.  We'll refer to the ``hairymath" section a little later.

\section{The WFPC2 association pipeline}

\subsection{Association discovery}
	The very first step of our WFPC2 pipeline is to run a discovery agent to identify and classify the associations.
	This somewhat complex process looks into the HST observing log and, according to the specified 
	association rules, group together individual observations.
	This process runs every week automatically. Sometimes some
	associations got destroyed while more are created, depending
	on the availability of new or otherwise re-archived
	observations. The ``center" of an association is defined as
	the deepest exposure of the group. Of course this process
	is running only on public datasets.
\subsection{Shift Finding}
	Next, we need to find the relative shift between every observations part of a given association. This process is quite CPU intensive and consists in:
	\begin{enumerate}
	\item{Masking the strongest cosmic rays using a {\it Sextractor} based algorithm}
	\item{Running a 2-D cross-correlation and find the maximum and its error of the resulting array}
	\item{Comparing the different shifts finding method (WCS, Jitter info and 2-D cross-correlation) and store the best ones}
	\end{enumerate}
\subsection{Association Products}
Once the shift values are available, we then run the following steps to create the final products:
\begin{enumerate}
\item{On each observation, we run OTFR, the calibration pipeline using latest software and
	calibration files (including warm-pixel correction)}
\item{Then we shift the images using standard {\it IRAF } tasks}
\item{Once all images have been registered to the master image, we stacked them using Stetson's artificial skepticism algorithm (Stetson, 1989)}
\item{For the astrometric correction we search for matching objects between the image and the USNOB2 catalogue. From the matched list, we compute a linear shift in RA and DEC and apply it to the product.}
\item{Then we augment each product image with relevant information about the processing history like the version of each modules and packages used and other important processing parameters, like the number of stars identified for the astrometric correction.}
\item{Finally, the different products are ingested within the CADC storage system which is accessible through a special procedure from ST-ECF and STScI). At this point in time, the association is accessible through all partner web site.}
\end{enumerate}

% In these sections, we see some additional math-related markup, and we
% have references to one of the tables (occurs later in the document)
% and the "hairymath" section immediately preceding this one.
%
% In the second paragraph, note the use of in-text math ($stuff$) including
% a couple of the miscellaneous symbol commands defined in the macro package.
%
% This is the last section of the paper, so there is an \acknowledgments
% section at the end of the main body.

\section{Quality assessment}

Quality assessment of the WFPC2 associations is an important but
difficult part of the project.  For these images to be useful for
research, they must be verified to be photometrically and astrometrically
accurate. For the first release of the WFPC2 associations, we limited
our tests to only a few hundred images. The results of these tests
are presented on the joint CADC / ST-ECF / MAST web interface. We
will perform these and additional tests for the second release:
\subsection{Photometry test}
\begin{enumerate}
\item{ Comparison between instrumental magnitude between final stack and individual exposures}.
\item{ Comparaison with already published material}.
\end{enumerate}
\subsection{Astrometry test}
Automated astrometry tests are not possible. When the astrometric correction is performed within the pipeline, a measure of the correction accuracy as well as the number and the list of known stars is available within the header
of each product. Since the internal precision of the USNO2 stars
is not sufficient to provide the perfect solution for a given WFPC
stack, trying to estimate each solution more accurately is impossible.
From our first release, we estimated that the astrometric correction
error was essentially equivalent to the internal error of the USNO
catalogue after examining a subset of images with known USNO2 stars.
We will perform the same test on the second version.
%
% Note for Daniel:
% Do we store such overall accuracy (basically the USNO one) in the header ?
%
\subsection{MultiDrizzle}
Another test which we will perform on the second version of the
products will involve comparing them with versions produced using
the new STSDAS task multidrizzle (Koekemoer et al., this conference).  
In principle, the images produced
by multidrizzle and the associations pipeline should be equivalent,
and thus difference would indicate flaws in either the multidrizzle
or associations pipeline software.  A set of multidrizzled images
has already been produced by MAST, and is awaiting comparison with
the corresponding images produced in the second release.
\section{Virtual Observatory publication}
For the WFPC2 associations extra steps are actually running at CADC
to allow us to publish the products within the Canadian Virtual
Observatory (CVO). Similar steps are being taken within our
collaborating institutions. In addition of publishing the product
itself (space, time and wavelength parameters) in the CVO, we are running other steps to augment the information on those
products:
{\em(1)} an image characterisation software measures %measuring 
  some basic statistical 
  parameters like total flux and ratio of extended objects over point sources;
{\em(2)}%FO a measure of the position and the flux of each sources on the image.
   the position and the flux of each source are measured on the image.

%%This paragraph has been placed here so that we can show the
%%relationship between floating elements and running text.  A sample
%%figure appears in Figure~\ref{P2-29:T1.10-fig-1}.
%%\begin{figure}
%%\epsscale{.80}
%%\plotone{figure.eps}
%%\caption{A particularly ghostly figure.} \label{P2-29:T1.10-fig-1}
%%\end{figure}
%%We insert the figure in the text file immediately after the sentence
%%in which it is called out; this happens to be in the middle of a
%%paragraph.  Notice that this paragraph continues on after the {\tt
%%figure} environment is closed.  The typeset text of the paragraph will
%%not be broken by the figure; rather, the figure will be ``floated'' to
%%an appropriate spot (top of page, bottom of page, possibly after the
%%paragraph) close to the textual material in which it is embedded in
%%the source file.
 
% The same tabular data presented above in the deluxetable environment is
% aligned below within the "tabular" environment. Observe
% that our tabular environment is embedded within a "center" environment,
% which is in turn inside a "table" environment.
%
% We need the table environment for autonumbering and caption generation,
% which is why it is not enough to have a centered tabular.
%
% Within the tabular environment, please note that we use no vertical
% rules, and the horizontal rules are inserted with \tableline (*not* \hline).
% Note that a couple of the column headings require special annotation, i.e.,
% footnotes for tables.  They are marked and tagged with \tablenotemark.
% \tablenotemarks could be placed on individual data entries as well,
% but try not to go berserk doing this.
%
% It is necessary to \label tables and figures *after* the \caption has been
% specified because the table/figure number is generated by \caption, not
% by \begin{whatever}.

% Text for table footnotes must follow the tabular environment but must
% be inside the table environment.  Note that it is OK to put \ref's
% in \tablenotetext's.

\section{Conclusions}
The second release of the WFPC2 Associations will be made available to the public soon
by CADC, ST-ECF and STScI. Richer metadata will be available for
deeper and better calibrated products for WFPC2.
Better uniformity will ensure better usage and inclusion within a
Virtual Observatory in spite of the pointing mode nature of these
products.
The working group is applying a similar technique for creating ACS
associations (Hook et al., 2004)

% Finally, we have a little acknowledgments section.

%\acknowledgments

%%We are grateful to V. Barger, T. Han, and R. J. N. Phillips for doing
%%the math in section \ref{P2-29:hairymath} of this paper.

% That's the end of the main body of the paper.  Now we will have some
% back matter.
%
%-----------------------------------------------------------------------
%			      References
%-----------------------------------------------------------------------
% Now comes the reference list.  Since we typed out the citations ourselves,
% the reference list is enclosed in a "references" environment.  Each
% new reference begins with a \reference command which sets up the proper
% indentation.  Typography that may be required in the reference list by
% the editorial staff must be included by the author.
%
% Observe the "standard" order for bibliographic material: author name(s),
% publication year, journal name, volume, and page number for articles.
% Some journal names are available as macros; see the package
% instructions for a listing of which ones have been "macro-ized".
%
% There is no need to engage in any other typographic manipulation.
%
% 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 for a listing "macro-ized" journals.   
%
% Note the following are some of the tricks that can be used:
%
%   o  \& is used to format an ampersand symbol (&).
%   o  \'e and \`e puts an accent agu and accent grave, respectively,
%      over the letter e.  See the User Guide 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  \adassviii is a macro that expands to the full title, editor,
%      and publishing information for the ADASS VIII conference
%      proceedings.  Such macros are defined for ADASS conferences I
%      through X.
%   o  When referencing a paper in the current volume, use the
%      \adassviii 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 Hook, R., et al. 2004, \adassxiii, \paperref{P1-15}
\reference Micol, A., Pirenne, B., Bristow, P. 1998, \adassvii, 349
\reference Micol, A., et al. 2000, \adassix, 223
\reference Stetson, P. 1989, ``V Advanced School of Astrophysics", Universidade de Sao Paulo, p. 1

%
%\reference Auri\`ere, M.\  1995, \adassiv, 109
%\reference Canizares, C.\ R., Grindlay, J.\ E., Hiltner, W.\ A., Liller, W., \&
    %McClintock, J.\ E.\  1978, \apj, 224, 39
%\reference Djorgovski, S., \& King, I.\ R.\  1984, \apjlett, 277, L49
%\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 King, I.\ R., Hedemann, E., Hodge, S\ M., \& White, R.\ E.
    %1968, \aj, 73, 456
%\reference Kron, G.\ E., Hewitt, A.\ V., \& Wasserman, L.\ H.\
    %1984, \pasp, 96, 198
%\reference Lynden-Bell, D., \& Wood, R.\  1968, \mnras, 138, 495
%\reference Newell, E.\ B., \& O'Neil, E.\ J.\  1978, \apjsupp, 37, 27
%\reference Ortolani, S., Rosino, L., \& Sandage, A.\  1985, \aj, 90, 473
%\reference Peterson, C.\ J.\  1976, \aj, 81, 617
%\reference Roberts, D.\ A.\ 2003, \adassxii, \paperref{P1.3}
%\reference Spitzer, L.\  1985, in Dynamics of Star Clusters,
    %ed.~J.~Goodman \& P.~Hut (Dordrecht: Reidel), 109
\end{references}

% Do not place any material after the references section

\end{document}  % Leave intact

