darfix.core.imageRegistration.improve_linear_shift#
- darfix.core.imageRegistration.improve_linear_shift(data, v, h, epsilon, steps, nimages=None, shift_approach='linear')[source]#
Function to find the best shift between the images. It loops
steps
times, applying a different shift each, and trying to find the one that has the best result.- Parameters:
data (array_like) – The stack of images.
v (2-dimensional array_like) – The vector with the direction of the shift.
epsilon (float) – Maximum value of h
steps (int) – Number of different tries of h.
nimages (int) – The number of images to be used to find the best shift. It has to be smaller or equal as the length of the data. If it is smaller, the images used are chosen using numpy.random.choice, without replacement.
shift_approach (Union[linear,`fft`]) – The shift method to be used to apply the shift.
- Returns:
ndarray