Go to sdss.org
DR7 Home
Where to Start
   Database (CAS)
   Files (DAS)
   Older Releases
About DR7
   Sky Coverage
   Data Processing
   Known Issues
   DR Papers

Tutorial: Obtaining Spectra based on Color Constraints

How to Find all Objects with Spectra that Satisfy a Given Set of Color Constraints and then Get the Spectra.

This query, in particular, finds spectra for all objects at the hot end of the WD cooling sequence. For a simple example, this list is defined as objects with g-r <-0.15 and u-g <0.4.  Normally, when querying based on filter or color magnitudes, you should also make sure all the appropriate photo QA flags are set properly (to indicate the object's photometry is trustworthy), but in this case, since all these objects have spectra, we will assume they were targeted and allocated a fiber based on good photometric magnitudes, so we don't bother to check the QA flags.


  1. Go to the Spectro Query Server (all data access tools are linked from Data Access in the left navigation bar).
  2. Select "html" as output format if you want to look at your query results in your browser, or "csv" to save them in a "comma-separated values" file which you can use to retrieve spectra from the Data Archive Server later
  3. At the first line, enter 0 to have your query return an unlimited number of output rows/objects.
  4. Select "minimal" under "Spectroscopy Parameters" under "Parameters to Return". This will return the MJD, plate, and fiberID that you will need to actually get the spectra from the DAS. Make sure none of the filters are checked in the "Filter (for DAS use)" section.
  5. Select the Best radio button between the parameter listboxes.
  6. Under Position Constraints, make sure "No Position Constraint" is selected.
  7. Enter 0.4 in the "u-g max" box.
  8. Enter -0.15 in the "g-r max" box.
  9. Unselect "Extended Sources" and make sure "Point Sources" is selected in the "Object Type" section of the form.
  10. Verify that nothing else is selected.
  11. Click on "Submit Request". Depending on database load, this query takes about half a minute to run and returns 3493 objects.

To get the actual spectra for these objects:

  1. Select csv output and save the csv file to disk.
  2. Go to the DAS spectroscopic data retrieval form.
  3. Select the data release you for the spectra you want to download. DR7 uses a later version of the pipeline, and includes spectra not included in DR6. Note that if you select "All data" then the rerun you desire must be included in the csv table you upload, and you will need to slightly modify the procedure you use to generate the cvs accordingly.
  4. Select the result csv file from above in the "select file to upload" box.
  5. Click on "Submit Request" at the bottom of the page.
  6. Follow the link given the "Download selection" section to the form for mass download.
  7. Under "File types," select spSpec. (You might also want spPlotGif if you want to see simple GIFs of each spectrum.) The spSpec selection will get you the FITS file for each spectrum.
  8. Since either "wget" or "rsync" under the "Download Selection" section, depending on how you want to download your data.
  9. Hit the "request" button at the bottom of the page. When queried by your browser, choose where to save the file.
  10. Follow the instructions in the Interactive download tools section of the DAS home page to download the files you requested.
  11. See the tutorial on "Displaying SDSS Spectra" to learn how to display your new SDSS spectra.

Last modified: Wed Jun 21 16:54:26 BST 2006