Giter VIP home page Giter VIP logo

Comments (3)

orionlee avatar orionlee commented on July 3, 2024 1

Essentially a duplicate of #1377 .

#1377 talks about downloading lightcurve files but the underlying issue applies to targetpixelfile.

An interim workaround, before either lightkurve has a new release or MAST fixed its issue.

sr = lk.search_targetpixelfile('TIC 419012256')
sr.table["dataURL"] = sr.table["dataURI"]  # workaround MAST issue
tpf = sr.download()

from lightkurve.

github-actions avatar github-actions commented on July 3, 2024

Hi there! πŸ‘‹ Thank you for opening your first Lightkurve issue! πŸ™ One of our maintainers will get back to you as soon as possible. πŸ‘©β€πŸš€ You can expect a response within 7 days. πŸ“… If you haven’t heard anything by then, feel free to ping this thread. πŸ›ŽοΈ We love that you are using Lightkurve and appreciate your feedback. πŸ‘

from lightkurve.

CCBeard avatar CCBeard commented on July 3, 2024

I'm having a very similar error involving simply downloading photometry for the system Kepler-37. Strangely, this seems to only affect certain stars, and the following code works perfectly fine for a different system I'm working on, Kepler-21. Notably, the code works fine without the "download" or "download_all" methods, so I'm guessing the error originates there.

import lightkurve as lk
lcfs = lk.search_lightcurve('Kepler-37', mission='Kepler', quarter=[6,7]).download_all()

The following error is printed:

KeyError Traceback (most recent call last)
in
13 #############################################
14
---> 15 lcfs = lk.search_lightcurve(Starname, mission='Kepler', quarter=[6,7]).download_all()
16 lc = lcfs.PDCSAP_FLUX.stitch()
17 print(len(lc))

~/anaconda3/envs/exoenv/lib/python3.9/site-packages/lightkurve/utils.py in wrapper(*args, **kwargs)
564 sys.stdout = devnull
565 try:
--> 566 return f(*args, **kwargs)
567 # restore to default
568 finally:

~/anaconda3/envs/exoenv/lib/python3.9/site-packages/lightkurve/search.py in download_all(self, quality_bitmask, download_dir, cutout_size, **kwargs)
501 for idx in range(len(self.table)):
502 products.append(
--> 503 self._download_one(
504 table=self.table[idx : idx + 1],
505 quality_bitmask=quality_bitmask,

~/anaconda3/envs/exoenv/lib/python3.9/site-packages/lightkurve/search.py in _download_one(self, table, quality_bitmask, download_dir, cutout_size, **kwargs)
349 from astroquery.mast import Observations
350
--> 351 download_url = table[:1]["dataURL"][0]
352 log.debug("Started downloading {}.".format(download_url))
353 download_response = Observations.download_products(

~/anaconda3/envs/exoenv/lib/python3.9/site-packages/astropy/table/table.py in getitem(self, item)
2068 def getitem(self, item):
2069 if isinstance(item, str):
-> 2070 return self.columns[item]
2071 elif isinstance(item, (int, np.integer)):
2072 return self.Row(self, item)

~/anaconda3/envs/exoenv/lib/python3.9/site-packages/astropy/table/table.py in getitem(self, item)
261 """
262 if isinstance(item, str):
--> 263 return OrderedDict.getitem(self, item)
264 elif isinstance(item, (int, np.integer)):
265 return list(self.values())[item]

KeyError: 'dataURL'

I am using lightkurve version 2.4.1 on Mac Sonoma 14.0, python version 3.9.2

from lightkurve.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.