%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{O7-3}
%%%% ID=O7-3

%-----------------------------------------------------------------------
%		            Paper Title 
%-----------------------------------------------------------------------
% Enter the title of the paper.
%
% EXAMPLE: \title{Montage: A Grid Enabled Image Mosaic Service for the National Virtual Observatory}
%
% 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{Montage: A Grid Enabled Image Mosaic Service for the National Virtual Observatory}
\titlemark{Montage: A Grid Enabled Image Mosaic Service}

%-----------------------------------------------------------------------
%		          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{G.\ B. \ Berriman, J. \ C.\ Good, A. \ C. \ Laity}
\affil{Infrared Processing and Analysis Center, California Institute Of Technology, Pasadena, CA 91125} 

\author{A. \ Bergou, J. \ Jacob, D. \ S.\  Katz }
\affil{Jet Propulsion Laboratory, California Institute Of Technology, Pasadena, CA 91109}

\author{E. \ Deelman, C. \ Kesselman, G. \ Singh, M$-$H. \ Su}
\affil {USC Information Sciences Institute, Marina del Rey, CA 90292}

\author{R. \ Williams}
\affil{Center for Advanced Computing Research, California Institute Of Technology, Pasadena, CA 91125} 

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

%\altaffiltext{1}{Visiting Astronomer, Cerro Tololo Inter-American Observatory. 
%CTIO is operated by AURA, Inc.\ under cooperative agreement with the National
%Science Foundation} 
%\altaffiltext{2}{Society of Fellows, Harvard University} 
%\altaffiltext{3}{Patron, Alonso's Bar and Grill}

%-----------------------------------------------------------------------
%			 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{Bruce Berriman}
\email{gbb@ipac.caltech.edu}

%-----------------------------------------------------------------------
%		      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{Berriman, G. B.}
\aindex{Good, J. C.}
\aindex{Laity, A. C.}
\aindex{Bergou, A.}
\aindex{Jacob, J.}
\aindex{Katz, D. S.}
\aindex{Deelman, E.}
\aindex{Kesselman, C.}
\aindex{Singh, G.}
\aindex{Su, M.-H.}
\aindex{Williams, R.}
%-----------------------------------------------------------------------
%                     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{Berriman 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{image: processing, image: mosaicking, Grid: computing, 2MASS} 

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

The architecture of Montage, which delivers custom science-grade astronomical images, was presented at ADASS XII. That architecture has been tested on
2MASS images computed on single processor Linux machines that hold all image data in memory. This year, we describe the design of a grid-enabled version of
Montage, suitable for large scale processing of the sky. It exploits to the maximum the parallelization inherent in the Montage architecture, whereby image
reprojections are performed in parallel. All the re-projection jobs can be added to a pool of tasks and performed by as many processors as are available. We show
how we can describe the Montage application in terms of an abstract workflow so that a planning tool such as Pegasus can derive an executable workflow that can
be run in the Grid environment. The execution of the workflow is performed by the workflow manager DAGMan and the associated Condor-G. The grid processing
will support tiling of images to a manageable size when the input images can no longer be held in memory. When fully tested, Montage will ultimately run operationally
on the Teragrid. We will present processing metrics and describe how Montage is being used, including its application to science product generation by SIRTF
Legacy Program teams and large-scale image processing projects such as Atlasmaker (this conference). 


\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{What Is Montage?}
Montage has the broad goals of providing astronomers with software for the 
computation of custom, science grade image mosaics in FITS format.  
Custom refers to user specification of the parameters describing the mosaic: 
WCS projection, coordinate system, mosaic size, image rotation and spatial sampling. Science grade 
mosaics preserve the calibration and astrometric fidelity of the input images (Berriman et al. 2003). 

Production of an image mosaic consists of four steps:
\begin{enumerate}
\item Re-projection of input images to a common spatial scale, 
coordinate system and World Coordinate System (WCS) projection
\item Modeling of background radiation in images to achieve common flux scales and background levels (by minimizing 
the inter-image differences)
\item Rectification of images to a common flux scale and background level and
\item Co-addition of re-projected, 
background-corrected images into a final mosaic. 
\end{enumerate}

\noindent	%% FO
Montage accomplishes these steps in independent modules, written in ANSI C for portability. This "toolkit" 
approach controls testing and maintenance costs and provides considerable flexibility to end users.
They can, for example,
use Montage simply to reproject sets of images and coregister them on the sky, or implement a custom background 
removal algorithm without impact on the other steps,  or define a specific processing 
flow through custom scripts. 

\section{Distribution of the Montage Code}

Version 1.7.1 of Montage is available for download at the project web site at 
\htmladdURL{http://montage.ipac.caltech.edu}.The distribution consists of 20 modules containing 
7560 lines of code, on which have been run 2595 test cases 
that exposed 119 defects. It includes a complete User Guide. 
This release emphasizes accuracy in photometry and astrometry over performance, and 
supports serial processing only. Montage has been built and used on many platforms 
(\htmladdURL{http://montage.ipac.caltech.edu/docs/platforms.html}), but has been formally tested 
on Linux Red Hat 8.0  (Kernel release 2.4.18-14) running on 32-bit Intel processors. The tests 
involved building mosaics of 2MASS 2nd Incremental Release Full Resolution input images in
10 WCS projections; the mosaics were up to 2 x 2 degrees on a side, and output in 
Equatorial J2000, Galactic and Ecliptic coordinates. 

\section{Applications of Montage}

Another paper in this volume (Williams et al. 2003) describes how Montage underpins Atlasmaker,
which aims to deliver a multi-wavelength, science grade image atlas of the sky.
Two of the SIRTF Legacy Program teams, GLIMPSE and SWIRE, are actively using Montage. Apart from its obvious role 
in generating science image products, Montage is also supporting data 
simulation and quality assurance. GLIMPSE will generate an infrared atlas of the galactic plane, 
and to support quality assurance of this atlas, GLIMPSE has used Montage as an engine to 
co-register 2MASS images in the J, H and  K bands and MSX images at 8 $\mu$m.  SWIRE will perform 
a wide area imaging survey of high galactic latitude fields to study
the evolution of  stellar populations up to z=3, and has co-registered SIRTF Infrared Array Camera synthetic images and 
2MASS images to support observation planning and pipeline testing.
In support of their Cool Cosmos project(\htmladdURL{http://coolcosmos.ipac.caltech.edu}), the IPAC Education and Public
Outreach team is using Photoshop to combine single color 
mosaics made by Montage into spectacular multi-color images of regions of the sky covering spatial extents of several
square degrees and more. A striking 
example is a three-color 2MASS mosaic of Rho Ophiuchus and the Galactic Center. 

\section{Montage: The Grid Years}

Montage's capability of supporting any WCS projection and preserving the calibration and astrometric fidelity of the 
imput images comes with a substantial computational burden. For example, reprojecting and resampling a single 2MASS 
image (1024 x 512 pixels; 2 MB in size) requires 100 seconds of processing time on a 1.4 GHz Linux box. This 
computational burden is a consequence of the accuracy and generality in the algorithm used to perform the reprojection. This algorithm
uses classical 
spherical trigonometry to compute the overlap between the input and output (reprojected) images. The redistribution
of flux from the input pixels to the output pixels consumes the bulk of the processing time; as a very good rule of thumb,
the redistribution of flux in the reprojection of 2MASS images took up over 90\% of the processing time in our test program.

We will investigate ways to speed-up the processing, but a simple way of providing speed-up is to run Montage on 
parallel processing environments, now relatively inexpensive.  Many parts of the Montage processing can be run in parallel.  Reprojection of input images can obviously be run on as many processors as are available, but many of the background 
removal can be run in parallel too. Fitting planes to the overlap between pairs of images can be performed in parallel 
as soon as the reprojection has been completed. Calculation of the parameters of of the best-fit background model requires that all the 
fitting has been completed, but subsequent application of the model to the individual images can be done in parallel.

We have been developing a parallel processing architecture for Montage that takes advantage of the parallelization
just described and uses the processing modules already tested and delivered. There are two broad aims to this work:

\begin{enumerate}
\item Take advantage of the modular design to develop grid-enabled software that will run on any parallel processing 
environment,  such as an array of processors, or a grid of clusters; such software provides maximal flexibility
to end users wishing to build large scale mosaics on local machines
\item Deliver a distributed image mosaic service that runs on the Teragrid (see \htmladdURL{www.teragrid.org}); users 
order mosaics through a web form and receive e-mail notification when the mosaic is ready for pick-up. When complete, 
this service will take advantage of emerging protocols proposed by the NVO for discovering image data and making them 
accessible to Teragrid processors.
\end{enumerate}

\noindent	%% FO
The first goal is met through a script that is built by Montage at run time. For a particular job, this script describes the flow of 
data and processing, specifies which data 
are needed where, and which processes are to be run and when. This script, a directed acyclical graph (DAG),  
must be built at run time because the overlaps 
between the input images, requisite to the background removal, depend on their footprints on the 
sky, and therefore cannot be defined in advance of the processing. This DAG is what is submitted 
to standard tools for execution on available processors.

The second goal is met through a ``DAG building script".  It is part of a prototype
architecture that has successfully run Montage on the 64-bit Linux Teragrid clusters at SDSC, NCSA, PSC,
ANL,  and CACR,  and on the 
32-bit processors of the USC-ISI/Wisconsin Grid. 

A web service located at JPL creates an abstract workflow description of a mosaic request made to Montage 
by calling the DAG-building 
script. This workflow description, written in XML, is submitted to Pegasus (Planning for Execution in Grids), developed at ISI as part of the 
GriPhyN project. 
It interprets the ``abstract
workflow" to produce a 
``concrete workflow", which specifies the location of the data and the execution platforms. The concrete
workflow is optimized by Pegasus to take advantage of previous processing runs, through the concept of Virtual Data. If Pegasus finds that data products described within the abstract workflow are already available
(via queries to the Globus Replica Location Service), it reuses them and thus 
reduces the complexity of the concrete workflow. Pegasus also adds transfer nodes in the concrete DAG for staging the input image files
 and transferring  out the generated mosaic. 
When the concrete workflow has been prepared, Pegasus submits it
to Condor's DAGMan for execution. 

Thus far, we have performed test runs to build 2MASS mosaics of the M42 region (Orion Nebula) that are 1.5 degrees
on a side. One run on a single pool at SDSC consisted of 951 jobs, including 117 data transfer jobs, 
to process 113 input image files, 
and ran to completion in 94 minutes.   

\acknowledgments

Montage is funded by NASA's Earth Science Technology Office, Computational Technnologies Project, 
under Cooperative Agreement Number NCC5-626 between NASA and the California Institute of Technology.


% 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 Berriman, G. B. \ et al., \ 2003, \adassxii, \adassref{xii:O6-3}{343}
\reference Williams, R. \ et al., \ 2004, \adassxiii, \paperref{O4-3b}

\end{references}

% Do not place any material after the references section

\end{document}  % Leave intact
