Skip to content

Commit 99a1d97

Browse files
committed
New test for overlap setting change
1 parent 2bb8a49 commit 99a1d97

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

openpiv/test/test_process.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,26 @@ def test_fft_correlate():
156156
assert np.allclose(u, SHIFT_U, atol=THRESHOLD)
157157
assert np.allclose(v, SHIFT_V, atol=THRESHOLD)
158158

159+
160+
def test_new_overlap_setting():
161+
""" test of the new overlap setting changed on 19/11/2024"""
162+
frame_a, frame_b = create_pair(image_size=72)
163+
u, v, _ = piv(frame_a, frame_b,
164+
window_size=16,
165+
search_area_size=32,
166+
overlap=22)
167+
168+
assert u.shape == (5, 5) and v.shape == (5, 5)
169+
170+
u, v, _ = piv(frame_a, frame_b,
171+
window_size=16,
172+
search_area_size=32,
173+
overlap=21)
174+
assert u.shape == (4, 4) and v.shape == (4, 4)
175+
176+
u, v, _ = piv(frame_a, frame_b,
177+
window_size=16,
178+
search_area_size=32,
179+
overlap=19)
180+
assert u.shape == (4, 4) and v.shape == (4, 4)
181+

0 commit comments

Comments
 (0)