From be0e864be765075e2b93537de3b5baa67e9c6acd Mon Sep 17 00:00:00 2001 From: X11MA Date: Thu, 3 Dec 2015 18:15:11 +0100 Subject: [PATCH] Closedown --- script/EnergyScan.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/script/EnergyScan.py b/script/EnergyScan.py index 8dbe02c..fce904d 100644 --- a/script/EnergyScan.py +++ b/script/EnergyScan.py @@ -45,7 +45,7 @@ def _startPlot(type): break e = energy.read() if (abs(e-cur)) > 0.1: - v = keithley_2a.read() / ((keithley_1a if (type==1) else keithley_3a).read() ) + v = - (keithley_2a.read() / ((keithley_1a if (type==1) else keithley_3a).read() )) p.getSeries(1).appendData(e,v) cur = e time.sleep(0.2) @@ -64,12 +64,12 @@ def stopPlot(): while quit_plot==False: time.sleep(0.001) -############################################################################### +############################PGM+ID1+ID2################################################### def switchpol(activeID, runtype): global pol_str - if activeID == 1: + if activeID == 1:ot caput(OTF_OFF1,OFFSET1) caput(OTF_OFF2,OFFSET2-40) #detune ID2 if runtype in ["+/-", "+"]: @@ -94,7 +94,11 @@ fid = get_next_fid(input_path, "o" + file_prefix) +############################################################################### #Prepare scan +############################################################################### +caput ("X11PHS-E:OPT","PGM+ID1+ID2") + number_of_scans = 1 if RUNTYPE in ["+/-", "+" , "-"]: caput(OTF_MODE1,1) # circ + in ID1 @@ -151,7 +155,7 @@ for scan_no in range(number_of_scans): try: #wait_channel(OTF_START, 'STOP', timeout = int(TIME*60), type = 's') - otf_start.waitValue(0, 30 + int(TIME*60)) + otf_start.waitValue(0, (15 + int(TIME*60)) *1000) except: print "******** OTF STOP TIMEOUT **********" otf_start.write(0)