{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Replicate Vanderburg & Johnson 2014 K2SFF Method" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In this notebook we will replicate the K2SFF method from [Vanderburg and Johnson 2014](http://adsabs.harvard.edu/abs/2014PASP..126..948V). The paper introduces a method for \"Self Flat Fielding\", by tracking how the lightcurve changes with motion of the spacecraft." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "from pyke import KeplerTargetPixelFile\n", "%matplotlib inline\n", "%config InlineBackend.figure_format = 'retina'\n", "import numpy as np\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [], "source": [ "#from oktopus import UniformPrior, JointPrior\n", "#from pyke import PRFPhotometry, SceneModel\n", "#from pyke.utils import KeplerQualityFlags" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Get data" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": true }, "outputs": [], "source": [ "#! wget https://www.cfa.harvard.edu/~avanderb/k2/ep60021426alldiagnostics.csv" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "df = pd.read_csv('ep60021426alldiagnostics.csv',index_col=False)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | BJD - 2454833 | \n", "Raw Flux | \n", "Corrected Flux | \n", "X-centroid | \n", "Y-centroid | \n", "arclength | \n", "Correction | \n", "Thrusters On | \n", "
---|---|---|---|---|---|---|---|---|
0 | \n", "1862.502368 | \n", "0.995119 | \n", "0.995985 | \n", "25.135097 | \n", "24.661074 | \n", "2.327480 | \n", "0.999130 | \n", "1.0 | \n", "
1 | \n", "1862.522801 | \n", "0.997313 | \n", "0.996767 | \n", "25.289752 | \n", "24.418689 | \n", "1.175322 | \n", "1.000548 | \n", "1.0 | \n", "
2 | \n", "1862.543235 | \n", "0.996713 | \n", "0.996136 | \n", "25.288052 | \n", "24.429406 | \n", "1.214627 | \n", "1.000580 | \n", "0.0 | \n", "
3 | \n", "1862.563668 | \n", "0.996930 | \n", "0.996277 | \n", "25.275216 | \n", "24.448405 | \n", "1.306617 | \n", "1.000656 | \n", "0.0 | \n", "
4 | \n", "1862.584102 | \n", "0.996862 | \n", "0.996228 | \n", "25.253864 | \n", "24.480184 | \n", "1.460259 | \n", "1.000636 | \n", "0.0 | \n", "