Skip to content

Commit

Permalink
Make sure we enter loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
vasole committed Oct 2, 2015
1 parent 7cbd5c4 commit 93f7887
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions PyMca5/PyMcaMath/ImageRegistration.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# The PyMca X-Ray Fluorescence Toolkit
#
# Copyright (c) 2004-2014 European Synchrotron Radiation Facility
# Copyright (c) 2004-2015 European Synchrotron Radiation Facility
#
# This file is part of the PyMca X-ray Fluorescence Toolkit developed at
# the ESRF by the Software group.
Expand Down Expand Up @@ -31,7 +31,7 @@
__contact__ = "sole@esrf.fr"
__license__ = "MIT"
__copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
__date__ = "20131028"
__date__ = "20151002"
__doc__ = "This is a python module to measure image offsets"

import os, time
Expand All @@ -40,7 +40,7 @@
PYMCA = False
SCIPY = False
try:
from PyMca5 import SpecfitFuns
from PyMca5.PyMca import SpecfitFuns
PYMCA = True
except ImportError:
try:
Expand Down Expand Up @@ -180,6 +180,10 @@ def measure_offset_from_ffts(img0_fft2, img1_fft2, withLog=False):
a01 = int(min(a0+w+1, shape[0]))
a10 = int(max(a1-w, 0))
a11 = int(min(a1+w+1, shape[1]))
if a00 == a01:
a01 = a00 + 1
if a10 == a11:
a11 = a10 + 1
for i in range(a00, a01):
for j in range(a10, a11):
if res[i, j] > 0.1 * resmax:
Expand Down

0 comments on commit 93f7887

Please sign in to comment.