pyke icon indicating copy to clipboard operation
pyke copied to clipboard

Bad time format keyword in TPF/lightcurve file

Open lacalaca85 opened this issue 8 years ago • 2 comments

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 avatar Sep 16 '17 07:09 lacalaca85

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 kepconvert_main 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

lacalaca85 avatar Sep 25 '17 07:09 lacalaca85

Thanks for reporting this @lacalaca85.

barentsen avatar Sep 26 '17 01:09 barentsen