frappy_psi.picontrol: fix error in overflow line fit
This commit is contained in:
1 parent
102358b933
commit
cfdb637f5d
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user