Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot open Campaign 15 Target Pixel FITS files #88

Closed
StuartLittlefair opened this issue Mar 20, 2018 · 4 comments
Closed

Cannot open Campaign 15 Target Pixel FITS files #88

StuartLittlefair opened this issue Mar 20, 2018 · 4 comments

Comments

@StuartLittlefair
Copy link

StuartLittlefair commented Mar 20, 2018

After installing lightkurve on Anaconda python 3.6 (pip install lightkurve) and downloading a TPF FITS file from MAST (https://archive.stsci.edu/pub/k2/target_pixel_files/c15/249900000/14000/ktwo249914869-c15_spd-targ.fits.gz), I am unable to open with lightkurve

tpf = KeplerTargetPixelFile.from_fits_images(['ktwo249914869-c15_spd-targ.fits'])
...
FileNotFoundError: [Errno 2] No such file or directory: '/Users/sl/anaconda3/lib/python3.6/site-packages/lightkurve/data/tpf-ext0-header.txt'

I tried downloading tpf-ext0-header.txt etc, from kadenza after which the above command works, but when I produce a lightcurve it is empty...

@barentsen
Copy link
Collaborator

@StuartLittlefair Note that you are trying to open a Target Pixel File, so you want to execute KeplerTargetPixelFile('ktwo249914869-c15_spd-targ.fits'), not KeplerTargetPixelFile.from_fits_images('ktwo249914869-c15_spd-targ.fits')

(Nevertheless: this does expose a bug in from_fits_images, and it also shows that we should print a warning if someone tries to open a TPF using from_fits_images.)

@StuartLittlefair
Copy link
Author

Many thanks @barentsen and @christinahedges for the help, especially since this was a pretty basic user error on my part.

@barentsen would you like me to raise a separate issue for the pip packaging problem, or leave this one open?

@barentsen
Copy link
Collaborator

Let's leave the ticket open -- I expect to resolve this today!

barentsen added a commit that referenced this issue Mar 20, 2018
@barentsen
Copy link
Collaborator

The FileNotFoundError issue was resolved by adding a MANIFEST.in file to the repository. I made this a hotfix and released 1.0beta4 to pypi.

I will close this issue and open a separate one to have from_fits_images print a helpful warning if someone tries to use it to open TPFs, which is not what it's intended for.

@StuartLittlefair Many many thanks for the bug report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants