diff --git a/test_measure_with_ohmpi_card_3_15.py b/test_measure_with_ohmpi_card_3_15.py index 50003f10c95135966ac3fd5ddd07687507e3d9ad..8a36a9827fb483e88790c6946af8454d258f74c2 100644 --- a/test_measure_with_ohmpi_card_3_15.py +++ b/test_measure_with_ohmpi_card_3_15.py @@ -1,4 +1,5 @@ import numpy as np +import matplotlib.pyplot as plt from utils import change_config change_config('config_ohmpi_card_3_15.py', verbose=False) from OhmPi.measure import OhmPiHardware @@ -7,4 +8,8 @@ k = OhmPiHardware() k._vab_pulse(vab=12, length=1., sampling_rate=10., polarity=1) r = k.readings[:,2]/k.readings[:,1] print(f'Mean resistance: {np.mean(r):.3f} Ohms, Dev. {100*np.std(r)/np.mean(r):.1f} %') +fig, ax = plt.subplots() +ax.plot(r[:,0], r[:, 1], '-r', label='current') +ax2 = ax.twinx() +ax.plot(r[:,0], r[:, 2], '-b', label='voltage') change_config('config_default.py', verbose=False)