davidwhogg / OWL

Hogg's messing with Kepler pixels
MIT License
0 stars 1 forks source link

How to go from `raw_cnts` to SAP flux? #2

Closed davidwhogg closed 10 years ago

davidwhogg commented 10 years ago

@dfm you claim that if you co-add the raw_cnts you get the SAP fluxes; what exactly do you do? Pseudo-code or actual code preferred to prose. CC @mrtommyb

dfm commented 10 years ago

That's not very easy but here's a snippet that will help:

# ...
with tpf.open() as hdu:
    table = hdu[1].data
    mask = hdu[2].data
bkg_sub_flux = table["FLUX"]
sap = np.sum(bkg_sub_flux[:, mask==3], axis=1)

# Compare...
with client.light_curves(kicid, sci_data_quarter=5)[0].open() as hdu:
    data = hdu[1].data["SAP_FLUX"]

print(sap - data)
davidwhogg commented 10 years ago

Cool! I will use the "FLUX" column for now until I have reasons to do otherwise.

mrtommyb commented 10 years ago

I may be wrong here but I think FLUX has been cosmic ray ‘corrected’. I can check fairly quickly if it would be useful.

Tom

On Mar 9, 2014, at 8:12 AM, David W. Hogg notifications@github.com wrote:

Cool! I will use the "FLUX" column for now until I have reasons to do otherwise.

— Reply to this email directly or view it on GitHub.

dfm commented 10 years ago

That's right it has been "corrected". It becomes exactly SAP if you sum FLUX over the optimal aperture.

On Sun, Mar 9, 2014 at 2:17 PM, Tom Barclay notifications@github.comwrote:

I wrong be off here but I think FLUX has been cosmic ray 'corrected' <- made much worse. I can check fairly quickly if it would be useful.

Tom

On Mar 9, 2014, at 8:12 AM, David W. Hogg notifications@github.com wrote:

Cool! I will use the "FLUX" column for now until I have reasons to do otherwise.

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHubhttps://github.com/davidwhogg/HLM/issues/2#issuecomment-37133845 .

Dan Foreman-Mackey http://dan.iel.fm

mrtommyb commented 10 years ago

You may want to consider putting the 'cosmic rays' back in.

davidwhogg commented 10 years ago

Yes, we do want to put the CRs back in; is there any easy way to do that?

davidwhogg commented 10 years ago

for now I am closing this "wontfix" but this is a to-do for the next round of awesome.