Skip to content

Commit f86111a

Browse files
committed
perhaps a wrong variable name?
1 parent 7c74b66 commit f86111a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/rascal/calibrator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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))

0 commit comments

Comments
 (0)