Skip to content

Commit 18564cf

Browse files
committed
Update test_windef.py and windef.py
1 parent 0807457 commit 18564cf

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

openpiv/test/test_windef.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def test_multi_pass_lin():
134134
assert np.mean(np.abs(v_old - shift_v)) < threshold
135135

136136
for i in range(1, iterations):
137-
x, y, u, v, sn = windef.multipass_img_deform(
137+
x, y, u, v, _ = windef.multipass_img_deform(
138138
frame_a,
139139
frame_b,
140140
window_size[i],

openpiv/windef.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -638,19 +638,19 @@ def multipass_img_deform(
638638
u_pre = np.ma.masked_array(u_pre, mask=mask)
639639
v_pre = np.ma.masked_array(v_pre, mask=mask)
640640

641-
if settings.show_plot:
642-
plt.figure()
643-
plt.quiver(x_old, y_old, u_old, v_old,color='b')
644-
plt.quiver(x_int, y_int, u_pre, v_pre,color='r')
645-
plt.gca().invert_yaxis()
646-
plt.gca().set_aspect(1.)
641+
# if settings.show_plot:
642+
# plt.figure()
643+
# plt.quiver(x_old, y_old, u_old, v_old,color='b')
644+
# plt.quiver(x_int, y_int, u_pre, v_pre,color='r')
645+
# plt.gca().invert_yaxis()
646+
# plt.gca().set_aspect(1.)
647647

648648
# @TKauefer added another method to the windowdeformation, 'symmetric'
649649
# splits the onto both frames, takes more effort due to additional
650650
# interpolation however should deliver better results
651651

652-
old_frame_a = frame_a.copy()
653-
old_frame_b = frame_b.copy()
652+
# old_frame_a = frame_a.copy()
653+
# old_frame_b = frame_b.copy()
654654

655655
if deformation_method == "symmetric":
656656
# this one is doing the image deformation (see above)
@@ -669,11 +669,11 @@ def multipass_img_deform(
669669
else:
670670
raise Exception("Deformation method is not valid.")
671671

672-
if settings.show_plot:
673-
plt.figure()
674-
plt.imshow(frame_a-old_frame_a)
675-
plt.figure()
676-
plt.imshow(frame_b-old_frame_b)
672+
# if settings.show_plot:
673+
# plt.figure()
674+
# plt.imshow(frame_a-old_frame_a)
675+
# plt.figure()
676+
# plt.imshow(frame_b-old_frame_b)
677677

678678
if (
679679
do_sig2noise is True and # and also the last one is optional?
@@ -718,12 +718,12 @@ def multipass_img_deform(
718718
u = np.ma.masked_array(u, mask=mask)
719719
v = np.ma.masked_array(v, mask=mask)
720720

721-
if settings.show_plot:
722-
plt.figure()
723-
plt.quiver(x_int, y_int, u, v,color='r')
724-
plt.quiver(x_int, y_int, u_pre, v_pre,color='b')
725-
plt.gca().invert_yaxis()
726-
plt.gca().set_aspect(1)
721+
# if settings.show_plot:
722+
# plt.figure()
723+
# plt.quiver(x_int, y_int, u, v,color='r')
724+
# plt.quiver(x_int, y_int, u_pre, v_pre,color='b')
725+
# plt.gca().invert_yaxis()
726+
# plt.gca().set_aspect(1)
727727

728728
return x, y, u, v, s2n
729729

0 commit comments

Comments
 (0)