One of the big problems with using Kepler data is that the data have large variations (well, tiny variations, but variations much bigger than a transit depth) caused by stellar variability and spacecraft sensitivity or pipeline issues. Starting on Friday, and continuing today, Foreman-Mackey worked on spline fitting along with our hometown favorite, iteratively re-weighted least squares. IRLS is much better than sigma-clipping, because the outlier data are down-weighted continuously (not rejected), and every data point, no matter how bad, has some influence on the fit. It is also an approximation to a probabilistic fit. (This is all being done prior to the probabilistic transit fitting, however, so it is still a hack.) The model we use for the variability is a cubic spline with knots every three days. In addition, today, we coded up a robust heuristic for identifying break-points where there are sensitivity discontinuities, where we need to add spline knots to follow the action. Our heuristic involves a matched filter applied to the re-weighted residuals (away from the spline fit) output by the IRLS. Anyway, it works really well and is fast (once we put it into Fortran).