Intro to SQL • Two components • Data Definition Language (DDL): • create table, etc. • Data Manipulation Language (DML): • select, insert, delete, update, etc. The basic “SELECT” statement: Select From Where A1, A2,......AN R1, R2,.......RN condition The basic “SELECT” statement: 3 1 2 Select From Where A1, A2,......AN R1, R2,.......RN condition The basic “SELECT” statement: 3 1 2 Select From Where A1, A2,......AN what to return R1, R2,.......RN relations condition combine/filter The basic “SELECT” statement: SELECT s.ra, s.dec, s.psfmag_g-s.extinction_g as g, s.psfmag_rs.extinction_r as r, s.psfmag_i-s.extinction_i as i, pm.pmra, pm.pmdec, pm.pmraerr, pm.pmdecerr FROM star as s JOIN propermotions as pm ON s.objid = pm.objid WHERE s.ra BETWEEN 225.6 AND 225.8 and s.dec BETWEEN -2.0 and -1.8 AND CLEAN=1 AND s.psfmag_r <22 Load query into DR9 server show SELECT count(*) show check syntax and retrieval options show clean photometry query relevant URL’s from previous page: http://skyserver.sdss3.org/dr9/en/tools/search/sql.asp http://skyserver.sdss3.org/dr9/en/help/docs/ realquery.asp#cleanStars Flags & Bitmasks One thing that's important to fully exploit the SDSS database is a good understanding of bitmasks. A bitmask uses the bits in an integer as "toggles" to indicate whether certain conditions are met. http://www.sdss3.org/dr10/algorithms/bitmasks.php Binary, decimal, hexadecimal.... What?? https://www.youtube.com/watch?v=TFY8YuBLNKc Go back to bitmasks page and show search with flags again. Science Interlude: Stellar Evolution and CMDs CMD = Color-Magnitude Diagram (Color vs. Mag) HR = Herzberg-Russell Diagram (Temp vs. Luminosity) Magnitude 10Msun M ai n When stars form there are a small number of high mass stars, and a large number of low mass stars. Se qu en Sun ce 0.1Msun Color/Temperature Magnitudes, Luminosity and Fluxes An astronomical source gives off a certain number of photons (per second per wavelength) which we will call its luminosity, L. The flux we measure from a source depends on its distance: L F = 4 d2 In the radio, fluxes are typically measured in Janskys, where: 1 Jansky = 10-26 watts / square meter / Hertz Optical and infrared astronomers quantify the brightness of an object using the magnitude system, which is the proportional to the logarithm of flux. Magnitudes are define as: m = 2.5 * log10(F) + 2.5*log10(F0) where 2.5*log10(F0) depends on the photometric system. he Magnitude System Dotter et al. (2011) Colors are defined as the ratio of fluxes, equivalently, the difference between magnitudes, e.g., V - I The star Sirius has an apparent magnitude mV = V = -1.4 The faintest stars observed with HST have apparent magnitudes V ~ 30. The Magnitude System In addition to the UBVRI photometric system, the SDSS system is also widely used (ugriz): It is possible to transform between photometric systems. Apparent versus Absolute Magnitude The observed flux of an object depends on its distance from us (F = L / 4*pi*d2). Thus, when we observe an object, we are measuring its apparent magnitude (mv or V, mg or g) The absolute magnitude of an object (MV, Mg, etc.) is related to its total luminosity. Absolute magnitude is defined to be M = m when an object is placed at 10 parsecs (10 pc). In PS#2, you will show that: M = m + 5 + 5*log10(d) where d is distance in units of parsecs Science Interlude: Stellar Evolution Stars form out of clouds of gas. Out of a single gas cloud, many stars are born at a single time: -> lots of small mass stars -> handful of massive stars Stellar birth is clustered. 1kpc = 3 x 10^19 m ~ 3300 ly Can we find traces of such events in our Local Group? Milky Way halo GC’s bulge disk 8 kpc open clusters halo ~200 kpc 05.03.2007 Sun 25 kpc Sagittarius Magellanic Clouds Mürren - Saas-Fee-Course - E.K. Grebel 2MASS infrared 31 image Science Interlude: several 1000 stars Color Magnitude Diagrams The Pleiades ~million stars M80 Science Interlude: Color Magnitude Diagrams M13 12 Billion years old Chemical abundance similar to early universe 100 million years old Chemical abundance similar to Sun. Significant binary star fraction Stellar Evolution Out of a single gas cloud, many stars are born at a single time: -> lots of small mass stars -> handful of massive stars Mass 10Msun M ai n Se qu Highest mass star ~100Msun, limit for fragmentation? en Sun ce 0.1Msun Temperature Lowest mass star 0.08Msun, limit for nuclear burning. Stellar Evolution gravity pulls in While a star is on the main sequence, it is in equilibrium. Gravity balances pressure. pressure pushes out Pressure comes from heat generated by nuclear fusion in star’s core. More massive stars therefore must have a higher pressure/ temperature in their core, in order to maintain equilibrium. The Sun’s Lifetime The Sun formed 4 billion years ago, and will live for another 4 billion years. Sun is born Now Sun runs out of hydrogen fuel White dwarf forms The Sun’s Lifetime At very end of evolution, outer region expands and disappears. Inner region shrinks, white dwarf left behind. white dwarf Stellar Evolution Stars are ~black bodies, i.e., in thermal equilibrium.The radiation has a specific spectrum and intensity that depends only on the temperature of the body. Stellar Evolution More massive stars must have a higher temperature to maintain equilibrium. Stars are approximately black-bodies, thus hotter stars are also bluer. Along the main sequence, temperature, T, and luminosity, L, are related: L L T M 4 3.5 Stellar Evolution - Lifetimes How does stellar mass relate to a star’s lifetime? The total energy released by a star in its lifetime is, Etotal: Etotal = L * time Nuclear fusion is turning mass into energy, which means Etotal = eff * M c2 Using the relationship between L and M on the main sequence: t M 2.5 Massive star lifetimes are much shorter than lower mass stars. Magnitude/Mass Stellar Evolution 10-100 million years (very short lifetime) 10Msun 2-8 billion years Sun 0.1Msun Color/Temperature 10-100 billion years (longer than age of Universe) Magnitude/Mass Stellar Evolution How does Sun’s post-main sequence evolution appear in color-magnitude space? 10Msun Sun 0.1Msun Color/Temperature Stellar Evolution If stars of all masses form at same time, can determine age by noting which stars are just evolving off of the main sequence. Composite CMD for open star clusters in the Milky Way Science Interlude: Color Magnitude Diagrams HB = Horizontal Branch RGB = Red Giant Branch MS = main sequence MS WD = White Dwarfs 12 Billion years old Chemical abundance similar to early universe 100 million years old Chemical abundance similar to Sun. Significant binary star fraction