Commit 7a894d5d authored by Arnaud WATLET's avatar Arnaud WATLET
Browse files

Fixes issue on delay for selecting samples

Showing with 5 additions and 5 deletions
+5 -5
...@@ -294,12 +294,12 @@ class OhmPiHardware: ...@@ -294,12 +294,12 @@ class OhmPiHardware:
def select_samples(self, delay=0.): def select_samples(self, delay=0.):
x = [] x = []
for pulse in range(int(max(self._hw.readings[:, 1]))): for pulse in range(int(max(self.readings[:, 1]))):
v = np.where((self._hw.readings[:, 1] == pulse))[0] v = np.where((self.readings[:, 1] == pulse))[0]
t_start_pulse = min(self._hw.readings[v, 0]) t_start_pulse = min(self.readings[v, 0])
x.append(np.where((k._hw.readings[:, 0] >= t_start_pulse + delay) & (self._hw.readings[:, 2] != 0) & ( x.append(np.where((self.readings[:, 0] >= t_start_pulse + delay) & (self.readings[:, 2] != 0) & (
self._hw.readings[:, 1] == pulse))[0]) self.readings[:, 1] == pulse))[0])
x = np.concatenate(np.array(x)) x = np.concatenate(np.array(x))
return x return x
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment