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