Some code to do photometry with K2