Commit 79db161d authored by payno's avatar payno

[image] update image.py

parent 98e111f3
......@@ -25,13 +25,12 @@
from __future__ import absolute_import
__authors__ = ["D. Naudet"]
__authors__ = ["H> Payno"]
__license__ = "MIT"
__date__ = "01/11/2016"
__date__ = "14/11/2018"
import logging
from collections import namedtuple
import numpy
_logger = logging.getLogger(__file__)
......@@ -59,10 +58,6 @@ def shift_img(data, dx, dy):
nx, ny = numpy.meshgrid(numpy.linspace(xmin, xmax, xnum),
numpy.linspace(ymin, ymax, ynum))
# dy = 20.0
# dx = -50.0
res = abs(numpy.fft.ifft2(numpy.fft.fft2(data) * numpy.exp(
1.0j * 2.0 * numpy.pi * (dy * ny / ynum + dx * nx / xnum))))
return res
Markdown is supported
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