Script execution
This commit is contained in:
@@ -2,6 +2,8 @@ import os
|
||||
import traceback
|
||||
import thread
|
||||
import time
|
||||
import numpy as np
|
||||
import datetime
|
||||
|
||||
#ID settings
|
||||
|
||||
@@ -26,19 +28,30 @@ Max = 14;
|
||||
Min=-Max;
|
||||
No_of_steps = 10;
|
||||
dB = Max/No_of_steps;
|
||||
|
||||
Noavg = 5;
|
||||
|
||||
|
||||
forward=np.linspace(-14,14,7)
|
||||
reverse=np.linspace(14,-14,7)
|
||||
|
||||
|
||||
|
||||
os.chdir("/sls/X11MA/data/X11MA/beamtime_december/")
|
||||
|
||||
#forward loop
|
||||
|
||||
file_prefix = time.strftime("%y%m%d")
|
||||
filename=open("data"+file_prefix+".txt","a")
|
||||
for i in range(0,No_of_steps):
|
||||
B = -Max + 2*i*dB;
|
||||
time_prefix = datatime.datetime.fromtimstamp(ts).strftime('%H:%M:%s')
|
||||
filename=open("data"+file_prefix++time_prefix+".txt","a")
|
||||
|
||||
#for i in range(0,No_of_steps):
|
||||
# B = -Max + 2*i*dB;
|
||||
# print "Setting field = ", B
|
||||
# caput("X11MA-XMCD:I-SETraw",B)
|
||||
|
||||
for i in range(o,len(forward))
|
||||
print "Setting field = ", B
|
||||
caput("X11MA-XMCD:I-SETraw",B)
|
||||
caput("X11MA-XMCD:I-SETraw",forward[i])
|
||||
|
||||
temp_tey=0;
|
||||
temp_tey_E2 = 0;
|
||||
@@ -90,11 +103,14 @@ for i in range(0,No_of_steps):
|
||||
|
||||
#reverse loop
|
||||
|
||||
for i in range(0,No_of_steps):
|
||||
B = Max -2*i*dB;
|
||||
print "Setting field = ", B
|
||||
caput("X11MA-XMCD:I-SETraw",B)
|
||||
#for i in range(0,No_of_steps):
|
||||
#B = Max -2*i*dB;
|
||||
#print "Setting field = ", B
|
||||
#caput("X11MA-XMCD:I-SETraw",B)
|
||||
|
||||
for i in range(o,len(reverse))
|
||||
print "Setting field = ", B
|
||||
caput("X11MA-XMCD:I-SETraw",reverse[i])
|
||||
temp_tey=0;
|
||||
temp_tey_E2 = 0;
|
||||
ADC2_temp_E1=0;
|
||||
|
||||
Reference in New Issue
Block a user