Monday, June 23, 2014

Coding Can Be...Fun!

Week 2 is done and it was even better than the first!  If I recall correctly, I was just starting my data analysis the last time I posted.  Here's what I've been up to since:

I finished that code I was working on at the end of the first week!  It took a couple days, but I finally figured out how to loop through the data I had reduced and add up the flux values for a range of selected wavelengths.  I was definitely making it more difficult than it had to be when I first tried to tackle the problem.  The hard part was actually identifying and calculating the different factors that contributed to the error in my intensity measurement.  But I did it!  It was my first solo-constructed script, and I was really damn proud.

Once I was done with that, my mentor had me start learning about modeling right away.  We're using these spectral lines to determine characteristics--temperature, density, metallicity, etc.--of a starburst galaxy, so one of the things I have to do is use the data that's been collected (by the Herschel telescope) to actually create a theoretical model of this galaxy.  My mentor told me to read a paper by Robert Rubin on modeling HII regions.  Most of the paper was filled with pages-long tables of data, which I was then asked to turn into a meaningful model with a code of my own creation.  And that's where it got really fun!

Simplified diagram of an HII Region from this University of California website
HII regions are large clouds of ionized hydrogen gas where a lot of star formation has just happened

Rubin's data came to me in 4-dimensional cubes with dimensions corresponding to metallicity, photon-number, temperature, and density.  My task was to turn it into a 5-dimensional "cube" with an extra axis representing the number of HII clouds in the galaxy model.  I had to do this because we don't know how many clouds the galaxy we're studying has, and creating a fifth dimension of data allows us to see which number of HII clouds most closely matches our own data.  After adding the extra dimension, I had to create chi square grids (which I now understand a lot better than I ever did when they tried to explain it in my introductory mechanics class) and calculate the probability that each model in Rubin's data actually matched our own.  So far, I've been working on this script for two days, and I'm still not done.  But every time I do something right, I can't help but do a little dance in my seat, and that's a great feeling!

On top of all that, I've been to two discussions about grad school and career paths in astronomy in the past 5 days.  I've barely been here for two weeks and they've already managed to convince me that I should pursue a Ph.D in astronomy.  But more on that in the next post, where I'll tell you all about my (new and very tentative) future plans.



No comments:

Post a Comment