Skip to content

Commit

Permalink
better error message if reduce versions clash, reduction.py
Browse files Browse the repository at this point in the history
  • Loading branch information
trmrsh committed Jun 4, 2021
1 parent becaea4 commit 3af816a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hipercam/reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,11 @@ def read(cls, filename, readcal=True):
if sect["version"] != hcam.REDUCE_FILE_VERSION:
# check the version
raise hcam.HipercamError(
"Version mismatch: file = {:s}, reduce = {:s}".format(
sect["version"], hcam.REDUCE_FILE_VERSION
)
f"Version mismatch: reduce file = {sect['version']}, reduce = {hcam.REDUCE_FILE_VERSION}"
"If your reduce file date is earlier than the reduce version, you may want to try"
f"updating it using the pipeline command 'rupdate {filename}'"
)
)

sect["scale"] = float(sect["scale"])
if sect["scale"] <= 0:
Expand Down

0 comments on commit 3af816a

Please sign in to comment.