Example #1
0

path_grupos = '/home/labosat/Desktop/Finazzi-Ferreira/Labo-7/Mediciones/Vbr/Mediciones LED prendido'
num_mediciones = 11
R_final = []
R_err_final = []
for i in np.arange(1, num_mediciones + 1):
    R_temp, R_err_temp, array = arrays(path_grupos + '/Estacionario %s' % i,
                                       0.025)
    R_final.append(f.weightedMean(R_temp, R_err_temp))
    R_err_final.append(f.weightedError(R_temp, R_err_temp))
    np.savetxt('array %s.txt' % i, array)

np.savetxt('R.txt', R_final)
np.savetxt('Rerr.txt', R_err_final)
#%%

data = np.loadtxt('/home/labosat/Desktop/Finazzi-Ferreira/Labo-7/12 (iv).txt')
I = data[:, 1]
V = data[:, 0]
I_err = f.error_I(I)
V_err = f.error_V(V)

I_log_err = [I_err[i] / I[i] for i in range(len(I))]

I_log = [np.log(i) for i in I]
V_temp, V_err_temp, I_temp, I_err_temp = f.DerivateData(
    V, V_err, I_log, I_log_err)

plt.plot(V_temp, I_temp, '.')
plt.errorbar(V_temp, I_temp, xerr=V_err_temp, yerr=I_err_temp, fmt='none')