ptypy.utils.array_utils.shift_zoom#
- ptypy.utils.array_utils.shift_zoom(c, zoom, cen_old, cen_new, **kwargs)#
Move array from center cen_old to cen_new and perform a zoom zoom.
This function wraps scipy.ndimage.affine_transform and uses the same keyword arguments.
Addiionally, it allows for complex input and out by complex overloading, see
complex_overload.- Parameters:
c (numpy.ndarray) – Array to shiftzoom. Can be float or complex
zoom (float) – Zoom factor
cen_old (array_like) – Center in input array c
cen_new (array_like) – Desired new center position in shiftzoomed array
- Returns:
Shifted and zoomed array
- Return type:
numpy.ndarray