Introduction
This page provides some technical detail regarding using the SAS web server interface. For full-fledged documentation of the SDSS-III data set please see the survey web site. Some useful links might be:
As described in the documentation, the tools on this site allow retrieval of FITS versions of the spectra and images from SDSS-III, as well as some visualization tools for examining them. Searches by coordinates, identification number, and other criteria are available as well.
Note that in addition to the tools provided on
these pages, this server allows wget and
rsync access to the flat files, as described in the
documentation linked to above. The data model linked to above is
critical in using the flat files.
Data Models
spec files
The spec files returned by this service are similar, but not identical to spSpec files. The naming convention is spec-pppp-mmmmm-ffff.fits where pppp is the PLATEID, mmmmm is the MJD, and ffff is the FIBERID - all padded with zeros where necessary.
The data is saved in HDU1 of the FITS file in a binary table with the following column names:
| Column | Description |
|---|---|
| flux | The calibrated flux in units 1E-17 erg/cm^2/s/Ang |
| wavelength | The wavelength array in units Angstroms matching the above flux, calculated using COEFF0, COEFF1, and NPIX1 in the header of the spPlate file from which the spectrum was extracted. |
| best_fit | The best fit spectrum template in units 1E-17 erg/cm^2/s/Ang, extracted from an spZbest file. |
| and_mask | An ANDed bit mask specified for each spectrum |
| or_mask | An ORed bit mask specified for each spectrum |
| inverse_variance | The per-pixel inverse variance of the spectrum in units 1/(1E-17 erg/cm^2/s/Ang)^2 |
Spectroscopic Data Access API
The spectrumDetail page, which plots the flux and displays information about a spectrum, can be accessed directly with the PLATEID, MJD, and FIBERID of the spectrum of interest:
http://mirror.sdss3.org/spectrumDetail?plateid=PLATEID&mjd=MJD&fiber=FIBERID
e.g. http://mirror.sdss3.org/spectrumDetail?plateid=406&mjd=51869&fiber=12
Downloading the FITS file for an individual spectrum follows the same principle:
http://mirror.sdss3.org/returnSpec/fits?plateid=PLATEID&mjd=MJD&fiber=FIBERID
e.g. http://mirror.sdss3.org/returnSpec/fits?plateid=406&mjd=51869&fiber=12
If you are interested in accessing data for a spectrum for use in another GUI or for use in a custom web-based plotting library, you can also request a JSON object:
http://mirror.sdss3.org/returnSpec/json?plateid=PLATEID&mjd=MJD&fiber=FIBERID
e.g. http://mirror.sdss3.org/returnSpec/json?plateid=406&mjd=51869&fiber=12
If you would like to submit a list of PLATEID, MJD, and FIBERID for download, you can write a script to HTTP Post a list to the bulkSpectra page. The list name must be platemjdfiber, and the elements in the list can be delimited by comma (,), pipe (|) or whitespace. An HTML example would look like this:
<html>
<body>
<form name="bulk" action="http://mirror.sdss3.org/bulkSpectra" method="post">
<input type='hidden' name='platemjdfiber' value='
266,51602,24
406,51817,1
' />
<input type='submit' name='download_pmf' value='submit' />
</form>
</body>
</html>
You can also do this for a list of RA and Dec (degrees), with an optional Tolerance (in arcseconds):
<html>
<body>
<form name="bulk" action="http://mirror.sdss3.org/bulkSpectra" method="post">
<input type='hidden' name='radec' value='
48.514,-1.059
48.685,-0.950
' />
<input type='hidden' name='tolerance' value='1.0' />
<input type='submit' name='download_radec' value='submit' />
</form>
</body>
</html>
Similar to the above example, if you would like to submit a list of PLATEID, MJD, and FIBERID to view in the interface, you can write a script to HTTP Post a list to the bulkSpectra page. The list name must be platemjdfiber, and the elements in the list can be delimited by comma (,), pipe (|) or whitespace. An HTML example would look like this:
<html>
<body>
<form name="bulk" action="http://mirror.sdss3.org/bulkSpectra" method="post">
<input type='hidden' name='platemjdfiber' value='
266,51602,24
406,51817,1
' />
<input type='submit' name='submitPMF' value='submit' />
</form>
</body>
</html>
You can also do this for a list of RA and Dec (degrees), with an optional Tolerance (in arcseconds):
<html>
<body>
<form name="bulk" action="http://mirror.sdss3.org/bulkSpectra" method="post">
<input type='hidden' name='radec' value='
48.514,-1.059
48.685,-0.950
' />
<input type='hidden' name='tolerance' value='1.0' />
<input type='submit' name='submitRADEC' value='submit' />
</form>
</body>
</html>
Imaging Data Access API
The fields page, which displays a given imaging field and information about the data, can be accessed directly with the RUN, CAMCOL, and FIELD of the field:
http://mirror.sdss3.org/fields?run=RUN&camcol=CAMCOL&field=FIELD
e.g. http://mirror.sdss3.org/fields?run=3712&camcol=3&field=187&submit=Submit
Downloading the FITS file for an individual field is similar, but you must also specify what filter(s) you would like to download:
http://mirror.sdss3.org/returnIms/fits?run=RUN&camcol=CAMCOL&field=FIELD&filter=FILTER
e.g. http://mirror.sdss3.org/returnIms/fits?run=3712&camcol=3&field=187&filter=u
You may also specify a list of filters as a block of text (for example 'ugz'), and a tarball is returned that contains the specified FITS files.:
http://mirror.sdss3.org/returnIms/fits?run=RUN&camcol=CAMCOL&field=FIELD&filter=FILTERS
e.g. http://mirror.sdss3.org/returnIms/fits?run=3712&camcol=3&field=187&filter=ugz
If you are interested in cutting out a JPG section of a field at a specified RA and Dec(degrees), and an optionally specified size in pixels (note that the cutout is in X and Y oriented with the field angle):
http://mirror.sdss3.org/returnIms/cutoutJpgs?ra=RA&dec=DEC&size=SIZE
e.g. http://mirror.sdss3.org/returnIms/cutoutJpgs?ra=210.805&dec=54.3&size=150
If you want a mosaic of multiple fields for a specified RA, Dec, Size (degrees), and filters (single or multiple e.g. 'ug'). The mosaics are oriented North up, East left and not with the field angle.
These requests can take some time:
http://mirror.sdss3.org/returnIms/mosaicTar?ra=RA&dec=DEC&size=SIZE&mosaic_bands=FILTERS
e.g. http://mirror.sdss3.org/returnIms/mosaicTar?ra=210.805&dec=54.3&size=0.3&mosaic_bands=ug
Database Schema
For all other support, contact the developers.
