27 June 2011

Exploring IDL and our stars - week ii of summer

A short update on my second week of SURF follows, as does a fuller explanation of what we are trying to do! EDIT: just the update, the theory behind is in the next post. Else this would just get long.

I was looking at the vst structure that contained the information for the radial velocity measurements that I was to look at for Professor Knutson. She got a proposal in, with a good list of stars that had certain traits (more on that in the next post), and she wanted to see whether any new measurements of these had exhibited trends since six months ago. Well, I realized that I had no idea how to work with IDL, so I got diverted into a little bit of programming to try see what I could do with it.

For my database of stars that could be interesting to observe (more on that later, e.g. next post) I wanted to know when would be the best time to observe these stars - i.e. when they were near the zenith during the year. Sasha told me that a good way of finding this would be to see which star is crossing the meridian at midnight (approximately the middle of the night) so we could say, give or take a couple days, when the star could be observed by Keck. Now, the Local Standard Time (LST) is matched exactly to the RA of a star directly overhead, which is very useful for us! All I had to do was find the LST at midnight on any particular date and match it to RA of the star to find my "perfect observing night".

Doing this by hand seemed like a little inefficient, especially if I had to find this LST and match it to more stars in the future. This lead to a little fiddling about in IDL! My program, summerlst, calls a function (LSTM()) that first populates a vector of all the LSTM for a year, without correcting for leap years. (I still kind of have to work on that part). Note that the LST @ midnight (LSTM) is 00:00 hrs at vernal equinox (Sept 21 or therabouts) and advances, as a small approximation, at 4 min a day. I introduced a tiny correction for longitude, and after 365 days, the LST cycled through 24 hrs very nicely and returned to 24:00 or 00:00 hrs. The index of this vector is a count of the number of days after Sept 21.

Then we have to match the LST with the RA of a star! There might be a better way of doing this, but I found the closest match by a difference vector (the absolute value of LST[i]-RA), then found the minimum of that, taking the index of the minimum (which will also be a count of the days after Sept 21) and figuring out which day it lands on (which includes a correction for leap year. Interesting). It outputs a nice, readable date. It would be pretty simple to instead return a Julian Date (JD) or Modified JD (MJD, where we define MJD = JD - 2.44e6 instead of what generally is put on the internet, MJD = JD - 2.4e6; that 40,000 confused me for quite a while :D) which would be more useful to the telescope but less so for knowing which star to send to the telescope, I believe.

The called function takes only a single RA, whereas the procedure is cool in that it takes an ascii file and reads it! Using more stuff from the libraries I have (the standard IDL one, the astronomy library, more :D -- cool ones I've used: ydn2md.pro and readcol.pro; cool ones I want to use: webget.pro, a function that accesses http servers and downads text and FITS files!) I define one input as an ascii file with just a list of RA that you are interested in - the RA of stars you are to observe (again, easily modified to account for a different number of columns, i.e. if the RA data is in the second column, with a star name in the first).

Now comes something I really like about IDL - that in the command line you can stop and continue programs! I printed out the no. of valid columns, i.e. the number of RA it was able to read. This should be the same as the number of stars. Then with an easy stop command, the program stops running so you can check! To continue, all you need is a .continue. SO COOL.

I used a for loop to take the RA data read in and sent it off to my LSTM function, storing the retuned string of the date (Day Month Year) in a vector that is printed out to the command line. Using for loops is slightly discouraged in IDL, as it can be slow if working with giant arrays (at least that is what I've heard). However, there are only 111 transiting planets (which is what we care about) as an upper threshhold, and currently only 42 are of any interest, and that number will be cut down given that many may not be observable this summer, it seemed the best way to go about this. If I have time later to figure out a better way of populating vectors, I will work on that.

Another really cool thing about IDL is optional keywords or inputs - which changes the direction of the program. For instance, I can input either the RA in the more common, more useful (decimal) hours, or I can take it in decimal degrees (using the /DEG keyword when running the program) and,
if keyword_set(DEG) then ra = ra / 15.
Amazing. For instance, I used the readcol procedure to read the ascii file of RA. But, since I call it with the /SILENT keyword, it doesn't print out error messages for the lines that cannot be read (i.e., empty rows or the wrong data type). Instead I just printed out the number of elements in the output vector, and ask the user if it's right (as mentioned above, with the stop command.

I ran this for the 42 stars I picked (I actually picked 40, and Prof. Knutson 20, and we only differed in two so I added those in, to make it a happy answer to life, the universe, and everything), inputed it into my database (again, more explaining next post!) and made a final spreadsheet of stars up in July! We - and when I say we, I mean the California Planet Search (CPS) - have 10 observing nights, and that should be very nice for the 8 stars we can look at!

17 June 2011

Beginnings

It's 11:22 pm and I have been in the library for a while. Today was the first real day of SURF for me, when I actually sat down to think through the project. It was quite amazing, reading about the stars we could look at and trying to reason through which ones were more interesting - more probable to have multiple companion planets. Tomorrow I will have think about it some more. :)

But I jump ahead. Let me give a short overview of the methods we use to discover exoplanets. Currently ignoring the mostly unconfirmed Kepler Field planets, announced back in February, there are about 500 identified extrasolar planets, orbiting stars near and far (but mostly relatively close). The problem in finding exoplanets directly is obvious - the light from their sun will be generally more than a million times brighter, and it is extremely difficult to detect such a faint light source. There are some advances, by blocking starlight and interferometry, but indirect methods have proven much more effective at finding exoplanets.

Doppler spectroscopy/RV method
The most important involves radial velocity measurements. As a large planet orbits a star, it causes the parent star to wobble slightly as both objects orbit around their center of mass. The radial velocity, the speed of the star in the line of sight with Earth, changes as the star is periodically advancing towards and moving away from us. Small Doppler shifts to the light emitted by the star are detected as tiny red and blue shifts in the stars spectroscopic emission.
An exoplanet orbiting a star, both of which are orbiting their common center of mass.
When the star moves towards us, its spectrum is blueshifted, and when the star moves away from us, it is redshifted. By regularly looking at the spectrum and so measure its velocity, you can see if it moves periodically due to the influence of a companion.
Note that these shifts are tiny - literally one pixel that could be simply noise. So a very perfect template spectrum (we use HIRES' iodine cell, where HIRES is the High Resolution Echelle Spectrometer) must be overlaid against the starlight. It's quite pretty, actually, but very exacting.
The observed radial velocity can be plotted against time, and if fluctuations are periodic (circular orbits give sine waves) we have proof of a companion! Moreover, this technique, but Kepler's third law, gives a minimum mass of the planet. A nice example of 51 Pegasi's radial velocity curve is below.
51 Pegasi b, or Bellerophon, was one of earlier discovered exoplanets, and the prototypical hot Jupiter.
This is a more recent RV curve from Keck for HAT-P-6, with center of mass velocity subtracted, and residuals below it.
The largest limitation of this method is that the actual change in radial velocity is unknown, as the exoplanet is probably not on the same plane as Earth. The mass found is a minimum mass, Msini, where i is the angle of inclination.

Transit method
If a planet actually transits - passes in front of - its parent star, the star will dim by 1/10% to 1%, depending on their relative sizes. This happens pretty rarely, as the planet must be on the same plane, and there are many false positives from things like sunspots. The duration of the transit depends on the semimajor axis and the star's mass. Since the mass and size of the star can be determined from spectroscopy, the transiting planet's size and distance from the star can be calculated. If a transit even happens repeated, once per orbital revolution, it is probably a planet!
The transit affects the apparent brightness of the star.
The first exoplanet, HD 209458 b, discovered by the transit method.
One very nice thing about transits is that atmospheres can be studied, as well as parameters of the planet's surface. HD 209458 b, unofficially Osiris, is known to have an evaporating hydrogen atmosphere conaining oxygen and carbon, as well as possibly water vapor. Last year, it was announced that there was a superstorm with windspeeds of up to 7000 km/hr, by the ESO's Very Large Telescope and spectrography of carbon monoxide gas.


Now, the RV method is used to check the transit method. This summer, the plan is to take additional radial velocity measurements of exoplanets found by transits. With both the transit information and the RV curve, we might find that the systems have more than just the one exoplanet. The hope is for massive, perturbing planets on long-period eccentric orbits, pulling at the RV curve very slowly for a long term trend, which would present a unique opportunity to study the internal density structure and tidal dissipation in the inner transiting planet.

That will be for another day!

see also: Exoplanet