Workshop 8 (SQL on SDSS)

AST 142 WORSKHOP #8, FRIDAY MARCH 27
Formulas to remember
The free-fall time
r
tf f =
3π
32Gρ0
where ρ0 is the initial cloud density.
One-D hydrostatic equilibrium
dP
= −ρg
dz
Mass Surface density in a disk Galaxy
gz
vz2
=
2πG
2πGh
where vz2 is the vertical velocity dispersion, gz the acceleration in the z direction and Σ the mass
per unit area.
Σ=
Relaxation time
v3
1
2R
N
=
4πG2 m2 n ln(2R/r)
v 24 ln(N/2)
where R is the radius, N is the number of stars, m the mass of a star.
tc =
Virial Theorem
In thermal equilibrium or steady state
d2 I
= 2K + U = K + E
dt2
where I, K, U, E are the momentum of inertial, total kinetic energy, total potential energy, and total
mechanical energy of a closed system of particles that can be characterized by a scalar potential
energy. Often d2 I/dt2 = 0 and then K = −U/2.
Virial mass of a thermalized cluster
6r0 vr2
G
where vr2 is the variance of the radial velocity distribution of objects in the cluster, and r0 is the
cluster core radius.
M=
1
2
AST 142 WORSKHOP #8, FRIDAY MARCH 27
Rotation curves
Point mass M
r
GM
r
Constant density, solid body rotation with central density ρ0
r
4πGρ0
vc (r) = r
3
vc (r) =
Flat rotation curve 1/r2 density distribution with ρ(r0 ) = ρ0
q
vc (r) = 4πGρ0 r02
SQL-Lab
1. SDSS spectral tour
Astronomers increasingly create large databases of astronomical observations. In this workshop
we will explore the Sloan-Digital Sky Survey (SDSS) database.
The sql (Structured Query Language) server for the 12-th data release of the Sloan Digital Sky
Survey (SDSS) is here http://skyserver.sdss.org/dr12/en/tools/search/sql.aspx
A query is often in the form
SELECT TOP 30 −− l i s t t h e f i r s t 30 o b j e c t s found
p . o b j i d , p . ra , p . dec , p . u , p . g , p . r , p . i , p . z ,
−− r e t u r n t h e s e q u a n t i t i e s ,
−− r a=r i g h t a s c e n s i o n , dec = d e c l i n a t i o n , u g r i z a r e f i l t e r magnitudes
−− t h i s i n f o r m a t i o n from PhotoObj c a t a l o g
s . s p e c o b j i d , s . c l a s s , s . z as r e d s h i f t , s . s u b c l a s s
−− more i n f o r m a t i o n about what i s found
−− t h i s i n f o r m a t i o n from SpecObj c a t a l o g
FROM PhotoObj AS p
−− s e a r c h i n t h e PhotoObj c a t a l o g , c a l l t h e o b j e c t p
JOIN SpecObj AS s ON s . b e s t o b j i d = p . o b j i d
−− match t h e o b j e c t i n t h e photometry c a t a l o g t o t h a t
−− i n t h e s p e c t r o s c o p i c c a t a l o g
−− i n t h e SpecObj c a t a l o g t h e o b j e c t i s c a l l e d s
WHERE −− c o n d i t i o n s f o r o b j e c t s t o be found i n t h e s e a r c h !
s . s u b c l a s s = ’AGN’ −− o n l y o b j e c t s o f t h i s s u b c l a s s
AND p . g < 18 −− o n l y b r i g h t o b j e c t s
Comments are preceded by -Above p.xxx is the xxx keyword entry of the p object. For example p.ra is the right ascension of
the p object from the PhotoObj catalog. We are using p as the object in the photometry catalog and
s as the object in the spectroscopic catalog. The objects are matched with the JOIN command.
• Enter the above query into
http://skyserver.sdss.org/dr12/en/tools/search/sql.aspx
AST 142 WORSKHOP #8, FRIDAY MARCH 27
•
•
•
•
•
•
•
•
•
•
3
You may need to adjust the syntax in order for the query to succeed. There is a handy
button that allows you to test syntax without executing the query.
Chose an object from the table resulting from your successful query. Grab its objectid.
Bring up this website
http://skyserver.sdss.org/dr12/en/tools/quicklook/
Click on objid and enter the objectid of the object you have chosen.
Take a look at a few spectra of objects you have found!
Try a search for s.subclass = ‘BROADLINE’ to see what Seyfert galaxies look like. Narrow
line active galaxies tend to have bright [OIII]. Seyfert galaxies and quasars can have broad
emission lines. At higher redshifts you tend to see a different set of lines as bluer rest-frame
lines are red-shifted into the observed spectral window.
Try a search for s.subclass = ‘STARFORMING’ to see what an emission line galaxy looks
like.
Try a search for s.subclass = ‘STARBURST’ to see what lots of star formation looks like.
Try a search for s.class = ‘QSO’ to see what quasars can look like. Did you find any high
redshift objects?
Try a redshift limited search with
WHERE
s.z between 0.1 and 0.2
AND p.g < 18
What does the spectrum of a galaxy without much star formation look like?
Try a search for red objects like with
AND (p.g - p.z) > 1
You can also look at stars, find clusters of galaxies ...
To find what keywords each data table contains you need to find what is called the schema and
look in the individual tables. See
http://skyserver.sdss.org/dr12/en/help/browser/browser.aspx
Under tables you will find a tables called PhotoObjAll and SpecObjAll and these list the
keywords we are using in the above query. I don’t see a table callted PhotoObj but I think it
might be similar or the same as PhotoObjAll.
4
AST 142 WORSKHOP #8, FRIDAY MARCH 27
2. Estimating the number of bright galaxies per cubic Mpc at a redshift
The following query uses the SDSS to estimate the number of galaxies detected photometrically
(and with crudely estimated photometric redshifts) in a region that is 0.1 × 0.1 degrees on the sky
and ranges with 0.2 < z < 0.25.
−− Find g a l a x i e s r e s t r i c t e d by p h o t o m e t r i c r e d s h i f t
−− i n a r e g i o n t h a t i s 0 . 1 x 0 . 1 d e g r e e s l a r g e
SELECT TOP 100
p . o b j i d , p . ra , p . dec , p . u , p . g , p . r , p . i , p . z ,
pz . z
FROM PhotoObj AS p
JOIN Photoz AS pz ON pz . o b j i d = p . o b j i d
−− r e q u i r e o b j e c t t o have a p h o t o m e t r i c a l l y e s t i m a t e d r e d s h i f t
WHERE
pz . z BETWEEN 0 . 2 and 0 . 2 5 −− r e s t r i c t r e d s h i f t
AND p . r a between 5 5 . 0 and 5 5 . 1 −− r e s t r i c t l o c a t i o n on sky
AND p . dec between 0 . 0 and 0 . 1
• How many galaxies do you find with the above query?
• Using a cosmological calculator like this one
http://www.astro.ucla.edu/~wright/CosmoCalc.html
Find how large in Mpc that corresponds to 0.1 degrees on the sky at z = 0.2? This is an
angular diameter. Ned Wright’s cosmo-calculator loads with currently popular values for
the Hubble constant and ΩM . A flat universe is currently supported by cosmic microwave
background measurements.
• Using a cosmological calculator how large is the distance in Mpc between z = 0.2 and
z = 0.25? (To estimate this you can use the difference in the co-moving radial distances for
each redshift).
• Approximately how many galaxies per Mpc3 do you estimate you found with your query
at z = 0.2?
• What is the luminosity distance at z = 0.2? What distance modulus does that correspond
to?
• What is the absolute magnitude of one of the galaxies you found with this query? How
does this compare to the absolute magnitude of the Milky Way (about -20.5).
• Discuss some reasons that this estimate for the galaxy number density at z = 0.2 is not
likely to be accurate.