Skip to content

Commit

Permalink
Check that FOCUS is a number, not string
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiopasra committed Dec 28, 2016
1 parent b8e06d7 commit 770080b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion megaradrp/validators.py
Expand Up @@ -32,7 +32,10 @@ def validate_focus(obresult):
for idx, frame in enumerate(obresult.frames):
with frame.open() as img:
try:
focus_val = img[0].header['focus']
focus_val = img[0].header['FOCUS']
# FIXME: This should be done using an scheme for MEGARA
if not isinstance(focus_val, (int, float)):
raise ValidationError("FOCUS must be integer, not {}".format(type(focus_val)))
if focus_val not in image_groups:
image_groups[focus_val] = []
image_groups[focus_val].append(frame)
Expand Down

0 comments on commit 770080b

Please sign in to comment.