from openpiv.pyprocess import extended_search_area_piv as piv
import numpy as np
from test_process import create_pair, shift_u, shift_v, threshold, dist
frame_a, frame_b = create_pair(image_size=128)
def test_validation_peak2mean():
"""test of the simplest PIV run
default window_size = 32
"""
u, v, s2n = piv(frame_a, frame_b,
window_size=32,
sig2noise_method="peak2mean")
print(s2n)
assert np.min(s2n) > 100
def test_validation_peak2peak():
"""test of the simplest PIV run
default window_size = 32
"""
u, v, s2n = piv(frame_a, frame_b,
window_size=32,
sig2noise_method="peak2peak")
print(s2n)
assert np.min(s2n) > 2.
# %%timeit
test_validation_peak2mean()
test_validation_peak2peak()
[31651.50689355 7276.43203813 1070.1945963 286.64718398 181.2253235 271.44815387 499.77221408 505.2763263 527.12411827 530.67110432 1447.30059122 389.65655111 9658.23118895 21345.16202089 10011.43301824 3443.85733039] [5.79892078 6.71540125 5.82674561 6.95471397 5.37812978 6.59115116 7.81064533 7.41666389 6.01386887 7.99544287 5.0413923 6.38373715 6.02108702 7.60786248 5.52798591 6.47109895]