rofreq.py 583 Bytes
Newer Older
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
#!/usr/bin/python

import csv
import sys
import pylab

filename = sys.argv[1]
ofilename = sys.argv[2]

csv_reader = csv.reader(open(filename, 'rb'), delimiter=',')
x = []
y1 = []
y2 = []
for row in csv_reader:
    x.append(float(row[0]))
    y1.append(int(row[1]))
    y2.append(int(row[2]))

pylab.title(filename)
pylab.xlabel("Temperature (C)")
pylab.ylabel("Ring oscillator frequency (counts)")
pylab.scatter(x, y1, marker='+', color="red", label="Channel 1")
pylab.scatter(x, y2, marker='+', color="blue", label="Channel 2")
pylab.legend()
pylab.savefig(ofilename)
#pylab.show()