def correlate_frames(self, method='gaussian'):
"""Correlation of all grid points, creating a velocity field.
:param str method: Method of the peak finding algorithm
"""
for i, j in np.ndindex(self.grid_spec.get_grid_shape()):
window_a, window_b = self._get_window_frames(i, j)
displacement = (self._correlator.get_displacement(window_a, window_b,
subpixel_method=method))
self.u[i, j] += displacement[0]
self.v[i, j] += displacement[1]
return self.u, self.v
评论列表
文章目录