Montage: An Astronomical Image Mosaic Service for the NVO

Download Report

Transcript Montage: An Astronomical Image Mosaic Service for the NVO

Montage: An Astronomical
Image Mosaic Service for the NVO
Anastasia C. Laity, IPAC
Nate Anagnostou, IPAC
Bruce Berriman, IPAC
John Good, IPAC
Joseph C. Jacob, JPL
Daniel S. Katz, JPL
Thomas Prince, CIT
http://montage.ipac.caltech.edu
Focus Session
• Introduction
– Montage Availability
– New Features
• Walk-through: 3-color 2MASS/MSX
mosaic
• Montage science applications: SWIRE
case study
• Questions and Discussion
http://montage.ipac.caltech.edu
Intro to Montage
• Software toolkit to generate astronomical
image mosaics
• User specifies size, rotation, WCScompliant projection and coordinate
system
• Background modeling and rectification
capabilities
• Portable and highly parallelizable to run in
multi-processor or grid environments
http://montage.ipac.caltech.edu
Montage Availability
• Download from
http://montage.ipac.caltech.edu
• Full user guide on website, including
detailed API
• Easy installation: includes copies of
required libraries, so a single “make”
command builds all of Montage.
http://montage.ipac.caltech.edu
Features of v2.2
• Improvements to computational algorithms:
– Fast reprojection between tangent-plane projections
– Coaddition of arbitrarily large files
• Creation of mosaics on computational grids or
clusters. Supports two instances of parallel
computing technology:
– Message Passing Interface (MPI)
– Planning for Execution in Grids (Pegasus)
http://montage.ipac.caltech.edu
2MASS/MSX Mosaic
2MASS: 170 images, SIN projection
MSX A-band: 1 image (retrieved from IRSA’s
MSX server), CAR projection
l=345.2, b=1.24
2.4 square degrees
http://montage.ipac.caltech.edu
l=345.2, b=1.24
2.4 square degrees
Red:
MSX A (8.28 m)
Green:
2MASS K (2.17 m)
Blue:
2MASS J (1.25 m)
http://montage.ipac.caltech.edu
Fast Reprojection
• mProjectPP: Fast reprojection between tangentplane projections (i.e., SIN to SIN, SIN to TAN)
• Based on Mopex algorithm (in collaboration with
Spitzer Science Center)
• Uses plane-to-plane solutions instead of
projecting input/output to celestial sphere and
calculating overlap on sky
• Roughly 20x speed-up for 2MASS Atlas images
• Only applicable to tangent-plane projections,
however…
http://montage.ipac.caltech.edu
TAN Header Simulation
• Many other projections can be approximated by
a TAN header with distortion parameters
• mTANHdr analyzes a FITS header (in any
projection) and determines if there is an
equivalent, distorted-TAN projection within a
specified tolerance
• Outputs a distorted-TAN header template for use
with mProjectPP to speed up non-TAN
transformations
http://montage.ipac.caltech.edu
Mosaic Workflow
• Create tables of image metadata (WCS,
FITS geometry) for Montage modules to
read:
>mImgtbl raw_K raw_K.tbl
[struct stat="OK", count=170, failed=0,
nooverlap=0]
>mImgtbl raw_J raw_J.tbl
[struct stat="OK", count=170, failed=0,
nooverlap=0]
>mImgtbl raw_MSX raw_MSX.tbl
[struct stat="OK", count=1, failed=0, nooverlap=0]
• Make header template to fit 2MASS
images completely:
>mMakeHdr raw_K.tbl template.hdr
[struct stat="OK", count=170, clon=254.587292, clat=-40.251753,
lonsize=2.353611, latsize=2.450000, posang=359.891421, lon1=256.154189, lat1=41.468162, lon2=253.014309, lat2=-41.463621, lon3=253.076184, lat3=-39.014964,
lon4=256.104469, lat4=-39.019343]
http://montage.ipac.caltech.edu
Mosaic Workflow
• Create distorted-TAN header for MSX
data:
>mGetHdr raw_MSX/msx_4deg.fits msx.hdr
[struct stat="OK", ncard=23]
>mTANHdr -c eq msx.hdr msxtan.hdr
[struct stat="OK", fwdxerr=0.00351429, fwdyerr=0.00546297, fwditer=51,
revxerr=0.00335636, revyerr=0.0382581, reviter=9]
Original Header (msx.hdr):
CRVAL1
CTYPE1
CRVAL2
CTYPE2
CROTA2
=
345.199402
= 'GLON-CAR'
=
1.24101007
= 'GLAT-CAR'
=
0.000000000
Alternate Header (msxtan.hdr):
CTYPE1
CTYPE2
CRVAL1
CRVAL2
A_ORDER
A_0_0
A_0_1
A_0_2
A_0_3
A_1_0
A_1_1
A_1_2
A_1_3
A_2_0
A_2_1
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
'RA---TAN-SIP'
'DEC--TAN-SIP'
254.9200850763
-40.4340776489
3
-6.700e-05
7.696e-11
-1.725e-15
-7.897e-20
-1.319e-07
-2.746e-14
-8.749e-19
-1.804e-17
-4.473e-11
-1.076e-19
http://montage.ipac.caltech.edu
Mosaic Workflow
• Reproject 2MASS images:
>mProjExec -f -p raw_K raw_K.tbl template.hdr proj_K stats_K.tbl
[struct stat="OK", count=170, failed=0, nooverlap=0]
>mProjExec -f -p raw_J raw_J.tbl template.hdr proj_J stats_J.tbl
[struct stat="OK", count=170, failed=0, nooverlap=0]
• Reproject MSX image:
>mProjectPP -i msxtan.hdr raw_MSX/msx_4deg.fits final_MSX.fits template.hdr
[struct stat="OK", time=6082]
• New metadata tables (new geometry postreprojection):
>mImgtbl proj_K proj_K.tbl
[struct stat="OK", count=170, badfits=0]
>mImgtbl proj_J proj_J.tbl
[struct stat="OK", count=170, badfits=0]
>mImgtbl proj_MSX proj_MSX.tbl
[struct stat="OK", count=0, badfits=0]
http://montage.ipac.caltech.edu
Mosaic Workflow
• Background rectification
Before background rectification:
1. Which files overlap each other?
>mOverlaps proj_K.tbl diff_K.tbl
[struct stat="OK", count=454]
2. Create “difference” images of overlap regions:
>mDiffExec -p proj_K diff_K.tbl template.hdr diff_K
[struct stat="OK", count=454, failed=0]
3. Fit planes to difference images:
>mFitExec diff_K.tbl fits_K.tbl diff_K
[struct stat="OK", count=454, failed=0, warning=0,
missing=0]
After background rectification:
4. Calculate plane to be removed from each image:
>mBgModel proj_K.tbl fits_K.tbl corrections_K.tbl
[struct stat="OK"]
5. Subtract planar backgrounds from images:
>mBgExec -p proj_K proj_K.tbl corrections_K.tbl corr_K
[struct stat="OK", count=170, nocorrection=0, failed=0]
http://montage.ipac.caltech.edu
Mosaic Workflow
• Coaddition of final 2MASS mosaics
>mAdd -e -p corr_K
[struct stat="OK",
>mAdd -e -p corr_J
[struct stat="OK",
J Band
proj_K.tbl template.hdr final_K.fits
time=144]
proj_J.tbl template.hdr final_J.fits
time=144]
K Band
http://montage.ipac.caltech.edu
Mosaic Workflow
• Crop out edges
>mSubimage -p final_K.fits final_K_crop.fits 420 882 7633 7497
[struct stat=“OK”]
>mSubimage -p final_J.fits final_J_crop.fits 420 882 7633 7497
[struct stat=“OK”]
>mSubimage -p final_MSX.fits final_MSX_crop.fits 420 882 7633
7497
[struct stat=“OK”]
• Subsample to manageable size for
presentation
>mShrink final_K_crop.fits final_K_crop_8.fits 8
[struct stat=“OK”]
>mShrink final_K_crop.fits final_K_crop_8.fits 8
[struct stat=“OK”]
>mShrink final_K_crop.fits final_K_crop_8.fits 8
[struct stat=“OK”]
http://montage.ipac.caltech.edu
Final mosaics
J
K
MSX
http://montage.ipac.caltech.edu
3-Color JPEG
• mJPEG: command-line JPG generator
>mJPEG -red final_MSX_crop_4.fits 0% 99.95% 2 \
-green final_K_crop_4.fits 0% 99.3% 2 \
-blue final_J_crop_4.fits 0% 99.4% 2 \
-out jpeg/r99.95_g99.3_b99.4_crop_4.jpg
[struct stat=“OK”]
• Can find starting-point ranges using Oasis
• Tweak color stretch until….
http://montage.ipac.caltech.edu
http://montage.ipac.caltech.edu
Case Study: SWIRE
• Spitzer Wide-area InfraRed Extragalactic Survey
(SWIRE)
• Discovery of new galaxies with redshift z~3
• Supporting observations using ground- and
space-based telescopes
• Different telescopes and image parameters
(rotation, projection, pixel scales)
• Data for slides provided by SWIRE team;
mosaicking by Anastasia Alexov and John Good
http://montage.ipac.caltech.edu
SWIRE Tiling Scheme
•
•
Common tiling scheme based on Spitzer pipeline-processed, mosaicked
data
Need ancillary data transformed to same tiling scheme and image
parameters as Spitzer data
– Trivial to overlay data
– Basis for multi-wavelength source extraction
Elais N1 Field:
Backdrop: ISSA
Large yellow box: outline of Spitzer data
Large green box: optical data coverage area
Other footprints: various ancillary data
Raw optical stats:
•La Palma observatory, 2.5m Isaac Newton telescope
•270 images [6229 x 6203 pix], ~0.00009 arcsec/pixel
•Images covered 15 of these 17 Spitzer tiles
•5 optical bands (g,i,r,u,z) [54 images per band]
•15 tiles x 5 bands = 75 mosaics (results)
•1 to 14 optical images covering any given tile
Mosaicking:
Input: TAN-TAN projection at 1 degree rotation
Output: TAN-TAN projection at 315 degree rotation
http://montage.ipac.caltech.edu
SWIRE Mosaic Processing
• Optical FITS files are
already a mosaic of 4
CCDs, reduced by
observer
• For Montage, treat like
4 separate images
• mProjectPP can use
sections as input
http://montage.ipac.caltech.edu
SWIRE Workflow
• mProjectPP: project each slice of each
image
• mFlattenExec: bring all images to the
same base flux level
• mAdd: create mosaic of all the slices
• mShrink: create version of mosaic 10
times smaller as browse product
http://montage.ipac.caltech.edu
Resulting Mosaic
• Final products:
mosaic of
optical data
corresponding
to each tile
• Pictured:
i-band, tile 2_3,
shrunk by factor
of 100
http://montage.ipac.caltech.edu
3-Color Mosaic
• 3-color mosaic of
tile 2_3
• Common tiling
scheme allows
overlays
• Spitzer IRAC
channel 1 (3.6 um)
is green; Spitzer
IRAC channel 2
(4.5 um) is red; iband optical data
is blue
http://montage.ipac.caltech.edu
Full-Resolution
• Can see all the high
redshift non-stellar
objects
http://montage.ipac.caltech.edu
Q&A / Discussion
http://montage.ipac.caltech.edu
Parallelization
http://montage.ipac.caltech.edu
Pegasus
Implementation
•
Pegasus
– Developed at Information Sciences Institute
(ISI), USC
– Transforms “abstract workflows” into
“concrete workflows” to be executed on a
computational grid (Condor-G)
– http://pegasus.isi.edu
• Running Pegasus version of Montage requires
some additional Montage modules (available
on request)
http://montage.ipac.caltech.edu
MPI Implementation
•
Writing code in MPI:
–
Author is responsible for figuring out the details of communication
using one-to-one and all-to-all communications
•
Examples:
1.
2.
3.
–
Send 10 floats from array val to processor 1 (with tag 0)
Receive 10 floats from any processor (with any tag) and store them in array in
Globally sum of all processors’ version of floating point variable x; store result in
all processors’ version of variable gx
MPI is the standard that defines a specification for message passing
•
Examples:
1. ReturnCode = MPI_Send(val, 10, MPI_FLOAT, 1 , 0,
MPI_COMM_WORLD)
2. ReturnCode = MPI_Recv(in, 10, MPI_FLOAT, MPI_ANY_SOURCE,
MPI_ANY_TAG, MPI_COMM_WORLD, &status)
3. ReturnCode = MPI_Allreduce(x, gx, 1, MPI_FLOAT, MPI_SUM,
MPI_COMM_WORLD)
•
MPI versions of parallelizable Montage modules available on
request
http://montage.ipac.caltech.edu
http://montage.ipac.caltech.edu
http://montage.ipac.caltech.edu
http://montage.ipac.caltech.edu