@@ -638,12 +638,12 @@ 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- # TODO: remove
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
@@ -669,11 +669,11 @@ def multipass_img_deform(
669669 else :
670670 raise Exception ("Deformation method is not valid." )
671671
672- # TODO: remove
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- # TODO: remove
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