Closedown
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
TRX=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:TRX.RBV|Read||true
|
||||
TRY=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:TRY.RBV|Read||true
|
||||
TRZ=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:TRZ.RBV|Read||true
|
||||
THT=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:THT.RBV|Read||true
|
||||
Temp=ch.psi.pshell.epics.ChannelDouble|X11MA-ES3-LSCI:TEMP.RBV|Read||true
|
||||
FE=ch.psi.pshell.epics.ChannelDouble|X11MA-FE:DSAPER|Read||true
|
||||
ES=ch.psi.pshell.epics.ChannelDouble|X11MA-OP2-SL:TRY.RBV|Read||true
|
||||
cff=ch.psi.pshell.epics.ChannelDouble|X11MA-PGM:rbkcff|Read||true
|
||||
Grating=ch.psi.pshell.epics.ChannelString|X11MA-PGM:grating|Read||true
|
||||
ID1_En=ch.psi.pshell.epics.ChannelDouble|X11MA-ID1:ENERGY-READ|Read||true
|
||||
ID2_En=ch.psi.pshell.epics.ChannelDouble|X11MA-ID2:ENERGY-READ|Read||true
|
||||
SLS_freq=ch.psi.pshell.epics.ChannelDouble|AGARF-TIM:BO-FREQ-GET|Read||true
|
||||
|
||||
@@ -12,8 +12,8 @@ Ni=825.0;890.0;2.0;10.0;-9.0;-11.5
|
||||
Ni Linear=825.0;890.0;2.0;10.0;-3.5;-5.5
|
||||
O=500.0;560.0;2.0;10.0;-7.5;-8.5
|
||||
Gd=1170.0;1240.0;2.0;10.0;-13.0;-11.5
|
||||
Cr=560.0;610.0;2.0;10.0;-7.5;-9.0
|
||||
Co=750.0;825.0;2.0;10.0;-9.5;-11.5
|
||||
Cr=560.0;610.0;2.0;5.0;-6.4;-7.5
|
||||
Co=750.0;825.0;2.0;5.0;-10.5;-12.0
|
||||
Mn=620.0;670.0;2.0;5.0;-7.5;-8.5
|
||||
Fe=680.0;750.0;2.0;10.0;-8.0;-9.0
|
||||
Fe=680.0;750.0;2.0;5.0;-8.2;-9.6
|
||||
Fe Linear=680.0;750.0;2.0;10.0;1.2;2.9
|
||||
|
||||
@@ -115,6 +115,7 @@ public class EnergyScan extends Panel {
|
||||
args.put("Cam_start", jSpinner1.getValue());
|
||||
args.put("Cam_end", jSpinner2.getValue());
|
||||
args.put("Save_array_data", jCheckBox4.isSelected() ? 1 : 2);
|
||||
args.put("Element", comboSetup.getSelectedItem().toString());
|
||||
|
||||
buttonAbort.setEnabled(true);
|
||||
|
||||
|
||||
+20
-8
@@ -49,7 +49,8 @@ ROUNDS = 1
|
||||
PLOT_TYPE = 1
|
||||
"""
|
||||
print "\nStarting energy scan - Parameters: ",
|
||||
print E1,E2,TIME,DELAY,OFFSET1,OFFSET2,RUNTYPE#,ALPHA1,ALPHA2
|
||||
print Element,E1,E2,TIME,DELAY,OFFSET1,OFFSET2,RUNTYPE#,ALPHA1,ALPHA2
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
@@ -80,11 +81,13 @@ def _startPlot(type):
|
||||
#sTEYout = []
|
||||
while running:
|
||||
try:
|
||||
if otf_start.read() == 0:
|
||||
#if (otf_start.read() == 0 or time.time() > t_end):
|
||||
# break
|
||||
cur_en = E1+(E2-E1)*(time.time()-t_start)/(TIME*60)
|
||||
caput ("X11MA-PHS:E_SP",cur_en)
|
||||
break
|
||||
e = energy.read()
|
||||
'''cur_en = E1+(E2-E1)*(time.time()-t_start)/(TIME*60)
|
||||
caput ("X11MA-PHS:E_SP",cur_en)
|
||||
|
||||
cur_en1 = cur_en - dE1
|
||||
cur_en2 = cur_en - dE2
|
||||
#print cur_en
|
||||
@@ -94,7 +97,7 @@ def _startPlot(type):
|
||||
caput ("X11MA-ID2:ENERGY",cur_en2)
|
||||
#while abs (e - cur_en) < 0.01:
|
||||
# pass
|
||||
#time.sleep(0.0001)
|
||||
#time.sleep(0.0001)'''
|
||||
ID1 = ID1_En.read()
|
||||
ID2 = ID2_En.read()
|
||||
#dE1 = ID1_En.read() - energy.read()
|
||||
@@ -103,7 +106,7 @@ def _startPlot(type):
|
||||
aK2=keithley_2a.read()
|
||||
aK3=keithley_3a.read()
|
||||
aTEYnorm=aK2/aK1
|
||||
TEY.append(line_sep)
|
||||
TEY.append(line_sep)
|
||||
TEY.append(e)
|
||||
TEY.append(ID1)
|
||||
TEY.append(ID2)
|
||||
@@ -111,7 +114,7 @@ def _startPlot(type):
|
||||
TEY.append(aK1)
|
||||
TEY.append(aK2)
|
||||
TEY.append(aK3)
|
||||
TEY.append(pol_str)
|
||||
TEY.append(pol_str)
|
||||
if (abs(e-cur)) > 0.1:
|
||||
v = abs((keithley_2a.read() / ((keithley_1a if (type==1) else keithley_3a).read() )))
|
||||
s.appendData(e,v)
|
||||
@@ -123,7 +126,7 @@ def _startPlot(type):
|
||||
output_file_TEY = output_path+"TEY_"+file_prefix+"_" + suffix + ".dat"
|
||||
TEYout = open(output_file_TEY, "a+")
|
||||
sTEY = sep.join(str(x) for x in TEY) #+ line_sep # MCP1.write("%s" + sep % i)
|
||||
sTEYout = "rbkenergy" + sep + "ID1_en" + sep + "ID2_en" + sep + "TEY_norm" + sep + "Keithley1" + sep + "Keithley2" + sep + "Keithley3"+ sep + "Polarisation"
|
||||
sTEYout = sep + "rbkenergy" + sep + "ID1_en" + sep + "ID2_en" + sep + "TEY_norm" + sep + "Keithley1" + sep + "Keithley2" + sep + "Keithley3"+ sep + "Polarisation"
|
||||
sTEYout = sTEYout + line_sep + sTEY
|
||||
TEYout.write(sTEYout)
|
||||
TEYout.close()
|
||||
@@ -266,6 +269,15 @@ for scan_no in range(number_of_scans):
|
||||
plot_file(output_file, file_prefix+"_" + suffix) #"Scan " + str(scan_no+1))
|
||||
print "Finished scan " + str(scan_no+1) + " out of " + str(number_of_scans)
|
||||
|
||||
'''output_file_Log = output_path+"Log_"+file_prefix+".dat"
|
||||
Logout = open(output_file_Log, "a+")
|
||||
#sLog = sep.join(str(x) for x in Log)
|
||||
sLogout = sep + "Scan_number" + sep + file_prefix + "_" + suffix + sep + "ID1_en" + sep + "ID2_en" + sep + "TEY_norm" + sep + "Keithley1" + sep + "Keithley2" + sep + "Keithley3"+ sep + "Polarisation"
|
||||
sTEYout = sTEYout + line_sep + sTEY
|
||||
TEYout.write(sTEYout)
|
||||
TEYout.close()
|
||||
print "Log file updated"'''
|
||||
|
||||
if RUNTYPE in ["+/-", "LH/LV"]:
|
||||
if polswitch == 1:
|
||||
switchpol(2, RUNTYPE) # tune ID2 --> polarization: C- or LV
|
||||
|
||||
Reference in New Issue
Block a user