X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=research%2FTCS%2Finterface.py;h=7b3c0e15ea0a805622f59758c3e82067d42fdfc4;hb=42977a93534c13419167a935c5ff9b1f1ab00019;hp=b0082845cf675d0541ff51140d7bc9d66f67ac7f;hpb=edb262863a369fd23798655b3cfdc99515ca9a51;p=matches%2Fhonours.git diff --git a/research/TCS/interface.py b/research/TCS/interface.py index b0082845..7b3c0e15 100755 --- a/research/TCS/interface.py +++ b/research/TCS/interface.py @@ -62,7 +62,7 @@ ser = serial.Serial( #Using an ordered dictionary, so results will be determined (or prompted for) in this order. # Put things that are being changed a lot near the top of the list. parameters = odict.odict([ - ("Chamber Pressure" , None), # Chamber pressure now automatically determined + #("Chamber Pressure" , None), # Chamber pressure now automatically determined ("Venault Voltage" , None), ("Title" , None), ("Comment" , None), @@ -96,6 +96,7 @@ def getDate(): return str(datetime.datetime.now()).split(" ")[0] def getPressure(): + return 0.0 p = subprocess.Popen("./pressure/get_pressure.sh", stdout=subprocess.PIPE) return float(p.stdout.readline().strip(" \r\n\t")) @@ -218,8 +219,8 @@ def main(): # Experiment # TODO: Modify data to record here sweep = 1 - for i in range(0,5): - #while True: + #for i in range(0,5): + while True: os.system("mkdir -p " + getDate()) record_data([5], getDate()+"/"+str(getTime())+".dat", None, 4001) sweep += 1 @@ -299,7 +300,7 @@ def record_data(ADC_channels, output, pollTime = None, dac_max = None): for out in output: out.write("# Parameters:\n") - parameters["Chamber Pressure"] = getPressure() # Update chamber pressure + #parameters["Chamber Pressure"] = getPressure() # Update chamber pressure for field in parameters: for out in output: @@ -373,6 +374,8 @@ def record_data(ADC_channels, output, pollTime = None, dac_max = None): #gnuplot("set yrange [0:1023]") #gnuplot("set xrange [0:4000]") + gnuplot("set xlabel \"DAC (counts)\"") + gnuplot("set ylabel \"Sample Current (ADC counts)\"") gnuplot.plot(Gnuplot.Data(data, title="t = "+str(measure_time), with_="lp", using="2:3")) for out in output: if out != sys.stdout: