Commit 3cb0a1ca authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Tries to implement VMN sign within mb_2023 and mb_2024

Showing with 3 additions and 3 deletions
+3 -3
......@@ -377,7 +377,7 @@ class OhmPiHardware:
fig, ax = plt.subplots(nrows=5, sharex=True)
ax[0].plot(self.readings[:, 0], self.readings[:, 3], '-r', marker='.', label='iab')
ax[0].set_ylabel('Iab [mA]')
ax[1].plot(self.readings[:, 0], self.readings[:, 2] * (self.readings[:, 4] - self.sp) , '-b', marker='.', label='vmn')
ax[1].plot(self.readings[:, 0], self.readings[:, 4] - self.sp , '-b', marker='.', label='vmn')
ax[1].set_ylabel('Vmn [mV]')
ax[2].plot(self.readings[:, 0], self.readings[:, 2], '-g', marker='.', label='polarity')
ax[2].set_ylabel('polarity [-]')
......
......@@ -465,12 +465,12 @@ class OhmPi(object):
x = np.where((self._hw.readings[:, 0] >= delay) & (self._hw.readings[:, 2] != 0))
print(f'length of series: {len(x)}')
# R = np.mean((self._hw.readings[x, 2] * (self._hw.readings[x, 4] - self._hw.sp)) / self._hw.readings[x, 3])
Vmn = np.mean(self._hw.readings[x, 2] * (self._hw.readings[x, 4])) # - self._hw.sp))
Vmn = np.mean(self._hw.readings[x, 2] * (self._hw.readings[x, 4] - self._hw.sp))
Vmn_std = 100. * np.std(self._hw.readings[x, 2] * (self._hw.readings[x, 4])) # - self._hw.sp))
I = np.mean(self._hw.readings[x, 3])
I_std = 100. * np.std(self._hw.readings[x, 3])
R = Vmn / I
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, 4] - self._hw.sp) / self._hw.readings[x, 3]) / R
d = {
"time": datetime.now().isoformat(),
......
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