local TESS lightcurves #1110
-
Hi all, cheers |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is an excellent question @barbierimauro. Thank you for asking! 👍 The only way Lightkurve currently supports loading all the light curves for a single TICID is via the archive search feature. For example, to obtain a collection = lightkurve.search_lightcurve("TIC 261136679", author="SPOC", exptime=120).download_all() This will not use the FITS files you already downloaded. Fortunately, it will cache all files in the cache directory ( A better solution to use the bulk-downloaded files on your disk may be to use Python's built-in import glob
import lightkurve as lk
ticid = 261136679
lightcurves = []
for filename in glob.glob(f"location/of/your/light/curves/*{ticid}*/*lc.fits"):
lightcurves.append(lk.read(filename))
collection = lk.LightCurveCollection(lightcurves) Alternatively, if you think Lightkurve should better support searching/loading light curves from your local disk, the best way to make this happen is to come up with an example of what the feature should look like (i.e., feel free to post a piece of pseudocode which doesn't work yet, but which you wish would work!) Does this help? I'd be curious to learn what you end up doing, so please report back! |
Beta Was this translation helpful? Give feedback.
This is an excellent question @barbierimauro. Thank you for asking! 👍
The only way Lightkurve currently supports loading all the light curves for a single TICID is via the archive search feature. For example, to obtain a
LightCurveCollection
which contains all the 2-minute light curves for "TIC 261136679" produced by the official SPOC pipeline, you can use:This will not use the FITS files you already downloaded. Fortunately, it will cache all files in the cache directory (
~/.lightkurve-cache
), so at least it won't download the same light curve more than once. It is possible to change the…