KeplerGO / pyke

Easy command line tools for Kepler, K2 & TESS data analysis.
http://pyke.keplerscience.org
118 stars 35 forks source link

Bad time format keyword in TPF/lightcurve file #113

Open lacalaca85 opened 7 years ago

lacalaca85 commented 7 years ago

I was working on this one: ktwo220142950-c08_spd-targ.fits, when kepconvert failed with the following:

Exception: ERROR -- KEPCONVERT: error converting time to ktwo220142950-c08_spd-targ.lc.txt: format must be one of ['jd', 'mjd', 'decimalyear', 'unix', 'cxcsec', 'gps', 'plot_date', 'datetime', 'iso', 'isot', 'yday', 'fits', 'byear', 'jyear', 'byear_str', 'jyear_str']

Apparently units are "BJD-2454833" in the light curve file generated by kepextract instead of the ones above.

lacalaca85 commented 7 years ago

Update: not limited to SC files. Same error for C7 and C10 files. This happens with python3.5 and Anaconda.

Tried with python2.7, got a different one:

KEPCONVERT started at: Mon Sep 25 09:31:29 2017 Traceback (most recent call last): File "/Users/lmolnar/.conda/envs/py27/bin/kepconvert", line 11, in sys.exit(kepconvert_main()) File "/Users/lmolnar/.conda/envs/py27/lib/python2.7/site-packages/pyke/kepconvert.py", line 432, in kepconvertmain args.baddata, args.overwrite, args.verbose, args.logfile) File "/Users/lmolnar/.conda/envs/py27/lib/python2.7/site-packages/pyke/kepconvert.py", line 120, in kepconvert if kepio.fileexists(outfile): File "/Users/lmolnar/.conda/envs/py27/lib/python2.7/site-packages/pyke/kepio.py", line 300, in fileexists if not os.path.isfile(file): File "/Users/lmolnar/.conda/envs/py27/lib/python2.7/genericpath.py", line 37, in isfile st = os.stat(path) TypeError: coercing to Unicode: need string or buffer, bool found

barentsen commented 7 years ago

Thanks for reporting this @lacalaca85.