frappy_psi.picontrol: fix error in overflow line fit
This commit is contained in:
@@ -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