separating file IO from `get_lightcurve`  function, and adding a `get_lightcurve_from_file` function which behaves like `get_lightcurve` did originally