etspy.align.apply_shifts(stack: TomoStack, shifts: TomoShifts | ndarray, method: 'interp' | 'fourier' = 'fourier') TomoStack[source]

Apply a series of shifts to a TomoStack.

Parameters:
stack: TomoStack

The image series to be aligned

shifts: TomoShifts | ndarray

The X- (tilt parallel) and Y-shifts (tilt perpendicular) to be applied to each image. Should be of size (*stack.axes_manager.navigation_shape[::-1], 2), with Y-shifts in the shifts[:, 0] position and X-shifts in shifts[:, 1] position (if shifts is a ndarray).

method: 'interp' | 'fourier' = 'fourier'

Image shifts can be applied using either interpolation via scipy.ndimage.shift or via Fourier shift as implemented in scipy.ndimage.fourier_shift. Must be either ‘interp’ or ‘fourier’.

Returns:

shifted – Copy of input stack after shifts are applied

Return type:

TomoStack