IRSA Image Server
Quick Start Guide
Examples
Overview
The IRSA Image Server provides access to images from some of the large projects archived at IRSA.
While many IRSA Tools are interactive, allowing users to search and download data from a web browser, the IRSA Image Server is accessed through programs. You can use one of two available Application Program Interfaces (APIs) to identify images that match a set of criteria.
API Data Sets
AvailableVO
Compliant?Spatial
Queries?Relational
Queries (SQL)?Output
FormatsFull Image
URLsSimple Image Access (SIA) WISE
2MASSyes yes no XML provided directly in output IRSA Image Server API WISE
2MASS
PTFno yes yes IPAC ASCII
CSV
TSV
HTMLmust be constructed
from outputBoth APIs return output files containing information allowing you to identify the images that match your search criteria. These images can then be downloaded using the common command line tools wget or curl. They are also laid out in browsable directories:
http://irsa.ipac.caltech.edu/ibe/data/
If your data set is not listed here, please see a list of other image APIs available at IRSA.
Quick Start Guide
1. Search image metadata tables by appending a query string to a base URL, the form of which depends both on the API you wish to use and on the data set you are interested in mining:
Simple Image Access
Base URL:IRSA Image Server APIQuery String Parameters:http://irsa.ipac.caltech.edu/ibe/sia/{mission}/{data-set}/{table-name}?
POS, SIZE, INTERSECTExample:
Search for AllWISE coadds that completely contain a search region that is 0.5 degree by 0.2 degrees and centered on ra = 20 degrees, dec = 40 degrees.
curl -o example1.tbl "http://irsa.ipac.caltech.edu/ibe/sia/wise/allwise/p3am_cdd?POS=20,40&SIZE=0.5,0.2&INTERSECT=COVERS"
Base URL:Query String Parameters:http://irsa.ipac.caltech.edu/ibe/search/{mission}/{data-set}/{table-name}?
columns, where, POS, SIZE, INTERSECT, mcenExample:
Query for the coadd_id and band of the AllWISE channel 1 image that is most centered on the coordinate ra = 20 degrees, dec = 40 degrees.
curl -o example2.tbl "http://irsa.ipac.caltech.edu/ibe/search/wise/allwise/p3am_cdd?columns=coadd_id,band&where=band%20IN%20(1)&POS=20,40&INTERSECT=COVERS"
2. Identify Images described in query results.
Both API queries return text files containing information about how to download the imaging data products. The output XML file from an SIA query contains the URLs to the images that match the search criterion, so the output needs to be parsed and the URLs extracted. In contrast, the output file from an IRSA Image Server API query returns the metadata from the images that match the search criterion. In this case, the image paths for the URLs must be constructed from these metadata. The documentation describing how to construct a download URL for a given data set can be found at:3. Specify Cutouts from Identified Images.Example:http://irsa.ipac.caltech.edu/ibe/docs/{mission}/{data-set}/{table-name}
Documentation about the download URLs for AllWISE coadds is described at:http://irsa.ipac.caltech.edu/ibe/docs/wise/allwise/p3am_cdd
Following the instructions on this page, AllWISE image products with coadd_id = 0193p393_ac51 can be found at:http://irsa.ipac.caltech.edu/ibe/data/wise/allwise/p3am_cdd/01/0193/0193p393_ac51/
4. Download full image or cutout using wget or curl.Once you have a full image URL, you have the option to modify it by appending a string specifying the center and size of the desired cutout, as well as an optional flag specifying whether you want the output to be compressed (gzipped).
Example:
Download a cutout with center ra = 19.320314 degrees, dec = 39.406425 degrees, width = 60 arcseconds, and height = 30 arcseconds.
http://irsa.ipac.caltech.edu/ibe/data/wise/allwise/p3am_cdd/01/0193/0193p393_ac51/0193p393_ac51-w1-int-3.fits?center=19.320314,39.406425&size=60,30arcsec&gzip=0
Examples
1. Download all WISE All-Sky Release Level 1b Frames containing (ra, dec) = (20, 40).
2. Download all WISE AllWISE images overlapping a search rectangle centered on (ra, dec) = (20, 40) with width and height of 1.5 degrees.This is a simple query that can be accomplished using the SIA API.
wget "http://irsa.ipac.caltech.edu/ibe/sia/wise/allsky/4band_p1bm_frm?POS=20,40" -O wise_allsky_level1b_ra20dec40.xml
The output (wise_allsky_level1b_ra20dec40.xml), is an XML file containing metadata (including URLs for full images) for 451 WISE AllSky Level 1b frames (intensity, uncertainty, and mask files) that contain the position (ra,dec) = (20,40). This file can be parsed to extract the URLs and download the corresponding images. The command below shows the syntax for doing once such download with an extracted URL.
wget "http://irsa.ipac.caltech.edu/ibe/data/wise/allsky/4band_p1bm_frm/1a/01121a/172/01121a172-w4-int-1b.fits"
3. Return all WISE All-Sky Release Level 1b Frames containing (ra, dec) = (20, 40) in bands W1 and W2.This is a simple query that can be accomplished using the SIA API.
wget "http://irsa.ipac.caltech.edu/ibe/sia/wise/allwise/p3am_cdd?POS=20,40&SIZE=1.5" -O wise_allwise_ra20dec40_size1p5.xml
The output (wise_allwise_ra20dec40_size1p5.xml), is an XML file containing metadata (including URLs for full images) for 67 WISE AllWISE coads (intensity, uncertainty, and coverage files) that overlap the search rectangle. This file can be parsed to extract the URLs and download the corresponding images. The command below shows the syntax for doing once such download with an extracted URL.
curl -O "http://irsa.ipac.caltech.edu/ibe/data/wise/allwise/p3am_cdd/02/0217/0217p408_ac51/0217p408_ac51-w4-int-3.fits"
4. Search for AllWISE images corresponding to a list of positions in example.tbl.This example is similar to Example 1, except that we only want two of the four WISE bands. The SIA protocol is not flexible enough to handle this, but the IRSA Image Server API is.
Follow the links in Step 1 of the Cookbook above to the "columns" link to determine the base URL for your query. In this case, it is:
wget "http://irsa.ipac.caltech.edu/ibe/search/wise/allwise/p3am_cdd?POS=20,40&where=band+in+(1,2)" -O wise_allwise_ra20dec40_bands1and2.tbl
The result is an IPAC Table containing 2 rows, each containing the metadata for a set of data products that satisfies the search criteria. These data products include:
- intensity FITS image
- uncertainty FITS images
- positions of spurious sources from diffraction spikes, optical ghosts, latents, halos
Download URLs must be constructed from these metadata. For this example, the documentation is at:
http://irsa.ipac.caltech.edu/ibe/docs/wise/allwise/p3am_cdd/
The first row of the output IPAC table specifies coadd_id = 0193p393_ac51.
The values of coadd_ra and coaddgrp are just the first four and two characters, respectively, of coadd_id:
coadd_ra = 0193
coaddgrp = 01
The intensity FITS image in band w2 can then be downloaded using the following wget command, where the
--content-disposition
option results in manageable file names, and is available for wget versions 1.11.x or later.wget --content-disposition "http://irsa.ipac.caltech.edu/ibe/data/wise/allwise/p3am_cdd/01/0193/0193p393_ac51/0193p393_ac51-w2-int-3.fits"
curl -o allwise_table_upload.tbl -F INTERSECT=CENTER -F "POS=@example.tbl" "http://irsa.ipac.caltech.edu/ibe/search/wise/allwise/p3am_cdd"
The metadata in the output file allwise_table_upload.tbl can be used to construct a full image URL as in Example 3 above.