""" Example Parameters E1 = 634 E2 = 665 TIME = 2 PLOT_TYPE = 1 """ print "\nStarting energy scan - Parameters: ", print E1,E2,TIME run("utils") ############################################################################### #Prepare scan ############################################################################### file_prefix = time.strftime("%Y%m%d") open_vg10() time.sleep(0.5) open_vg11() time.sleep(0.5) open_vg12() time.sleep(0.5) open_vg13() ############################################################################### #Main scan loop ############################################################################### caput(OTF_E1, E1) caput(OTF_E2, E2) caput(OTF_TIME, TIME) caput(OTF_FTS,file_prefix) #caput(OTF_FID,fid) caput(ENERGY_SP, E1) wait_channel(ALL_DONE, 1, type = 'i') startPlot(PLOT_TYPE) otf_start.write(1) time.sleep(1.0) print "Running OTF scan" try: otf_start.waitValue(0, (15 + int(TIME*60)) *1000) except: print "******** OTF STOP TIMEOUT **********" otf_start.write(0) finally: stopPlot() time.sleep(1.0) plot_file(input_file) #"comment to supress plot ############################################################################### #Finishing scan ############################################################################### caput(ENERGY_SP, E1) close_vg13() print "Successfully Finished OTF scan"