aboutsummaryrefslogtreecommitdiff
path: root/data/2018-11-13/workup.py
blob: 8c4e0b03424a0e0db8972ad220017e45f7710643 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import pathlib
import numpy as np
import matplotlib.pyplot as plt

__here__ = pathlib.Path(__file__).parent

xi, r, l = np.genfromtxt('setpoint.txt', delimiter=',').T

xi /= 100  # put into proper scale

plt.plot(xi, r)
plt.scatter(xi, r, label='right')
plt.plot(xi, l)
plt.scatter(xi, l, label='left')

plt.xscale('log')
plt.yscale('log')

plt.xlabel('setpoint (mA)')
plt.ylabel('measured (mA)')
plt.grid()
plt.plot(xi, xi, c='k', alpha=0.5, lw=0.5)

plt.legend()

plt.savefig('setpoint.png', dpi=300, transparent=True)
plt.close()