From f614a4b33187b46bf6e44e23a2311890aefcb371 Mon Sep 17 00:00:00 2001 From: X11MA Date: Thu, 3 Dec 2015 04:07:05 +0100 Subject: [PATCH] Script execution --- script/EnergyScan.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/script/EnergyScan.py b/script/EnergyScan.py index 382ade2..e206f9c 100644 --- a/script/EnergyScan.py +++ b/script/EnergyScan.py @@ -59,6 +59,7 @@ else: if RUNTYPE == "-": switchpol(2) # tune ID2 --> polarization: C- + polswitch = 0 else: switchpol(1) # tune ID1 --> polarization: C+ time.sleep(1.0) @@ -97,11 +98,13 @@ for scan_no in range(number_of_scans): convert_file(input_file, output_file, pol_str) plot_file(output_file, file_prefix+"_" + suffix) #"Scan " + str(scan_no+1)) - if polswitch == 1: - switchpol(2) # tune ID2 --> polarization:C- - polswitch = 0 - else: - polswitch = 1 + if RUNTYPE == "+/-": + if polswitch == 1: + switchpol(2) # tune ID2 --> polarization:C- + polswitch = 0 + else: + polswitch = 1 + switchpol(1) # tune ID1 --> polarization:C+ time.sleep(3.0) fid = fid + 1