Commit e010b4e8 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Changes the way R and R_std are computed taking sp into account

Showing with 2 additions and 2 deletions
+2 -2
...@@ -459,8 +459,8 @@ class OhmPi(object): ...@@ -459,8 +459,8 @@ class OhmPi(object):
else: else:
delay = 0. delay = 0.
x = np.where((self._hw.readings[:, 0] >= delay) & (self._hw.readings[:, 2] != 0)) x = np.where((self._hw.readings[:, 0] >= delay) & (self._hw.readings[:, 2] != 0))
R = np.mean(self._hw.readings[x, 2]*self._hw.readings[x, 4])/np.median(self._hw.readings[x, 3]) R = np.mean((self._hw.readings[x, 2] * self._hw.readings[x, 4] - self._hw.sp) / self._hw.readings[x, 3])
R_std = 100. * np.std(self._hw.readings[x, 2] * (self._hw.readings[x, 4] - self._hw.sp) / self._hw.readings[x, 3]) / R R_std = 100. * np.std((self._hw.readings[x, 2] * self._hw.readings[x, 4] - self._hw.sp) / self._hw.readings[x, 3]) / R
d = { d = {
"time": datetime.now().isoformat(), "time": datetime.now().isoformat(),
"A": quad[0], "A": quad[0],
......
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