63 lines
1.4 KiB
Python
63 lines
1.4 KiB
Python
#! /usr/bin/python3
|
|
|
|
import numpy as np
|
|
import pandas as pd
|
|
import matplotlib.pyplot as plt
|
|
|
|
lognum = 2
|
|
|
|
plt.ioff()
|
|
plt.style.use('bmh')
|
|
plt.rcParams['axes.facecolor'] = 'white'
|
|
fig, axa = plt.subplots(1, figsize=(8,4), sharex='all', gridspec_kw={'height_ratios': [1]})
|
|
axa = [axa]
|
|
data = pd.read_csv("./log_poticalib_ana_{:02d}.csv".format(lognum))
|
|
|
|
print(data)
|
|
|
|
#plt.errorbar(
|
|
# data['time'],
|
|
# data['act_curr_ps'],
|
|
# yerr=data['act_curr_ps']*.002,
|
|
# label="Spannungsquelle Ausgang",
|
|
# fmt='.'
|
|
#)
|
|
#plt.errorbar(
|
|
# data['time'],
|
|
# data['act_curr_el']-.125,
|
|
# label="Elektronische Last Eingang",
|
|
# fmt='.'
|
|
#)#
|
|
|
|
data['val_poti'] = data['val_poti'].map(lambda x: int(x, base=16))
|
|
data['r_bcu/kohm'] = 2*4.7+1/(1/data['r_restheo/kohm']+1/75)
|
|
|
|
data['v_bcutheo/v'] = 0.7+0.7*30.1/(data['r_bcu/kohm']+6.49)
|
|
|
|
axa[0].errorbar(
|
|
data['r_bcu/kohm'],
|
|
data['v_keith/v'],
|
|
yerr=data['dv_keith/v'],
|
|
label="V$_{Keith,1.8V,ana}$",
|
|
fmt='.'
|
|
)
|
|
axa[0].errorbar(
|
|
data['r_bcu/kohm'],
|
|
data['v_pit/v'],
|
|
yerr=data['dv_pit/v)'],
|
|
label="V$_{PIT,1.8V,ana}$",
|
|
fmt='.'
|
|
)
|
|
axa[0].plot(
|
|
data['r_bcu/kohm'],
|
|
data['v_bcutheo/v'],
|
|
label="V$_{BCU,O}$"
|
|
)
|
|
|
|
axa[0].set_xlabel('$R_{BCU,Set}$/k$\Omega$')
|
|
#axa[1].set_ylabel('Residuals / %$_{err}$')
|
|
axa[0].set_ylabel('V$_{1.8V, Analog}$/V')
|
|
axa[0].legend()
|
|
|
|
plt.savefig("adccalib_{:02d}.pdf".format(lognum), transparent=True)
|