Skip to content

Commit 186cba8

Browse files
committed
updated test_process with SHIFT_U, V
1 parent 707437e commit 186cba8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

openpiv/test/test_process.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414

15-
THRESHOLD = 0.25
15+
THRESHOLD = 0.3
1616

1717
# define "PIV" shift, i.e. creating u,v values that we want to get
1818
# -5.5 pixels to the left and 3.2 pixels upwards
@@ -102,7 +102,7 @@ def test_extended_search_area_overlap():
102102

103103
def test_extended_search_area_sig2noise():
104104
""" test of the extended area PIV with sig2peak """
105-
frame_a, frame_b = create_pair(image_size=64, u=-3.5, v=2.1)
105+
frame_a, frame_b = create_pair(image_size=64, u=SHIFT_U, v=SHIFT_V)
106106
u, v, _ = piv(
107107
frame_a,
108108
frame_b,
@@ -112,8 +112,8 @@ def test_extended_search_area_sig2noise():
112112
subpixel_method="gaussian"
113113
)
114114

115-
assert np.allclose(u, -3.5, atol=THRESHOLD)
116-
assert np.allclose(v, 2.1, atol=THRESHOLD)
115+
assert np.allclose(u, SHIFT_U, atol=THRESHOLD)
116+
assert np.allclose(v, SHIFT_V, atol=THRESHOLD)
117117

118118

119119
def test_process_extended_search_area():

0 commit comments

Comments
 (0)