Wednesday, June 17, 2015

Why'd You Have to Go and Make Things So Complicated?

You know how professional mathematicians sometimes have trouble doing really basic math, like multiplication? That's kind of how I feel with computers.  I'm not trying to say I'm an expert coder -- few things are farther from the truth than that statement -- but, at least in python, I'm competent.  But you know what I have the hardest time doing?  Opening programs, or downloading things onto my computer, or turning a computer on/off.  This blog post is about my battle with, and eventual triumph over, basic computer functions.

One of the things that separates the Banneker Institute from REU (Research Experience for Undergrads) programs is that we spend three hours every day taking classes.  Topics for those classes range from Interferometry to Proposal Writing, but for the first few weeks, we're learning how to code in Python. Yesterday, our lessons revolved around using Github, which, as far as I can understand it, is like Facebook and Google Docs for coding.  Users put their code up on their profiles for others to see and, if the profile is public, edit.

Github can be used both online and from the terminal (unix) or command prompt (windows).  The catch is that Macs come with Git (the program) already installed, and Windows don't.  And no matter how many times I try to download things onto my computer, or how intuitive the source website tries to be, downloading is always a struggle.  But I did it! At least, I think I did. Typing "git" onto my command line no longer returns a giant red error message, so I'm going to put this one in the success column.

The next basic-but-near-impossible-to-overcome obstacle was put up by the CfA ([Harvard-Smithsonian] Center for Astrophysics).  In order to fit the transit light curves for the planets in Kepler-186, I need to use my advisor's server, which means I have to remotely connect to the CfA's network from my computer.  This is so ridiculously complicated. I guess it makes sense to be super secure; there is some top-notch science being done on that network. But they sure do make it hard for students!  Not so hard, though, that I couldn't figure it out (after about an hour and with lots of help from my advisor and the CfA helpdesk).  Now I can keep doing the science!

Finally, as if the first two weren't enough, I had to download LaTeX.  For those not familiar with LaTeX, it's basically a word processor, but it's really good at formatting things for science writing, especially equations.  This is another one of those programs that generally comes pre-installed on a Mac, but needs to be downloaded onto a Windows machine.  After I downloaded it, I spent a while with my advisor figuring out where the file was on my computer and how to get it to save changes to the template he gave me.  So. Much. Strugglebussing.

I've been told so many times by so many people that most of these problems wouldn't actually be problems if I used a Mac instead of a Windows machine.  I don't want to fall into the trap of operating system elitism because Macs are great, but I'm a Windows person.  My computer, Sinead, and I have been through a lot together, and though I might not always be on Team Windows, I'm not quite ready to betray my allegiances yet.  As I told my advisor today, "If I can do research on a Wondows computer, I can do anything!"  And in case I start to doubt that, I have some inspirational music to bring me back.


Tuesday, June 16, 2015

Banneker Institute: Week #2

Two weeks ago, I had no idea how much work had to be done with light curve data before you could actually start fitting the light curve. I guess I never really thought much about what needed to be done, but naive little me probably thought that data came to us ready to be plotted, and all that was left to do was fit.  Boy was I wrong!

If you've been following this blog, you know a bit about what I've had to do with my data over the last couple of weeks. If you haven't, you can read those old posts now, or you can keep reading this one for a brief summary (but if you don't go back, you'll miss most of the pretty plots I've been making).

Here's what I've done so far:
  1. Fold the data $\rightarrow$  This involves stacking all of a planet's transits on top of each other.  This makes the transits easier to see (just to check that Kepler isn't going crazy and you actually do have transits in your data) and allows you to separate data points that are in a transit from those that are out of one, which leads to...
  2. Remove Outliers $\rightarrow$ Only remove points from a list of data points that occur oustside of any transit for any planet. The $\sigma$ value (how many $\sigma$s away from the mean you want to start removing data) chosen is that which, probabilistically, would only remove one good data point.  
  3. Separate Planets $\rightarrow$  Make individual files for each planet excluding points that occur in any other planet's transits. The motivation behind this step is probably the least intuitive.  This step is necessary because (a) working with individual files for each planet is easier in the long run and (b) this eliminates the -- incredibly small -- chance that two planets could have overlapping transits. 
But now that that's done, I can (a) be super proud of myself and (b) move on to actually fitting the light curves for each of the planets in my system. I don't know what this entails, exactly, but I'll let you know when I do.

Today's post was pretty short.  I'm sorry about that. But to make it up to you, I'll leave you with a riddle.

You have 12 cubes, and they all look and feel identical, except for one, which is slightly heavier or lighter than the others. Using a mechanical balance only three times, how do you figure out which cube is different and whether it is heavier or lighter??

Feel free to comment below or email me (momctier@gmail.com) with your answers, but I'll be posting the solution next week.

Sunday, June 14, 2015

Let's Paint the...Plants...Black??

The first week of my stressful (but fun!) two-internship summer is over, and I couldn't be happier with how well it went! I love the different projects I'm doing and the students and scientists I get to do them with.  But I also love weekends! And this weekend is especially lovable because I'm spending it in New York with my roommate and her family as they celebrate my roommate's brother's graduation.  So I had a 5-hour long train ride, terrible wifi, and a list of scientific articles that I had downloaded before I left. Can you guess what I spent my time doing?

You got it (I'm assuming; I can't really read your mind)! I spent those 5 hours reading about science.  I read about the Meter Size Barrier, the the Meszaros Effect, and the death of galaxies. All of those were interesting, but none were quite as applicable to my senior thesis (more on that in a bit) as an article sent to me by Dr. Sarah Rugheimer--who just graduated from Harvard University this year!--about plant colors on extrasolar planets, and I'll tell you why here.

You may have heard the joke (perhaps on 30 Rock, as I did just this morning) that at Harvard, we don't have majors. We have concentrations.  And if that weren't pretentious enough, we don't even have double concentrations, we have joint concentrations, which require students to write a joint thesis that combines their two fields.  You may have figured out by reading some of the posts on this blog that I'm kind of, sort of, a little bit interested in astronomy.  Yeah, I love astronomy enough that I'm planning on devoting the next 6 to 8 years of my life learning it, and the rest of my adulthood after that putting what I learned to use.  But I don't love it enough to give up my other passion: folklore.  I am what we Harvardians call a joint concentrator in Astrophysics and Folklore & Mythology. I'm the first one, so the two departments don't really know exactly how to deal with it or me, but I've always been a fan of trailblazing.

People always ask me how astrophysics and folklore go together, and I love it when they do because there are SO MANY WAYS.  There are connections as basic as the stories that accompany each constellation and ones as complex as identifying which ancient cultures may have been more knowledgeable about astronomy than we thought based on their creation myths. I'm doing neither of those, and I'm not really doing anything in between them.  Instead (and, yes, I do get an insanely excited smile on my face every time I get to tell someone this), I'm going to write a science fiction novel based on the exoplanet research I do this summer. And I want that novel to be as scientifically accurate as possible, all the way down to the color of the plants.

I know it's common for kids to ask why the sky is blue, but have you ever wondered why plants are green? I mean, beyond the fact that they have chlorophyll, because they haven't always.  Why have plants evolved to have chlorophyll?  That's what I spent part of my train ride learning.

Our sun emits most of its energy in the range of wavelengths we call "visible."  In fact, we call it visible light because our eyes evolved to see wavelengths at the peak of our sun's spectrum. So it makes sense that plants would evolve in a similar way, but it's more complex than that.

If you paid attention in high school science class (or if you didn't, but you did your own reading on the subject), you probably know that plants look green to us because they absorb all the other colors and reflect green.  What's wrong with green? Does it not taste as good as all the other colors or something? The answer, as in most physics/astronomy questions, has to do with photons.

By the time sunlight makes it through Earth's upper atmosphere, most of the photons traveling around are red, and the numbers decrease as you move down the spectrum to blue.  But blue photons don't have it all bad! They're more energetic than their longer-wavelength counterparts. And green is somewhere in the middle--it doesn't have super impressive quantity or quality.  Plants "know this" and have optimized to get photons high in energy and in numbers, so they just don't need the green photons to make their fuel.

But in extrasolar systems, the star might be totally different from ours!  In the system I'm studying this summer, for example, the star is smaller and dimmer than out own sun.  This means that the plants on a planet in the habitable zone won't get as much light, and will need to absorb all the light they can get, so they'll look black!  Isn't that cool?? It gets even cooler when you think about the ways this seemingly insignificant detail could affect the culture on that planet.

In America, we associate the color green with freshness, rebirth, and nature (the good, clean kind of nature).  We have those associations because plants are green! On a planet where plants are black, color symbolism could be totally shifted from our own.  Black = birth. Maybe green = death. Red = peace.  Wouldn't that be so weird and trippy and awesome? It will be for me, and I hope it will be for anyone who ends up reading my thesis.

Thursday, June 11, 2015

Out, Liar!!

You know those days when everything goes well and you can't help but smile the whole time? That's what today was.  Why? Because, in the words of my advisor, Dr. David Kipping (or rather, in the words of some video that Dr. Kipping told me about), I scienced the shit out of today!

By the end of yesterday, I had 5 transit light curves, one for each planet in the system I'm studying, Kepler-186.  By the end of today, I had a list of all of "Good" points and a list of all of the "Outliers". An outlier is a point that is so far away from the average of the other points that we can tell it isn't actually a reflection of what's happening in our target. It might be the result of an instrumental error, or a strange spike in stellar luminosity, or a number of different things. Whatever it is, it isn't part of the transit data I'm interested in, so I don't want it.  My other advisor, Dr. John Johnson, explained it like this:


Getting these lists of good and "bad" points was a multi-step process.  First, I had to identify all of the points that occurred outside of at least one transit for any of the planets. In other words, if a point existed outside any transit for planet b, planet c, planet, d, planet e, or planet f, I made a note of it.  It is from this "Out of Transit" list that I can begin to remove outliers.

Why did I have to first remove the in-transit points? Well, the point of a transit is that its points exist par from the mean amount of light coming from the star. If I removed outliers from the entire dataset, I would also remove most of the transit points, but that's the bit that actually leads to scientific results!

Removing outliers is more-or-less straightforward.  Using the "Out of Transit" data points, I find an average flux value.


For our data, this value is essentially 1.  I then find an acceptable sigma value using a "mad" function from the interwebz. The function finds the Median Absolute Deviation, and calls itself a more robust form of finding the standard deviation.  This is necessary because a standard deviation function is too influenced by the outliers. (Those things really do cause so much trouble!)

The last step is to flag, or take note of, all the points that are a certain number of sigmas away from the mean.  I set that certain number equal to 3, because anything less than that means removing way too much of the data. (See this wikipedia page to better understand why.)

But after all of that, I'm left with this plot!

Please excuse the awful y-axis labels. I'm figuring out how to get rid of that "+9.96e-1" bit. 

You can even see some of the transit points in this plot!  They're the black points that fall way outside the mean. 


That was one part of my day.  After that, I spent another two hours researching galaxy mergers. Well, I spent two hours doing things that will eventually lead to learning more about galaxy mergers. I essentially spent that time reducing Herschel data and playing around with the output fits files in python.  I say "playing around" because I haven't actually managed to do anything too useful yet. But I will soon!  And when I do, I'll write about it here.  

Wednesday, June 10, 2015

Banneker Institute: Days 1 & 2

Some time last fall, after a full day of class, work and rugby practice, I opened an email from my advisor, Professor John Johnson.  I was pretty tired, so it took me a few tries, but I eventually figured out that the email was an invitation to be part of the inaugural class for the Banneker Institute, a program designed to prepare talented students from underrepresented backgrounds for competitive graduate programs.

Now it's over half a year later and the program has finally started.  Here's (a brief) account of what's happened over the last two days.

The first day started off with introductions. So. Many. Introductions.  That's good, though, because I now understand Professor Johnson's motivations for starting this program and a know all of the student mentors' names and research topics.

After lunch, we students met with our research advisors. I'll be working with Dr. David Kipping on measuring the eccentricities of the five planets in Kepler-186.  I learned in the reading I did in preparation for this project that a planet's eccentricity greatly influences its climate.

$\Delta T = \left ( \frac{T_*^4 R_*^2}{4a^2} \right )^{1/4}\left [ \left ( 1-e \right )^{-1/2}-\left ( 1+e \right )^{-1/2} \right ]$

So, the more eccentric (or the more elliptical-y) an orbit, the more its temperature will change throughout its year.  Can you imagine what life would be like if your hometown went from feeling like the Sahara Desert to feeling like the Arctic Circle in a few months? It wouldn't be all that great. We should all take a moment to thank Earth and it's low-ellipticity orbit for not subjecting us to such extreme changes. 

Moment over? Okay. So that's pretty cool, but how am I actually going to find the planets' eccentricities? That's an excellent question, and I don't really know the full answer yet. But I do know that one of the first steps is producing what we call a Transit Light Curve.  (For more info on light curves, see this old post.)

If you followed that link, you saw that I've worked with light curves before, but I've never made one. I've only analyzed ones that were made for me.  It turns out that making them isn't as easy as you might think it would be.  

I started with a list of times and a list of flux measurements associated with each time. That gave me this plot:



 This is a mess! I can't see anything useful in that, so I had to play around with it a bit. 

By knowing the period of each planet's orbit, I was able to pick out all of the transits for each individual planet and stack them on top of each other respectively in a process we call Folding. For example, I identify all of the transits for planet d and stack, or fold, them on top of each other to make it look like a single transit:


And that's my first light curve!! Well, one of five firsts. 

Hopefully I'll continue to make progress so I can tell you all about it.  So if you're interested in exoplanets, galaxy mergers, or science fiction writing (the latter two are the other projects I'll be working on this summer), this blog is for you. If you aren't, this blog is still for you because there's a chance it might change your mind.

Monday, December 29, 2014

Where the X-Rays Are

Wow... It's been a while, hasn't it? Obviously, I'll accept some of the responsibility for that, but I also really want to blame school.  It's like they think I'm there to take classes and do homework or something...

Since it's been so long, you might be wondering what I've been up to. (Even if you aren't, I'm going to tell you anyway.  And besides, if you aren't interested, why are you reading this blog??) I decided to try something new (and stupid) this semester and take five classes -- Irish, Folklore Theory, Electromagnetism, and two astronomy research classes.  I don't want to burden you with a post that takes two hours to read, so if you want to read about one of the research projects, just jump on over to this beautiful page. The project is on hold for winter break, but it will pick back up.

Now, about my other research project.

This semester, I had the pleasure of working with Dr. Belinda Wilkes, the Director of the Chandra X-Ray Observatory.  One of the many projects she's working on right now is quantifying the orientation dependence of our Active Galactic Nuclei (AGN) observations. As a part of that, I was working with a single high-redshift quasar and trying to determine whether or not there was a galaxy cluster surrounding it.

(Professionally made) photo of the quasar I was studying this semester. 

One of my first questions was, "Why do we care if there's a galaxy cluster there?" Well, actually, I asked that question pretty far into the semester. At first, I was kind of busy asking myself things like "How do I open this file in ds9?" (but with a lot more expletives).   

But, when I got to the point where I wanted to know more about galaxy clusters, the whole project kind of wrapped itself together for me.  Galaxy clusters are really rare at high redshifts (z > 1) because they correspond to relatively young universes (about 4 Gyrs).  Such a young universe shouldn't have had enough time to let fully-formed clusters develop, but some still manage to exist.  Learning more about those young-universe galaxy clusters could lead to discoveries about cluster and galaxy formation.  But before we can learn about them, we have to find them, and quasars -- which tend to exist in really dense regions of space -- are good galaxy cluster homing beacons. 

To figure out if my quasar (I say "my," but I should make it very clear that I don't exactly own any objects in space...yet), 3C 270.1, is an effective homing beacon, I analyzed both radio and X-Ray data. 

EVLA Radio data (left) and Chandra X-Ray data (right)

If I had to wrap an entire semester of research into as few steps as possible, I guess I'd do it like this...
  1. Define region
  2. Extract counts
  3. Fit Spectra
Huh, it seemed like a lot more work at the time....  Oh well, it was enough to keep me busy, and it was fun! 

Following those steps (more than once), I found the number of counts in the quasar's extended structure that we assumed to come from the possible galaxy cluster. I turned that count value into a luminosity and determined..... nothing conclusive. 

Basically, I spent 3 months trying to answer this simple yes-or-no question, and couldn't, but that's science for you.  And I really don't mind it  =)

Now that I'm on winter break, I'll have more time to actually write posts as often as I know I should. The next post I write will include a reunion with the best co-interns I ever could have asked for this past summer and my first AAS meeting! 

And, as a farewell gift, I give you this


It has absolutely nothing to do with my science (although, I'm sure someone, somewhere would be happy to work through all the physics of what she does), but she's a BAMF. And everyone deserves a little BAMF-ness in their day.  Enjoy! 

Monday, August 25, 2014

All I Wanna Do When I Wake Up in the Morning is See Your Eyes

Wow! Eleven weeks sure does go by fast!  It feels...maybe not like yesterday, but only last week that I walked into the NRAO building with no idea how awesome the future ahead would be.

But before I sing the praises of this summer and the other summer students (who I already miss like crazy), I'll talk about the final stages of my project.

Aren't we all so cute?! I can't wait to see them all again.


I think I was still struggling with Cloudy the last time I wrote a post (which was wayyy to long ago).  Well, there's good and bad news about that.  I usually like starting with bad news so I can end on a happy note, but doing that now just wouldn't make too much sense.

So, good news first:
I FIGURED IT OUT!  I understand Cloudy now (well, as much as anyone who isn't the creator can understand it without devoting their life to it).  It turned out that my biggest problem was that I was working with a model of Cloudy from 2013 and a Cloudy user manual from the 1990s... No wonder I was having so much trouble!

Now the bad news:
After I figured out how to use Cloudy and developed a rough understanding of what all of the output files meant, my mentor and I realized something--Cloudy was not going to be able to model out whole galaxy like we thought it would.  If you've been reading all of the posts about my summer (and if I've been putting the right stuff in my posts), you might remember that we were trying to constrain the physical properties of a nearby galaxy.  So we were trying to figure out its density, metallicity, temperature, etc. But galaxies aren't these big homogeneous creatures just floating about in space; they have different regions and those regions have different properties. In this project particular, we were concerned with the HII regions and the Photodissociation Regions (PDRs), or the ionized regions and the neutral regions, respectively.  When I finally got Cloudy working the way I wanted it to, we saw that it wasn't all that great at constraining the neutral regions of our galaxy, so we had to figure out another way to do that.  So it was a setback, but this is science! And in science, no result is still a result.

My battle with Cloudy over, and the different regions constrained, the next step in the project was to try and get some information out of the extra data we received about halfway through the summer.  We figured out its size, its mass, and how many stars it forms per year.  That took me to the end of the summer with my research! But I am still working on it, so I can continue to write posts about it and tell people how awesome radio astronomy is.

But the best part of this summer was that I wasn't limited to just sitting behind a desk, typing away at a computer.  I went to my first scientific conference--Transformational Science in the ALMA Era.  There were so many cool talks, some of which I actually kind of understood, and I got to meet some really cool radio astronomers from around the country.  I was even asked to be in charge of the official Twitter for the conference, which was a lot of fun!

All in all, this was an amazing summer. I learned a lot about radio astronomy, met some really cool people, and got a better idea of what I want to do when I graduate form college and become a "real person."  So, thank you NRAO for making this one of the best summers of my life!


And for those of you who were wondering what the title of this post meant, and for those who didn't pay any attention to the title but want to know now that I've brought it up...

At some point  this summer, I started listening to different 80's music playlists on Spotify and I kept going back to one song...