Spitzer Documentation & Tools
Spitzer Heritage Archive User’s Guide

Chapter 11.      Using the VAO/API

11.1            Introduction to SHA Application Program Interface (API)

The VAO is the Virtual Astronomical Observatory, and protocols compatible with the VAO require an interface to the SHA that can be accessed via programs running on other servers, or an application program interface (API).

 

The SHA data can be accessed via an HTTP GET program interface where the request is a set of parameter=value pairs and what is returned is an IPAC Table containing metadata and URL links to download products with the related ancillary files. This page describes these input parameters and the columns returned.

 

Currently, only the image data are available via the API.  Spectra will be available in a future SHA version.

11.2            Examples


Search by fixed position

applications/Spitzer/SHA/servlet/DataService?RA=163.6136&DEC=-11.784&SIZE=0.5&VERB=3&DATASET=ivo%3A%2F%2Firsa.ipac%2Fspitzer.level2



Search by moving target NAIF ID

applications/Spitzer/SHA/servlet/DataService?NAIFID=2003226&VERB=3&DATASET=ivo%3A%2F%2Firsa.ipac%2Fspitzer.level2



Search by program ID
applications/Spitzer/SHA/servlet/DataService?PID=30080&VERB=3&DATASET=ivo%3A%2F%2Firsa.ipac%2Fspitzer.level2



Search by Astronomical Observation Request ID

applications/Spitzer/SHA/servlet/DataService?REQKEY=21641216&VERB=3&DATASET=ivo%3A%2F%2Firsa.ipac%2Fspitzer.level2

 

11.3            Input parameters

The input parameters are entered as standard HTTP parameter=value pairs in HTTP/GET syntax. In this syntax, the parameter name is followed by an “equals” sign (=) which is then followed by a value. No extra spaces are allowed, and if the value contains any spaces or special characters that might be ambiguous, they have to be encoded formally as in any HTTP or URL reference (more discussion here). As shown above, each component of a pair is separated from the other by an ampersand (&) character.

 

DATASET

Data set. Two sets are supported:
ivo://irsa.ipac.spitzer.level1 (BCD data)
ivo://irsa.ipac.spitzer.level2 (PBCD data)

VERB

Verbosity level, controls the number of columns in the output.
1 - selected columns, 3 - all available

RA

Search by position: right ascension in degrees

DEC

Search by position: declination in degrees

SIZE

Search by position: region size in degrees

NAIFID

Search by moving target: NAIF ID, which is a unique number allocated to solar system objects (e.g. planets, asteroids, comets, spacecraft) by the NAIF at JPL.

PID

Search by program: program ID

REQKEY

Search by AOR ID: Astronomical Observation Request ID

 

11.4            Output columns

The output columns in the resultant table describe metadata and include a link to download the requested data product and the important ancillary products related to it. Please note that all output columns are available only when verbosity level is set to 3.

 

reqkey

AORKEY

Spitzer Astronomical Observation Request Number

pbcdid

pBCD ID

Post Basic Calibrated Data ID (Level 2 product search)

bcdid

BCD ID

Basic Calibrated Data ID (Level 1 product search)

accessUrl

Product access reference URL

The URL to be used to retrieve image or table, "NONE" if product does not have public access

AccessWithAnc1Url

Zip access reference URL

The URL to be used to retrieve the image or spectra with important ancillary products (mask, uncertainty, etc.) as a zip archive, "NONE" if product does not have public access

modedisplayname

Instrument/Mode

Instrument/Mode

wavelength

Bandpass

Bandpass ID

cra

RA (J2000)

Right Ascension in sexigesimal format HHMMSS J2000, of the FITS image. Example: "2h23m14.3s"

cdec

Dec (J2000)

Declination in sexagesimal format DDMMSS J2000, of the FITS image. Example: "-12d43m11s"

exposuretime

Exposure time in seconds

Exposure time (Level 1 products only)

primary

Primary field

If this value is equal to 1, then the product has primary scientific value (Level 1 products only)

filetype

Table or Image

Table or Image

externalname

File name

File name

ptcomment

Product description

Product description

ra

Crval1 in FITS file

Right Ascension in Equatorial J2000 for the center of the FITS image

dec

Crval2 in FITS file

Declination in Equatorial J2000 for the center of the FITS image

epoch

Epoch

Epoch year

equinox

Equinox

Precessional year associated with the coordinate system

begintime

Observation start

Observation start (Level 2 products only)

endtime

Observation end

Observation end (Level 2 products only)

scet

Spacecraft event time: the coordinated universal time on board the spacecraft

Date and time of data collection event (Level 1 products only)

minwavelength

Min. wavelength (microns)

Min. wavelength (microns)

maxwavelength

Max wavelength (microns)

Max wavelength (microns)

filesize

File size in bytes

File size in bytes

campid

Campaign ID

Instrument Campaign ID

ra1

RA of corner 1

RA position of the lower left image corner [pixel space, where first pixel is located at (0.5, 0.5), position (ra1, dec1) = (0.5, 0.5)]

dec1

Dec of corner 1

DEC position of the lower left image corner [pixel space, where first pixel is located at (0.5, 0.5), position (ra1, dec1) = (0.5, 0.5)]

ra2

RA of corner 2

RA position of the lower right image corner [pixel space, where first pixel is located at (0.5, 0.5), position (ra2, dec2) = (NAXIS1 + 0.5, 0.5)]

dec2

Dec of corner 2

Dec position of the lower right image corner [pixel space, where first pixel is located at (0.5, 0.5), position (ra2, dec2) = (NAXIS1 + 0.5, 0.5)]

ra3

RA of corner 3

RA position of the upper right image corner [pixel space, where first pixel is located at (0.5, 0.5), position (ra3, dec3) = (NAXIS1 + 0.5, NAXIS2 + 0.5)]

dec3

Dec of corner 3

Dec position of the upper right image corner [pixel space, where first pixel is located at (0.5, 0.5), position (ra3, dec3) = (NAXIS1 + 0.5, NAXIS2 + 0.5)]

ra4

RA of corner 4

RA position of the upper left image corner [pixel space, where first pixel is located at (0.5, 0.5), position (ra4, dec4) = (0.5, NAXIS2 + 0.5)]

dec4

Dec of corner 4

Dec position of the upper left image corner [pixel space, where first pixel is located at (0.5, 0.5), position (ra4, dec4) = (0.5, NAXIS2 + 0.5)]

naxis1

naxis1

The size of the image in pixels for dimension 1

naxis2

naxis2

The size of the image in pixels for dimension 2

cdelt1

cdelt1

The pixel scale (in degrees on the sky per pixel) at the reference location for dimension 1

cdelt2

cdelt2

The pixel scale (in degrees on the sky per pixel) at the reference location for dimension 2

crota2

crota2

The rotation angle from the "up" direction to the celestial pole

crpix1

crpix1

The pixel coordinate of the reference location (can be fractional, in the image center or off the image) for dimension 1

crpix2

crpix2

The pixel coordinate of the reference location (can be fractional, in the image center or off the image) for dimension 2

crval1

crval1

[deg] RA at CRPIX1, CRPIX2

crval2

crval2

[deg] Dec at CRPIX1, CRPIX2

ctype1

ctype1

The coordinate system (first four characters) and WCS map projection (last three characters) for dimension 1

ctype2

ctype2

The coordinate system (first four characters) and WCS map projection (last three characters) for dimension 2

 

11.5            Response on error

If an error occurs when an HTTP request is being processed, an empty IPAC table with a single attribute, named ERROR, will be returned. Error message is a value of this attribute.