def read_kepler_pklc(picklefile):
'''This turns the pickled lightcurve back into an lcdict.
'''
try:
with open(picklefile, 'rb') as infd:
lcdict = pickle.load(infd)
except UnicodeDecodeError:
with open(picklefile,'rb') as infd:
lcdict = pickle.load(infd, encoding='latin1')
LOGWARNING('pickle %s was probably from Python 2 '
'and failed to load without using "latin1" encoding. '
'This is probably a numpy issue: '
'http://stackoverflow.com/q/11305790' % checkplotpickle)
return lcdict
##########################
## KEPLER LC PROCESSING ##
##########################
评论列表
文章目录