Sunday, February 14, 2016

Accessing the Kepler Mission data

I've been asked several times over the years:
 
Would you be able to give advice on how to download a NASA Kepler light curve and run a quick analysis on it?

Usually the query is on behalf of an ambitious and motivated student from a high school or middle school.  I've put together a set of brief instructions to let you (and others) get started.

Introduction
 
The NASA Kepler mission was launched in the early morning hours of March 7th, 2009, with the goal of assessing how common Earth-sized planets are around other stars.  The results have been phenomenal, with several thousand candidate exoplanets found by the mission and ~1000 confirmed/validated, many of those in multiple planet systems.

How does Kepler work? Briefly, it stared at a part of the sky 10 degrees x 10 degrees square in the constellations of Cygnus and Lyra for four straight years, pausing only to relay data back to Earth or for temporary spacecraft malfunctions (safe modes).  It has since entered a new "zombie" life as K2, but I won't get into the details of its new mission.

Every 30 minutes (or 1 minute in some cases), Kepler collected a measurement of the brightness of ~150,000 carefully selected stars in that field of view.  We call the brightness measurements as a function of time a "light curve" and/or photometric time-series.  Kepler exploits the transit method for finding exoplanets, which occurs when the planet orbiting another star "transits" in front of (eclipses) that star as seen from our vantage point here in the Solar System.

The transit method for finding exoplanets


Since the stars are bigger than planets (except in some extreme cases!), the planet does not block all of the stars light, but a characteristic percentage that is related to the square of the ratio of the size of the planet to the size of the star.  For an Earth-sized exoplanet transiting in front of a Sun-like star, the exoplanet would cause the star to dim while the planet was transiting by 0.01%, or 100 parts per million.  Jupiter sized exoplanets, ~10x bigger than the Earth, produces an easier to detect dimming of ~1%.   The transit duration (how long it lasts) and how often transits repeat are also important, but let's just stick with the dimming amount, or transit "depth" for now.

Sounds easy right?  No.  Oftentimes there is "activity" going on the surface of the star, including flares and starspots.  These can also produce irregular and semi-periodic changes in the brightness of the star, like this example, Kepler Object of Interest (KOI) 254:

Kepler light curve for KOI-254.  The wavy pattern at the top is because of starspots on the surface of the star.  Even a flare around Day 70 looks like it is visible (the horizontal axis is time in days; the vertical axis is brightness).  The Jupiter-like planet that transits in front of this star causes the short dimming events you see below a normalized intensity of 0.94.

And all this has to be done for very shallow dimming events for the smallest planets.  The noisiness of the digital cameras and within individual pixels within those digital cameras starts to matter too.

There are a number of online tools that you can use to access Kepler data, and I've organized them roughly in order of level of difficulty in terms of learning curve.

1) Planet Hunters

For the act of transit searching, there is a citizen-science project called Planet Hunters that is quite successful and found and published some planets that the official Kepler Mission team missed!

http://www.planethunters.org/

It's a great way to get acquainted with the Kepler data with an easy-to-use interface.  Many amateur astronomers have gotten involved and contributed to our body of knowledge coming from the Kepler mission.

2) MAST

Another great tool for visualizing Kepler light curves, is maintained at MAST, the Mulkulski Archive for Space Telescopes:


You search for your target here. It helps to have the name of your target - either Kepler Object of Interest # for candidate planet host stars, Kepler # for confirmed planet host stars, or Kepler Input Catalog (KIC) # for any one of the host stars Kepler monitored, or the coordinates (Right Ascension and Declination).  More on getting those down below.

The website will return any matching results in a table.  Please bear in mind that these websites are coded by small teams of engineers and scientists who don't have the resources of thousands of web programmers that places like Google and Facebook have to make their complicated (and slick) search interfaces.

 

Then, clicking on one of these links will take you to a page that lets you plot the light curve in your web browser:


In the above example you can easily see the dips in brightness from the transiting planet, and you can use your mouse to zoom in to see a single transit event:


There it is, raw Kepler data!  You can even hover over the plot and see the values of the data being plotted.    What I like to do with my students is have them manually measure the transit depth of a Jupiter-sized planet (since easy to see) and compute the radius of the planet from the square root of the transit depth.  You can work this up in a simple spreadsheet like this one:


3) NASA Exoplanet Archive

The NASA Exoplanet Archive lets you find, visualize and compute periodograms (find significant repeating patterns) for all Kepler light curves here:

http://exoplanetarchive.ipac.caltech.edu/

http://exoplanetarchive.ipac.caltech.edu/applications/ETSS/Kepler_index.html


All you would need would be the KIC ID of the target, or you can search by Right Ascension and Declination.  Fortunately, the NASA Exoplanet Archive also maintains lists of Confirmed and candidate Kepler exoplanets, which gives you more naming information (KIC#, KOI#, Kepler #), coordinates, and model stellar sizes, to name a few important properties:

http://exoplanetarchive.ipac.caltech.edu/cgi-bin/TblView/nph-tblView?app=ExoTbls&config=cumulative

 


For example, on the Kepler light curve search page, you can enter in the Kepler ID (KIC #):

8561063, and Click "View"

This is the KIC # for the multi-planet system Kepler-42, also known as KOI-961.  Kepler-42 is one of my favorite Kepler systems, discovered by some of my colleagues.  It's got three planets that transit, between the size of Earth and Mars, and they orbit a dim red dwarf star!
 

In the results table, if you click on the link:
(PDCSAP Time Series)

for any entry, it will take you to the light curve visualization tool with all the Kepler time-series for that star (Kepler data is split into "quarters" typically of ~90 day length).
This particular source has a LOT of Kepler short cadence data, so it takes a long time to load the interface.  But eventually you will be rewarded with seeing the actual Kepler data that was used to discover this fascinating multi-planet system around a cool red dwarf star.

I was responsible for the scientific input for a lot of these tools when I used to work at the NASA Exoplanet Archive.  So maybe I'm a bit biased!

From there, you can refer to the User Guides to learn more about everything that can be done to manipulate the data within the browser, including computing some advance time-series analysis tools called "periodograms".  If you want to do more, you can download the light curves too and play with them offline with your own favorite software like Microsoft Excel.

4) PyKE
Another far more complex tool to download is called Pyke: 

I wouldn't recommend it for beginners, and it helps to already be familiar with the Python programming language and/or IRAF astronomer tools.  But PyKE allows you to interact with the Kepler light curves (and individual detector pixels) at a very low-level.



Monday, February 1, 2016

RIP to my PhD thesis advisor, Mike Jura

It looks like the news is public now. 
RIP to my PhD thesis advisor, Mike Jura

As one of his "academic children," I will miss the support he gave to me throughout my career. I got the news from another of his "academic children" on Sunday, and I last exchanged emails with Mike on Friday late at night, only one day before he passed away. Fortunately we had a brief phone chat just a few weeks ago.   Here are some of my reflections in the moment.  
Our very first conversation occurred when I was a senior undergrad during the fall of 2000. We were riding in an elevator at JPL and talking about converting B1950 to J2000 coordinates for a large sample of stars for a Spitzer Legacy Science proposal. Later that day I'd write a script that queried SIMBAD for a list of stars and parsed the html output for the J2000 coordinates.  In our proposal team meeting of professional scientists, I watched in awe as Mike went up to a chalkboard and sketched out the theory of debris disks and infrared excess.  He was the professors' professor, and I wanted to be like him.  The proposal was ultimately unsuccessful, but it shaped the rest of my life.  In the elevator, Mike encouraged me to apply to UCLA for grad school, which I did.  Subtle but targeted recruiting!

I would graduate from Caltech and move to UCLA early and start research with Mike on July 1st, 2001.  I needed the research job to pay the rent that summer.  Mike was my bridge to my new stage of my career at UCLA.  I started with Mike modeling multi-wavelength light curves of evolved stars, before moving onto observations of debris disks (pre-Spitzer!). At the time, I was unsure of what I wanted to do for my thesis research. I had spent my undergrad years majoring in physics, taking quantum field theory and general relativity, all the while doing astronomy research with Mike Werner at JPL.  There was a disconnect there - I viewed astronomy more as a passionate hobby and a job, while all of my coursework was in physics.  UCLA was a good fit for me as a result, with strong and diverse astronomy and physics departments.  It allowed me to postpone deciding what to do for my thesis research.
I remember talking to Mike in the aftermath of September 11th, 2001 about how several of my friends were contemplating joining the military. His response was one of the few times he expressed a deeply personal opinion. He had been drafted, in the Vietnam War, and he had nothing but disdain for the experience of war.

For my first two years at UCLA, I continued working with Mike Jura.  I realized Mike was such an amazing professor to work for, and I enjoyed the research too.  However, I had flirted with going into dark matter or solid-state physics for my PhD thesis.  It dawned on me just in time: that a major part of the success of one's graduate school experience was finding a thesis advisor that you "clicked with".  I clicked with Mike Jura.  It wasn't inertia.  My astronomy "hobby" could become my career.  Three years later, I would defend my PhD on "M Dwarf Planetary Systems". Mike said I was a self-starter, that once I got going he didn't need to help me much, but that wasn't true. I was in his office on a daily basis. I liked his blend of joining theory and observation.   And he was accessible.  I wasn't lost in some professor's lab with 7 graduate students, 3 postdocs and 5 undergraduates.  No, Mike took his role as an advisor seriously, and I always felt like he invested as much time in me as I needed.   I had his individualized attention, and I cherished that.
I recall one eventful day that I was sitting in his office:  We were on the cusp of making the discovery that stellar winds could play a role in the dynamics of dust around young and low-mass stars (stellar wind drag).  Mike was a few steps ahead of me on the theory. I remember looking at one of the equations on his white board and thinking "dammit, I was almost there."  That was an important set of equations - I took it in one direction and its applicability to M dwarfs.  He would take it in the other and apply it to white dwarfs.  From one of those equations in that office that day, he gave birth to an entirely new sub-field of stellar astronomy - the study of debris disks and asteroids around white dwarf stars.  He put the connection together - that these mysterious "DAZ" polluted white dwarfs were getting metals in their atmospheres from asteroid-like material falling onto these stars.  The metals should have quickly sunk from view into the interior of the DAZ white dwarfs, but yet the metals persisted meaning they had to be replenished.  The detection of infrared excesses around white dwarf stars with the Spitzer Space Telescope would solve the mystery of DAZ white dwarfs once and for all.  A number of years later I would attend a meeting dedicated to white dwarf debris disks.  There were maybe 50 people in attendance, and all the speakers in talk after talk paid homage to the founder of their field of study - Mike.  Even though my science had moved off in a different direction, I was in awe of what became of that day in his office.
I remember Mike telling me how to read scientific papers with a critical eye (ie, don't trust everything you read) because sometimes a theory is just plain wrong.  I also remember that we did occasionally disagree, especially as I progressed through the second half of my thesis - a search for transiting exoplanets using archival 2MASS data.  I took our collegial disagreements to mean that I was maturing into the scientific field, that I had gotten to the point where I knew more about what I was talking about than he did.   Whether that was true or not, our mentor-advisor relationship was always professional and full of mutual respect.

After I left UCLA, Mike would stay a part of my life.  He tirelessly wrote over 100 letters of recommendation for me as I moved on from seeking postdoc jobs to faculty jobs.  He was always supportive, even until the very end this past Friday night when I got his last email.

Mike, you will be missed, and your legacy in astronomy will not be forgotten.  Maybe someday your remains will scatter in the atmosphere of the white dwarf star that will be left behind when our Sun dies.