Commit 990f0518 authored by ssomnath's avatar ssomnath
Browse files

Attempting to avoid divide by zero error

parent 460493d3
......@@ -228,7 +228,10 @@ class BEodfTranslator(Translator):
num_pix = num_rows * num_cols
tot_bins = real_size / (num_pix * 4)
# Check for case where only a single pixel is missing.
check_bins = real_size / ((num_pix - 1) * 4)
if num_pix == 1:
check_bins = real_size / (num_pix * 4)
else:
check_bins = real_size / ((num_pix - 1) * 4)
if verbose:
print('\tChecking bins: Total: {}, actual: {}'.format(tot_bins,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment