Skip to content

Commit

Permalink
valve calibration: plot shows value down to 0 ms opening time
Browse files Browse the repository at this point in the history
  • Loading branch information
bimac committed Sep 23, 2024
1 parent ca4ce3a commit 73b6a53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion iblrig/gui/valve.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def update(self):
if len(self.values.open_times_ms) < 2:
self._curve.setData(x=[], y=[])
else:
time_range = list(np.linspace(self.values.open_times_ms[0], self.values.open_times_ms[-1], 100))
time_range = list(np.linspace(0, self.values.open_times_ms[-1], 100))
self._curve.setData(x=time_range, y=self.values.ms2ul(time_range))

def clear(self):
Expand Down
2 changes: 1 addition & 1 deletion iblrig/valve.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def ms2ul(self, time_ms: NonNegativeFloat | Iterable[NonNegativeFloat]) -> NonNe
elif time_ms == 0.0:
return 0.0
else:
return self._polynomial(time_ms)
return max(np.append(self._polynomial(time_ms), 0.0))


class Valve:
Expand Down

0 comments on commit 73b6a53

Please sign in to comment.