Focused vs. Unfocused Differential Photometry: Observations of Exoplanets WASP-59b and WASP-33b

Defocusing is a technique used to capture photometry data by researchers to achieve a higher signal-to-noise ratio and therefore a smaller error in data. Since the light is spread over a much larger area of pixels on the CCD chip, the exposure time can also be increased, which helps to “smear out” the images and gather more photons. My research group wanted to try and quantify this, as well as do some observations of exoplanet transits. The theory is that when the light is only on a few pixels, variance and distortion on any of those pixels has a large effect on the data but with defocusing, the light is spread over a much larger pixel area so that if a few pixels are varying in any given image, the data set as a whole isn’t effected that much. Exoplanets are great for this type of observation since we are looking purely at the amount of light and no visual resolution is needed.

WASP-33b focused point spread function.

WASP-33b focused point spread function.

WASP-33b defocused point spread function. This created a very nice "donut".

WASP-33b defocused point spread function. This created a very nice “donut”.

Our research was done at the Cal Poly State University observatory, a 14 inch Meade LX-600 ACF telescope and an SBIG CCD camera. We were able to get three data sets: one for WASP-59b (13th magnitude host star) that was in focus, and two for WASP-33b (8th magnitude host star), one in focus and one out of focus. PyRAF was used for the data reduction and differential photometry process, but some custom tools were written to deal with the data sets. A tool called “daofind” creates lists of stars that meet certain criteria in each image of the data set so that you can use these stars to calculate photometric values such as magnitude and SNR. Unfortunately, it is not very good at keeping “found stars” consistent between images. Star #1 in image #1 is not necessarily star #1 in image #2, and so on. This is not a good problem when there are hundred or thousands of images. The tool I wrote compares all of the stars found in a given image against the stars from the previous images and if the x, y, and magnitude all change less than a certain threshold, it considers it to be the same star. This aligns the data that gets dumped and makes it easy to complete photometry.

These are some of our resulting light curves along with the binned curve that was used to estimate the transit start/stop times (marked with the yellow lines) and depth of the magnitude delta.

We obtained some great measurements of the transiting exoplanets. The defocused data was much easier to reduce and we did not throw out a single data point. With the other two focused runs, many data points were missing for comparison stars or the primary target and had to be omitted. Keep in mind, these graphs look differently because the data from WASP-33b focused contained about 2500 images since they had to be taken at 2.5 second exposure times. Focusing all of the star’s light onto a few pixels means that saturation is reached quickly, so this was the maximum exposure time that we could use. Defocusing allowed us to increase the exposure time to 15 seconds, so the data is naturally less noisy and there are far fewer data points in the graph. Defocusing also increased the SNR by a factor of 12.5 to 20.

While we could not draw a direct conclusion about the defocusing technique being the factor that made the data much better, the defocused data set was much less variant over the period of the transit than either of the two focused data sets and had a much larger SNR. We need to get more telescope time in order to draw a better and more quantitative result, but so far this looks very promising.

Double Star Data Reduction

An example of the output data plots. The first two show a slice of the original data before processing. The last four plots show the data after being processed.

I have posted my first version of Python code on github which can process through large groups of FITS data cubes for reduction. The main features are breaking up FITS files into smaller pieces, writing the header data into a CSV file for an easy “log” of your observation run, and align, stack, and process double star images down to a single, pristine image. This was only my first attempt at doing the processing, and I was able to get it working fairly easily using some of the scientific Python modules such as NumPy, SciPy, Matplotlib, and PyFITS.

I chose to work with the FITS data cubes since that seems to be the widest accepted format of astronomical data, and also is an open standard that can be manipulated by anyone. The basic workflow for alignment goes something like this:

  1. Select the first slice of data from the FITS cube as the “reference” slice to which all other slices will be aligned.
  2. Normalize it based on a range set by the user.
  3. Select the data from that slice which is over a certain threshold set by the user. This allows a variable amount of background to be filtered out, depending on the sensitivity and noise in the data set.
  4. Using this “good” data, use “scipy.ndimage.measurements.center_of_mass” to find the center of mass of this first reference slice. These coordinates are used as the center to shift all of the other slices to later.
  5. Now that the center coordinates have been determined, start processing the rest of the slices. The first thing is to run “scipy.ndimage.filters.gaussian_laplace” over the slice which helps bring out the bright parts and eliminate the less bright parts.
  6. Find the center of mass of this individual slice.
  7. Normalize the data based on the range set by the user.
  8. Shift the data for this slice by the difference between the reference slice center of mass and this individual slice’s center of mass.
  9. Add the processed data for this slice into a NumPy ndarray of processed data.
  10. Repeat steps 5-9 for the rest of the slices in the data cube.
  11. Once completed and there is an array of processed data, use NumPy to take the mean of this processed data stack. This is the final stacked image.

An example of a double star slice before processing.

Once the final stacked image comes out the end, there are many things that can be done. For now, I’ve implemented a simple hack to guess the position of the primary and secondary stars by finding the coordinates of the “brightest spot”, i.e. maximum value on the stacked image (this is the primary star, in theory), then temporarily making a second copy of the stacked image, zeroing out all of the values for a 10 x 10 pixel box around the bright spot, and then repeating the process to find the next “brightest spot” (maximum value) which should be the secondary star. While this method is admittedly imprecise, it seems to have no problem finding both stars for most of the hundreds of data sets I have tested with. Of course, this assumes that the proper threshold and sigma values for the Laplacian filter have been used.

This is the processed image, with a clear double star and ready for easy measurement.

There are plenty of improvements to be made, and this was just a proof-of-concept which had great results. I want to work more on integrating the calibration values so that final results can be obtained automatically. There might be a better way to figure out the positions of the primary and secondary stars using K-means. I’m not sure on that one yet, it requires more research. There are also other ways to reduce the data which may prove to be better than the Laplace filter, but that was the path of least resistance and provided excellent results for a first trial.