Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
| Download
Project: ModPhysLab
Views: 83
Kernel: Python 2 (Ubuntu Linux)

Plot SI22G Geiger Tube Data

Plot the count rate versus supply voltage

%matplotlib inline import numpy as np import matplotlib.pyplot as plt
tubeList = ["A02", "A03", "A04", "A05", "A06", "B03", "B04", "B06"] # "A06",
fig = plt.figure(figsize=(12,8)) ax = fig.add_subplot(111) for tube in tubeList: fileName = "tube_%s.csv" % (tube) print fileName myArray = np.genfromtxt(fileName, delimiter=',', comments='#') myArray = np.sort(myArray,0) volts = myArray[:,0] dVolts = myArray[:,1] countTimes = myArray[:,2] counts = myArray[:,3] CPM = counts / countTimes dCPM = np.sqrt(counts) / countTimes ax.errorbar(volts, CPM, xerr=dVolts, yerr=dCPM, fmt='-o', label=tube) ax.set_title("SI22G Geiger Tube Response") ax.set_xlabel("Voltage (V)") ax.set_ylabel("CPM") ax.set_xlim(200,450) ax.set_ylim(0,10000) ax.legend() ax.grid() fig.savefig("GeigerTubes.svg")
tube_A02.csv tube_A03.csv tube_A04.csv tube_A05.csv tube_A06.csv tube_B03.csv tube_B04.csv tube_B06.csv
Image in a Jupyter notebook