File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -598,14 +598,14 @@ def _solve_candidate_ransac(
598598
599599 # Now we do a robust fit
600600 try :
601- coeffs = models .robust_polyfit (matched_peaks , matched_atlas , self .fit_deg )
601+ fit_coeffs = models .robust_polyfit (matched_peaks , matched_atlas , self .fit_deg )
602602
603603 except np .linalg .LinAlgError :
604604 self .logger .warning ("Linear algebra error in robust fit" )
605605 continue
606606
607607 # Get the residual of the fit
608- residual = self .polyval (matched_peaks , coeffs ) - matched_atlas
608+ residual = self .polyval (matched_peaks , fit_coeffs ) - matched_atlas
609609 residual [np .abs (residual ) > self .ransac_tolerance ] = self .ransac_tolerance
610610
611611 rms_residual = np .sqrt (np .mean (residual ** 2 ))
@@ -636,7 +636,7 @@ def _solve_candidate_ransac(
636636 # If the best fit is accepted, update the lists
637637 best_cost = cost
638638 best_inliers = n_inliers
639- best_p = coeffs
639+ best_p = fit_coeffs
640640 best_err = rms_residual
641641 best_residual = residual
642642 self .matched_peaks = list (copy .deepcopy (matched_peaks ))
You can’t perform that action at this time.
0 commit comments