Commit 0b15c18a authored by Christopher Shallue's avatar Christopher Shallue
Browse files

Explicitly open .fits files in binary mode for Python3 compatibility.

parent c671a6cf
...@@ -160,7 +160,7 @@ def read_kepler_light_curve(filenames, ...@@ -160,7 +160,7 @@ def read_kepler_light_curve(filenames,
all_flux = [] all_flux = []
for filename in filenames: for filename in filenames:
with fits.open(open(filename, "r")) as hdu_list: with fits.open(open(filename, "rb")) as hdu_list:
light_curve = hdu_list[light_curve_extension].data light_curve = hdu_list[light_curve_extension].data
time = light_curve.TIME time = light_curve.TIME
flux = light_curve.PDCSAP_FLUX flux = light_curve.PDCSAP_FLUX
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment