From 4a1687a90b477b0bd5f1380884e121b326b125c5 Mon Sep 17 00:00:00 2001 From: Jonathan Fraine Date: Wed, 7 Mar 2018 22:29:19 -0500 Subject: [PATCH] Corrected astropy.io.fits.open call On `Line 163`, the previous edition sent `open(filename, 'r')` to `astropy.io.fits.open`. But the input value for `astropy.io.fits.open` is a string, as oppose to the `_io.TextIOWrapper`. I changed `line 163` to input `filename` instead of `open(...)` --- research/astronet/light_curve_util/kepler_io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/research/astronet/light_curve_util/kepler_io.py b/research/astronet/light_curve_util/kepler_io.py index 63193b7ba82..14dcc96d984 100644 --- a/research/astronet/light_curve_util/kepler_io.py +++ b/research/astronet/light_curve_util/kepler_io.py @@ -160,7 +160,7 @@ def read_kepler_light_curve(filenames, all_flux = [] for filename in filenames: - with fits.open(open(filename, "r")) as hdu_list: + with fits.open(filename) as hdu_list: light_curve = hdu_list[light_curve_extension].data time = light_curve.TIME flux = light_curve.PDCSAP_FLUX