The semi-automatic way is to pass a list of sources to the SHA web interface. You can pass a list of up to 1000 sources to the SHA from the search screen. More information on that is in the Searching section. For this, you still need to examine the output of this by hand, but at least you do not have to send targets individually to the server.
The more fully automatic way requires you to write some code that conducts a search query and then parses the results to obtain URLs, from which you can download the data. The rest of this section talks about this API, or application programming interface. There are two different ways to query the database.
Because the API queries result in XML tables, if you click on any of the links below (in this section), your browser may have trouble rendering it, or will render only bits and pieces of the embedded text. You may need to save the contents of the link to a file in order to read what is returned. You may be able to use "View Source" to see the result in more legible format.
Note that when you parse the XML file, you will be looking for URLs. To retrieve a URL using wget or curl, you should enclose the URL in quotes. Here are some examples of downloading specific files from the SHA:
There are two different APIs for the SHA. One is complex and powerful, the other is simple, follows a protocol, and is limited. The Virtual Observatory (VO) is a set of data services that all follow a set of standard API rules agreed upon by the International Virtual Observatory Alliance (IVOA). The simpler API follows these rules.
IRSA also has a page about all the program interfaces at IRSA.
The base URL for these queries is https://sha.ipac.caltech.edu/applications/Spitzer/VO/VOServices. Here are 2 example URLs. These URLs return XML tables that are lists of the metadata that are a part of the VO search. From the descriptions in the XML metadata table, you can figure out what values you need to change in order to do the search you want to do.
Please note that it is really easy to inadvertently launch something that is functionally equivalent to a 'denial-of-service' attack on IRSA's servers if you are not careful. Please be sure to test your code using only a subset of your desired requests, and add throttle control to your code, e.g., add some 'wait' steps between successive requests. If we notice an undue load on our servers (a real life example is more than 70,000 requests in less than 10 hours), we will block your IP address, so if your requests suddenly stop working, this may be why. Please contact the IRSA Help Desk if this happens.
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 |
field | short description | long description | returned for VERB=1 |
reqkey | AORKEY | Spitzer Astronomical Observation Request Number (key) | no |
pbcdid | PBCD ID | Post Basic Calibrated Data ID (Level 2 product search) | no |
bcdid | BCD ID | Basic Calibrated Data ID (Level 1 product search) | no |
hasAccess | Public access | "true" if the data is public accessible, "false" if it is proprietary data. | no |
accessUrl | Product access reference URL | The URL to be used to retrieve image or table, "NONE" if product does not have public access | yes |
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 | no |
modedisplayname | Instrument/Mode | Instrument/Mode | no |
wavelength | Bandpass | Bandpass ID | yes |
cra | RA (J2000) | Right Ascension in sexigesimal format HHMMSS J2000, of the FITS image. Example: "2h23m14.3s" | no |
cdec | Dec (J2000) | Declination in sexagesimal format DDMMSS J2000, of the FITS image. Example: "-12d43m11s" | no |
exposuretime | Exposure time in seconds | Exposure time (Level 1 products only) | no |
primary | Primary field | If this value is equal to 1, the observation was designed to include the originally specified target. If it is set to 0, the observation was obtained serendipitously of an offset field, and may or may not contain the originally specified target (most often, it does not) | no |
filetype | Table or Image | Table or Image | no |
externalname | File name | File name | yes |
ptcomment | Product description | Product description | no |
ra | crval1 in FITS file | Right Ascension in Equatorial J2000 for the center of the FITS image | yes |
dec | crval2 in FITS file | Declination in Equatorial J2000 for the center of the FITS image | yes |
epoch | Epoch | Epoch year | no |
equinox | Equinox | Precessional year associated with the coordinate system | no |
begintime | Observation start | Observation start (Level 2 products only) | no |
endtime | Observation end | Observation end (Level 2 products only) | no |
scet | Spacecraft event time: the coordinated universal time on board the spacecraft | Date and time of data collection event (Level 1 products only) | no |
minwavelength | Min wavelength (microns) | Min wavelength (microns) | no |
maxwavelength | Max wavelength (microns) | Max wavelength (microns) | no |
filesize | File size in bytes | File size in bytes | yes |
campid | Campaign ID | Instrument campaign ID | no |
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)] | no |
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)] | no |
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)] | no |
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)] | no |
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)] | no |
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)] | no |
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)] | no |
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)] | no |
naxis1 | naxis1 | The size of the image in pixels for dimension 1 | yes |
naxis2 | naxis2 | The size of the image in pixels for dimension 2 | yes |
cdelt1 | cdelt1 | The pixel scale (in degrees on the sky per pixel) at the reference location for dimension 1 | yes |
cdelt2 | cdelt2 | The pixel scale (in degrees on the sky per pixel) at the reference location for dimension 2 | yes |
crota2 | crota2 | The rotation angle from the "up" direction to the celestial pole | yes |
crpix1 | crpix1 | The pixel coordinate of the reference location (can be fractional, in the image center or off the image) for dimension 1 | yes |
crpix2 | crpix2 | The pixel coordinate of the reference location (can be fractional, in the image center or off the image) for dimension 2 | yes |
crval1 | crval1 | [deg] RA at CRPIX1, CRPIX2 | yes |
crval2 | crval2 | [deg] DEC at CRPIX1, CRPIX2 | yes |
ctype1 | ctype1 | The coordinate system (first four characters) and WCS map projection (last three characters) for dimension 1 | no |
ctype2 | ctype2 | The coordinate system (first four characters) and WCS map projection (last three characters) for dimension 2 | no |