From cfdb637f5d629abbe1cbac0b4bcc816aaac5e17c Mon Sep 17 00:00:00 2001 From: DIL5 Date: Tue, 11 Aug 2026 15:47:15 +0200 Subject: [PATCH] frappy_psi.picontrol: fix error in overflow line fit --- frappy_psi/picontrol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappy_psi/picontrol.py b/frappy_psi/picontrol.py index 73e84c16..ee50bf4c 100644 --- a/frappy_psi/picontrol.py +++ b/frappy_psi/picontrol.py @@ -160,7 +160,7 @@ class PImixin(HasOutputModule, Writable): output = omax if overflow: # fit a straight line - (slope, beg), cov = np.polyfit(range(self._overflow), self._overflow, 1, cov=True) + (slope, beg), cov = np.polyfit(range(len(self._overflow)), self._overflow, 1, cov=True) sign = np.copysign(1, overflow) end = beg + slope * len(self._overflow) # reduce the absolute value of overflow by the minimum distance of the fitted