Automatic commit. Thu Sep 27 00:00:07 WST 2012
[matches/honours.git] / research / TCS / interface.py
index b008284..7b3c0e1 100755 (executable)
@@ -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:

UCC git Repository :: git.ucc.asn.au