Professional Documents
Culture Documents
Accessing data with web forms Under Data Access on the website above, Navigate, Finding Chart, and Search provide web interfaces to access SDSS data. The first two provide interactive access to images and the third allows you to download a catalog of data. 1. Play around with the Navigate and Finding Chart tools. Look up a couple of interesting astronomical objects. Then play around a bit with the Search tool, to see what sorts of data are available through the webform. Accessing data via SQL query Using a SQL query to download a catalog of SDSS data gives the user more options than possible with a web interface alone. SQL queries are very basic in structure and consist of three pieces: a SELECT statement, a FROM statement, and a WHERE statement. Despite this seemingly simple structure, SQL can be used to execute quite sophisticated queries of well-structured databases. The schema that describes the SDSS catalog that is accessible via SQL query is located here: http://skyserver.sdss3.org/dr10/en/help/browser/browser.aspx Browsing through the schema to learn which parameters are included in the database and where takes a little practice. You will get some practice and guidance in the tutorial below. For purposes of this course (both the Project sets and research projects): Star (a View), SpecObjAll (a Table), and ProperMotions (a Table) are the only database elements that you should need to query. 2. Follow the SDSS SQL Tutorial here (skip sections 6, 7, 10, 11): http://skyserver.sdss3.org/dr10/en/help/howto/search/introduction.aspx 3. Use a SQL Search tool to download catalogs of stars in three different, 0.5 x 0.5 degree, Milky Way fields. Include: psf magnitudes in g and r and associated measurement uncertainties, reddening in g and r. Use these as your field centers: RA (deg) DEC (deg) 1 234 58 2 184 32 3 318 0.5
Examples of more advanced queries Later in the course, you may need to conduct slightly more sophisticated queries of the SDSS public data. Here are example queries run in CASJobs that join the photometric database with the proper motion database, and that join the spectroscopic database with the photometric database:
SELECT s.ra, s.dec, s.raErr, s.decErr, s.mjd, s.psfmag_gextinction_g as g, s.psfmag_r-extinction_r as r, s.psfmag_iextinction_i as i, s.psfmagerr_g, s.psfmagerr_r, s.psfmagerr_i, m.pmRa, m.pmDec, m.pmRaErr, m.pmDecErr, m.match, m.dist22, m.nfit, m.O, m.J into mydb.PMcatalog FROM Star s JOIN propermotions m ON s.objID = m.objID WHERE (s.clean = 1 AND ((ra BETWEEN 204.0 and 219.0 AND dec BETWEEN 21.0 and 36.0)) )
SELECT s.ra,s.dec, s.elodieLogG, s.elodieFeH,s.elodieObject, s.class, s.subclass, s.elodieTEff, s.elodieZ, s.elodieZErr, p.psfMag_g-p.extinction_g as g, p.psfMag_r-p.extinction_r as r, p.psfMag_i- p.extinction_i as i, p.psfMagErr_g, p.psfMagErr_r, p.psfMagErr_i, p.type into mydb.spectrotest FROM SpecObjAll as s JOIN PhotoObj AS p ON s.bestObjID = p.objID WHERE s.zWarning = 0