File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ def _run_interface(self, runtime):
195195 center = np .mean (data [mask ])
196196
197197 data -= center
198+ data [~ mask ] = 0
198199
199200 # Calculate collocation matrix from (possibly resized) image and knot grids
200201 colmat = sparse_hstack (
@@ -214,7 +215,7 @@ def _run_interface(self, runtime):
214215 alpha = self .inputs .ridge_alpha , fit_intercept = False , solver = "lsqr"
215216 )
216217 for attempt in range (3 ):
217- model .fit (colmat [ mask .reshape (- 1 ), :], data [ mask ] )
218+ model .fit (colmat , data .reshape (- 1 ))
218219 extreme = np .abs (model .coef_ ).max ()
219220 LOGGER .debug (f"Model fit attempt { attempt } : max(|coeffs|) = { extreme } " )
220221 # Normal values seem to be ~1e2, bad ~1e8. May want to tweak this if
You can’t perform that action at this time.
0 commit comments