darfix.core.imageRegistration.random_search#
- darfix.core.imageRegistration.random_search(data, optimal_shift, iterations, sigma=None, shift_approach='linear')[source]#
Function that performs random search to a set of images to find an improved vector of shifts (one for each image). For this, it adds to the optimal shift a series of random samples obtained from a multivariate normal distribution, and selects the one with best score.
- Parameters:
data (array_like) – Set of images.
optimal_shift (ndarray) – Array with two vectors with the linear shift found for axis y and x.
iterations (int) – Number of times the random search should be done.
sigma (number) – Standard deviation of the distribution.
shift_approach (Union[linear,`fft`]) – Name of the shift approach to be used. Default: linear.
- Returns:
A vector of length the number of images with the best shift found for every image.
- Return type:
ndarray