ekaterinailin / AltaiPony

Find flares in Kepler and TESS light curves. Notebooks for quickstart inside.
https://altaipony.readthedocs.io
MIT License
26 stars 10 forks source link

Can't use from_TargetPixel_source for short cadence Kepler data #49

Closed ceb8 closed 4 years ago

ceb8 commented 5 years ago

What needs to be created or improved?

from_TargetPixel_source seems to be the only way to get a lightcurve that is suitable for detrending, and it errors out on at least some short cadence inputs:

image

I think this is because even with a given KID and quarter, there can still be multiple results from the call to lightkurve.search_targetpixelfile().

Can you provide an example?

from altaipony.lcio import from_TargetPixel_source
flc = from_TargetPixel_source("9592705", quarter=9, cadence='short')

What is the goal / expected behaviour?

I guess there needs to be a way to either load more than one target pixel file, or to allow the user to choose which one when there are more than one in a sector.

Alternately there could be a target pixel file counterpart to from_KeplerLightCurve_file, from_KeplerTargetPixel_file or something.

ekaterinailin commented 5 years ago

I hope that this problem is solved now. The file reading has changed quit a bit but should work like this:

from altaipony.lcio import from_mast flc = from_mast(9592705, c=5, cadence="short", mode="TPF", mission="Kepler")

Let me know if that works for you. Note that you'll need the most recent version of AltaiPony for this.

Edit: short should be a string, of course >>> short -> "short"

ceb8 commented 4 years ago

@ekaterinailin Yes! Thanks so much.