diff --git a/common/helpers.py b/common/helpers.py index d262b64..b494d4d 100644 --- a/common/helpers.py +++ b/common/helpers.py @@ -65,7 +65,7 @@ def pos_ext_from_data_ext(ext): if WFPC2.DATA_FILE_EXT.__contains__(ext): return WFPC2.POS_FILE_EXT - logging.error("Couldn't find a match for %s" % ext) + raise ValueError("Couldn't find a match for extension: '{}'".format(ext)) class TimeoutError(Exception): diff --git a/common/instruments.py b/common/instruments.py index e040df6..0001f1f 100644 --- a/common/instruments.py +++ b/common/instruments.py @@ -86,3 +86,5 @@ def instrument_from_name(name): if WFPC2.NAME == name: return WFPC2 + + raise ValueError("Unknown instrument name: '{}'".format(name)) diff --git a/lib/crstats.py b/lib/crstats.py index ac30224..3f3989b 100644 --- a/lib/crstats.py +++ b/lib/crstats.py @@ -35,7 +35,7 @@ def calculate(crs, normalized_img): flux = 0 for coord in cr.coords: flux += normalized_img[coord[0]][coord[1]] - flux_crs.append(flux) + flux_crs.append(flux) flux_std = std(flux_crs) flux_skew = skew(asarray(flux_crs))