Wednesday, November 20, 2013

Exoplanet Light-Curves with OSCAAR - Photometry for Everyone!

For our astrophysics club we have been doing some observations on Faulkes North over on Maui and managed to capture half of a transit before the weather shut down the telescope. At this observation session, we went through some tutorials on generating light-curves and discussed the general methodology (read about our Observation Observations) but I had wanted to find a more robust, and ideally easier, way for members to be analyzing the data in the future. After flirting with the idea of writing a comprehensive program I got some better sense and went looking for someone else who already had. Lo and behold, OSCAAR.

OSCAAR is a simple-to-use GUI that assists in the development of light-curves for exoplanets (and other eclipsing events). In their words, "oscaar is an open source project aimed at helping you begin to analyze observations of transiting extrasolar planets with differential photometry," and, "oscaar is useful for observers at small and large observatories alike, and users with any level of coding experience. No coding experience or PhD in astrophysics necessary!" Or, like the title says, "Photometry for Everyone!"

However, since the software is still in development (2.0-beta at time of writing) there are inherently some problems and I very quickly encountered these. Here are some initial notes about using and solving these problems, which will continue on into the future.


  • Initially the program required dark frames and flats. I created an Issue regarding this limitation, to which the authors immediately started working on a fix. Within a week or so this was adjusted to create a dummy dark and flat image (basically an array of same size as image consisting of 1s and 0s, respectively). The interface could probably use some work and will be contacting authors regarding this issue but overall I was very please and happy with the quick response. Thanks!
  • Region file must be in coordinate system (format: saoimage) or dies with bad error. This was not obvious nor the DS9 default so there was some confusion and digging on my part.
  • Exposure time is set in header as ‘DATE-OBS’, which should be selected (?) automatically. Had to go into Extra Observatory Parameters and select ‘DATE-OBS’ (which was the only option given) for it to work.
  • If selecting Tracking Plots and/or Photometry Plots, plots are given as running and seems to work well (see pretty pictures).
    Tracking and Photometry plots being generated while running.
      
  • When trying to do a fit a bunch of array output is given and then an error. Digging into it, it is a dimension error. Something about the comparison stars when doing a np.dot versus what is passed into the leastsq. Digging into the problem, it seems to be related to the issue seen here, with leastsq not knowing how to properly optimize a multi-dimensional array.
    • Well, after digging around for a while, it turns out that I just needed to use less comparison stars. I’m not sure if this is a bug or designed that way and will contact authors. Documentation refers to using as few as possible in order to increase speed but seems like an error should be handled a little better.


  • Half a light curve with fit for TrES 3-b
    After processing, I see a graph displaying my light-curve (well, I only have half a curve). The dialog box for the Dark and Flat are still displayed, which is a little confusing, it should close earlier. Then I am taken to a box asking for my result file names with a button for an MCMC Fit. I’m just accepting the default values for all the parameters, of which there are a lot.
  • This gives me an error finding analyticalTransitModel.so, which is a linked library, so might just be a problem with me running from the repo directory rather than installing.




  • Trying again the next day, I used the previously installed copy of OSCAAR (instead of the version from the repo) and had no problems with the analyticalTransitModel.so. I was able to download a copy of the exoplanets database (by entering Planet Name and choosing Update Parameters). This ran for 100 iterations, looking fancy and science-like, but then gave me an AssertionError saying that there was not successful optimization and to try new Beta values. Certainly, the error reporting could be a lot more user friendly. It suggests updating the Beta parameters but I really have no idea how to adjust them to get more (or any) appropriate results.

MCMC fit and plot. This is in the middle of the process which eventually errors out.


All in all I am impressed with the work done so far and look forward to working with the authors to help improve OSCAAR. I think there is some general clean-up work that could be done with the GUI (I notice there is a branch for a new GUI) in terms of using as well as when giving errors. I would also like to see a python3 version. The website talks about the dependencies but I think the only thing not ported to python3 directly is PyFITS and that has been rolled into astropy and should be working well so perhaps the port to python3 could happen soon (yes, that is sort of me volunteering).