pmaxted / pycheops

Python module for the analysis of light curves from the ESA Cheops mission
http://cheops.unibe.ch/
GNU General Public License v3.0
21 stars 15 forks source link

KELT-11 tutorial: error accesing data #314

Closed piacortes closed 4 months ago

piacortes commented 6 months ago

Hi

I started the KELT-11 tutorial from scratch. I got an error when tryng to access to the light curve using pycheops

To get the KELT-11 data file I'm using:

from dace_query.cheops import Cheops

kelt11 = Cheops.download(filters={'file_key': {'contains': ['CH_PR300024_TG000101_V0101']}}, file_type='images', output_directory='/Users/pcz1/pycheops/data', output_filename='CH_PR300024_TG000101_V0101.tgz')

And then to access to the light curve:

from pycheops import Dataset file_key = "CH_PR300024_TG000101_V0101" D = Dataset(file_key) aperture = "OPTIMAL" time, flux, flux_err = D.get_lightcurve(aperture=aperture,decontaminate = True) plt.plot(time, flux, "k.") plt.title(D.target + " - aperture = " + aperture) plt.xlabel("BJD Date (d)") plt.ylabel("Normalised Flux")

However, I got the following error:

Exception Traceback (most recent call last) Cell In[146], line 3 1 from pycheops import Dataset 2 file_key = \"CH_PR300024_TG000101_V0101\" ----> 3 D = Dataset(file_key) 4 aperture = \"OPTIMAL\" 5 time, flux, flux_err = D.get_lightcurve(aperture=aperture,decontaminate = True)

File ~/anaconda3/envs/pycheops/lib/python3.12/site-packages/pycheops/dataset.py:434, in Dataset.__init__(self, file_key, source, force_download, download_all, configFile, target, verbose, metadata, view_report_on_download) 432 datafile = list(filter(r.match, self.list)) 433 if len(datafile) == 0: --> 434 raise Exception('Requested light curve not in this Dataset.') 435 if len(datafile) > 1: 436 raise Exception('Multiple light curve files in datset')

Exception: Requested light curve not in this Dataset."

pmaxted commented 4 months ago

Problem was due to a corrupt .lis file.