@@ -28,6 +28,7 @@ def patch3d_design(
2828 nwin : Tuple [int , int , int ],
2929 nover : Tuple [int , int , int ],
3030 nop : Tuple [int , int , int ],
31+ verb : bool = True ,
3132) -> Tuple [
3233 Tuple [int , int , int ],
3334 Tuple [int , int , int ],
@@ -51,6 +52,9 @@ def patch3d_design(
5152 Number of samples of overlapping part of window.
5253 nop : :obj:`tuple`
5354 Size of model in the transformed domain.
55+ verb : :obj:`bool`, optional
56+ Verbosity flag. If ``verb==True``, print the data
57+ and model windows start-end indices
5458
5559 Returns
5660 -------
@@ -90,25 +94,26 @@ def patch3d_design(
9094 )
9195
9296 # print information about patching
93- logging .warning ("%d-%d-%d windows required..." , nwins0 , nwins1 , nwins2 )
94- logging .warning (
95- "data wins - start:%s, end:%s / start:%s, end:%s / start:%s, end:%s" ,
96- dwin0_ins ,
97- dwin0_ends ,
98- dwin1_ins ,
99- dwin1_ends ,
100- dwin2_ins ,
101- dwin2_ends ,
102- )
103- logging .warning (
104- "model wins - start:%s, end:%s / start:%s, end:%s / start:%s, end:%s" ,
105- mwin0_ins ,
106- mwin0_ends ,
107- mwin1_ins ,
108- mwin1_ends ,
109- mwin2_ins ,
110- mwin2_ends ,
111- )
97+ if verb :
98+ logging .warning ("%d-%d-%d windows required..." , nwins0 , nwins1 , nwins2 )
99+ logging .warning (
100+ "data wins - start:%s, end:%s / start:%s, end:%s / start:%s, end:%s" ,
101+ dwin0_ins ,
102+ dwin0_ends ,
103+ dwin1_ins ,
104+ dwin1_ends ,
105+ dwin2_ins ,
106+ dwin2_ends ,
107+ )
108+ logging .warning (
109+ "model wins - start:%s, end:%s / start:%s, end:%s / start:%s, end:%s" ,
110+ mwin0_ins ,
111+ mwin0_ends ,
112+ mwin1_ins ,
113+ mwin1_ends ,
114+ mwin2_ins ,
115+ mwin2_ends ,
116+ )
112117 return nwins , dims , mwins_inends , dwins_inends
113118
114119
@@ -485,10 +490,7 @@ def __init__(
485490 self .taps [- 1 , - 1 , - 1 ] = taprightbottomback
486491
487492 # define scalings
488- if scalings is None :
489- self .scalings = [1.0 ] * nwins
490- else :
491- self .scalings = scalings
493+ self .scalings = [1.0 ] * nwins if scalings is None else scalings
492494
493495 # check if operator is applied to all windows simultaneously
494496 self .simOp = False
@@ -576,7 +578,7 @@ def _apply_taper(self, ywins, iwin0, iwin1, iwin2):
576578 ywins [iwin0 , iwin1 , iwin2 ] = self .taps [1 , 1 , 1 ] * ywins [iwin0 , iwin1 , iwin2 ]
577579 return ywins
578580
579- @reshaped ()
581+ @reshaped
580582 def _matvec_savetaper (self , x : NDArray ) -> NDArray :
581583 ncp = get_array_module (x )
582584 if self .tapertype is not None :
@@ -630,7 +632,7 @@ def _rmatvec_savetaper(self, x: NDArray) -> NDArray:
630632 ).reshape (self .dims [3 ], self .dims [4 ], self .dims [5 ])
631633 return y
632634
633- @reshaped ()
635+ @reshaped
634636 def _matvec_nosavetaper (self , x : NDArray ) -> NDArray :
635637 ncp = get_array_module (x )
636638 if self .tapertype is not None :
@@ -727,7 +729,7 @@ def _matvec_nosavetaper(self, x: NDArray) -> NDArray:
727729 ] += xxwin
728730 return y
729731
730- @reshaped ()
732+ @reshaped
731733 def _rmatvec_nosavetaper (self , x : NDArray ) -> NDArray :
732734 ncp = get_array_module (x )
733735 ncp_sliding_window_view = get_sliding_window_view (x )
0 commit comments