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