In [5]:
d = loadtxt('./initial-value-distribution-cleanup.csv', delimiter=',')
plot(d)
m = d[:,0]
figure()
plot(m)
Out[5]:
In [6]:
last = 0
r=[]
for v in m:
if last != v:
r.append(v)
last=v
plot(r)
Out[6]:
In [9]:
print ("Mean: " + str(mean(r)))
print ("Median: " + str(median(r)))
stddev=sqrt(sum((r-median(r))**2)/size(r))
print ("Standard deviation: " + str(stddev))
hist(r)
xlabel("Value in free air")
ylabel("Count")
Out[9]:
Initial sensor value in free air: 210+-2
In [18]:
d = loadtxt('./initial-value-distribution2.csv', delimiter=',')
plot(d[:,0], label="Moisture")
plot(d[:,1], label="Temperature")
legend(loc=5)
title("Sensor initial value in free air experiment, 102 sensors")
Out[18]:
In [25]:
r=d[:,0]
print ("Mean: " + str(mean(r)))
print ("Median: " + str(median(r)))
stddev=sqrt(sum((r-median(r))**2)/size(r))
print ("Standard deviation: " + str(stddev))
figure( figsize=(10, 8))
hist(r)
xlabel("Value in free air, batch:1")
ylabel("Count")
Out[25]: