This commit is contained in:
gac-x11ma
2025-09-03 16:52:53 +02:00
parent 216ff1c8d5
commit 0f8956cafe
249 changed files with 9 additions and 8 deletions
+478
View File
@@ -0,0 +1,478 @@
# Set FE slits to 0.5x0.5mm
# Set Exit slit to 50mm
# Check the Keithleys
###Sample BL038
#set_exec_pars(path="/sls/X11MA/data/X11MA/Data1/XAS/2022/2022_05/BL038/")
#open_vg13()
#
#TRX.write(-5.08)
#TRZ.write(24.7)
#
#
#time.sleep(1)
##P, S and Cl
#nr_loops=2
#for i in range(nr_loops):
# caput('X11MA-KEI10:RANGE', 6)
# caput('X11MA-KEI11:RANGE', 6)
# caput('X11MA-KEI12:RANGE', 10)
# caput('X11MA-KEI13:RANGE', 9)
# otf2(start=119, end=220, time=10, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL038_P-S-Cl-low')
#time.sleep(30)
##C-low
#nr_loops=1
#for i in range(nr_loops):
# caput('X11MA-KEI10:RANGE', 6)
# caput('X11MA-KEI11:RANGE', 6)
# caput('X11MA-KEI12:RANGE', 9)
# caput('X11MA-KEI13:RANGE', 8)
# otf2(start=275, end=295, time=1, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL038_C-low')
####Sample BL039
#set_exec_pars(path="/sls/X11MA/data/X11MA/Data1/XAS/2022/2022_05/BL039/")
#open_vg13()
#
#TRX.write(-1.1)
#TRZ.write(23.66)
#
#time.sleep(1)
#
##P, S and Cl
#nr_loops=2
#for i in range(nr_loops):
# caput('X11MA-KEI10:RANGE', 6)
# caput('X11MA-KEI11:RANGE', 6)
# caput('X11MA-KEI12:RANGE', 10)
# caput('X11MA-KEI13:RANGE', 9)
# otf2(start=119, end=220, time=10, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL039_P-S-Cl-low')
#time.sleep(30)
##C-low
#nr_loops=1
#for i in range(nr_loops):
# caput('X11MA-KEI10:RANGE', 6)
# caput('X11MA-KEI11:RANGE', 6)
# caput('X11MA-KEI12:RANGE', 9)
# caput('X11MA-KEI13:RANGE', 8)
# otf2(start=275, end=295, time=1, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL039_C-low')
####Sample BL040
#set_exec_pars(path="/sls/X11MA/data/X11MA/data/XAS/2022/2022_05/BL040/")
#open_vg13()
#
#TRX.write(2.7)
#TRZ.write(22.16)
#
#
#time.sleep(1)
#
##P, S and Cl
#nr_loops=1
#for i in range(nr_loops):
# caput('X11MA-KEI10:RANGE', 6)
# caput('X11MA-KEI11:RANGE', 6)
# caput('X11MA-KEI12:RANGE', 10)
# caput('X11MA-KEI13:RANGE', 9)
# otf2(start=119, end=220, time=10, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='003_BL040_P-S-Cl-low' )
#time.sleep(30)
#
##C-low
#nr_loops=1
#for i in range(nr_loops):
# caput('X11MA-KEI10:RANGE', 6)
# caput('X11MA-KEI11:RANGE', 6)
# caput('X11MA-KEI12:RANGE', 9)
# caput('X11MA-KEI13:RANGE', 8)
# otf2(start=275, end=295, time=1, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='003_BL040_C-low')
###Sample BL041
set_exec_pars(path="/sls/X11MA/data/X11MA/Data1/XAS/2022/2022_05/BL041/")
open_vg13()
TRX.write(7.7)
TRZ.write(23.26)
time.sleep(1)
#P, S and Cl
nr_loops=2
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 10)
caput('X11MA-KEI13:RANGE', 9)
otf2(start=119, end=220, time=10, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL041_P-S-Cl-low_1')
otf2(start=119, end=220, time=10, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL041_P-S-Cl-low_2')
time.sleep(30)
##C-low
#nr_loops=1
#for i in range(nr_loops):
# caput('X11MA-KEI10:RANGE', 6)
# caput('X11MA-KEI11:RANGE', 6)
# caput('X11MA-KEI12:RANGE', 9)
# caput('X11MA-KEI13:RANGE', 8)
# otf2(start=275, end=295, time=1, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL041_C-low')
###Sample BL042
set_exec_pars(path="/sls/X11MA/data/X11MA/Data1/XAS/2022/2022_05/BL042/")
open_vg13()
TRX.write(10.99)
TRZ.write(25.07)
time.sleep(1)
#P, S and Cl
nr_loops=2
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 10)
caput('X11MA-KEI13:RANGE', 9)
otf2(start=119, end=220, time=10, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL042_P-S-Cl-low')
time.sleep(30)
#C-low
nr_loops=1
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 9)
caput('X11MA-KEI13:RANGE', 8)
otf2(start=275, end=295, time=1, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL042_C-low')
###Sample BL043
set_exec_pars(path="/sls/X11MA/data/X11MA/Data1/XAS/2022/2022_05/BL043/")
open_vg13()
TRX.write(-4.988)
TRZ.write(29.575)
time.sleep(1)
#P, S and Cl
nr_loops=2
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 10)
caput('X11MA-KEI13:RANGE', 9)
otf2(start=119, end=220, time=10, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL043_P-S-Cl-low')
time.sleep(30)
#C-low
nr_loops=1
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 9)
caput('X11MA-KEI13:RANGE', 8)
otf2(start=275, end=295, time=1, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL043_C-low')
###Sample BL045
set_exec_pars(path="/sls/X11MA/data/X11MA/Data1/XAS/2022/2022_05/BL045/")
open_vg13()
TRX.write(0.8)
TRZ.write(29.075)
time.sleep(1)
#P, S and Cl
nr_loops=2
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 10)
caput('X11MA-KEI13:RANGE', 9)
otf2(start=119, end=220, time=10, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL045_P-S-Cl-low')
time.sleep(30)
#C-low
nr_loops=1
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 9)
caput('X11MA-KEI13:RANGE', 8)
otf2(start=275, end=295, time=1, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL045_C-low')
###Sample BL046
set_exec_pars(path="/sls/X11MA/data/X11MA/Data1/XAS/2022/2022_05/BL046/")
open_vg13()
TRX.write(5.10)
TRZ.write(28.58)
time.sleep(1)
#P, S and Cl
nr_loops=2
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 10)
caput('X11MA-KEI13:RANGE', 9)
otf2(start=119, end=220, time=10, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL046_P-S-Cl-low')
time.sleep(30)
#C-low
nr_loops=1
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 9)
caput('X11MA-KEI13:RANGE', 8)
otf2(start=275, end=295, time=1, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL046_C-low')
###Sample BL047
set_exec_pars(path="/sls/X11MA/data/X11MA/Data1/XAS/2022/2022_05/BL047/")
open_vg13()
TRX.write(10.1)
TRZ.write(29.367)
time.sleep(1)
#P, S and Cl
nr_loops=2
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 10)
caput('X11MA-KEI13:RANGE', 9)
otf2(start=119, end=220, time=10, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL047_P-S-Cl-low')
time.sleep(30)
#C-low
nr_loops=1
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 9)
caput('X11MA-KEI13:RANGE', 8)
otf2(start=275, end=295, time=1, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL047_C-low')
##Sample BL049
set_exec_pars(path="/sls/X11MA/data/X11MA/Data1/XAS/2022/2022_05/BL049/")
open_vg13()
TRX.write(-5.1)
TRZ.write(34.367)
time.sleep(1)
#P, S and Cl
nr_loops=2
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 10)
caput('X11MA-KEI13:RANGE', 9)
otf2(start=119, end=220, time=10, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL049_P-S-Cl-low')
time.sleep(30)
#C-low
nr_loops=1
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 9)
caput('X11MA-KEI13:RANGE', 8)
otf2(start=275, end=295, time=1, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL049_C-low')
##Sample BL050
set_exec_pars(path="/sls/X11MA/data/X11MA/Data1/XAS/2022/2022_05/BL050/")
open_vg13()
TRX.write(1.9)
TRZ.write(32.367)
time.sleep(1)
#P, S and Cl
nr_loops=2
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 10)
caput('X11MA-KEI13:RANGE', 9)
otf2(start=119, end=220, time=10, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL050_P-S-Cl-low')
time.sleep(30)
#C-low
nr_loops=1
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 9)
caput('X11MA-KEI13:RANGE', 8)
otf2(start=275, end=295, time=1, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL050_C-low')
##Sample BL052
set_exec_pars(path="/sls/X11MA/data/X11MA/Data1/XAS/2022/2022_05/BL052/")
open_vg13()
TRX.write(8.3)
TRZ.write(35.367)
time.sleep(1)
#P, S and Cl
nr_loops=2
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 10)
caput('X11MA-KEI13:RANGE', 9)
otf2(start=119, end=220, time=10, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL052_P-S-Cl-low')
time.sleep(30)
#C-low
nr_loops=1
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 9)
caput('X11MA-KEI13:RANGE', 8)
otf2(start=275, end=295, time=1, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL052_C-low')
##Sample BL054
set_exec_pars(path="/sls/X11MA/data/X11MA/Data1/XAS/2022/2022_05/BL054/")
open_vg13()
TRX.write(-6.1)
TRZ.write(38.967)
time.sleep(1)
#P, S and Cl
nr_loops=2
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 10)
caput('X11MA-KEI13:RANGE', 9)
otf2(start=119, end=220, time=10, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL054_P-S-Cl-low')
time.sleep(30)
#C-low
nr_loops=1
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 9)
caput('X11MA-KEI13:RANGE', 8)
otf2(start=275, end=295, time=1, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL054_C-low')
##Sample BL055
set_exec_pars(path="/sls/X11MA/data/X11MA/Data1/XAS/2022/2022_05/BL055/")
open_vg13()
TRX.write(-2.0)
TRZ.write(38.967)
time.sleep(1)
#P, S and Cl
nr_loops=2
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 10)
caput('X11MA-KEI13:RANGE', 9)
otf2(start=119, end=220, time=10, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL055_P-S-Cl-low')
time.sleep(30)
#C-low
nr_loops=1
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 9)
caput('X11MA-KEI13:RANGE', 8)
otf2(start=275, end=295, time=1, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL055_C-low')
##Sample BL056
set_exec_pars(path="/sls/X11MA/data/X11MA/Data1/XAS/2022/2022_05/BL056/")
open_vg13()
TRX.write(3.1)
TRZ.write(38.467)
time.sleep(1)
#P, S and Cl
nr_loops=2
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 10)
caput('X11MA-KEI13:RANGE', 9)
otf2(start=119, end=220, time=10, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL056_P-S-Cl-low')
time.sleep(30)
#C-low
nr_loops=1
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 9)
caput('X11MA-KEI13:RANGE', 8)
otf2(start=275, end=295, time=1, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL056_C-low')
##Sample BL057
set_exec_pars(path="/sls/X11MA/data/X11MA/Data1/XAS/2022/2022_05/BL057/")
open_vg13()
TRX.write(7.3)
TRZ.write(40.40)
time.sleep(1)
#P, S and Cl
nr_loops=2
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 10)
caput('X11MA-KEI13:RANGE', 9)
otf2(start=119, end=220, time=10, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL057_P-S-Cl-low')
time.sleep(30)
#C-low
nr_loops=1
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 6)
caput('X11MA-KEI12:RANGE', 9)
caput('X11MA-KEI13:RANGE', 8)
otf2(start=275, end=295, time=1, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='BL057_C-low')
time.sleep(1)
close_vg13()
+25
View File
@@ -0,0 +1,25 @@
#otf(start, end, time, delay = 0.0, mode = None, offset = None, alpha = None, name = None, folder = 'TEST')
set_exec_pars(path="")
nr_loops=5
open_vg10()
time.sleep(1)
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 9)
otf(start=270, end=320, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='oXAS-NCM_endPS_C', folder='data/2019_10/20191004')
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 9)
otf(start=520, end=570, time=2, delay=30, mode='LINEAR', alpha = 0.0, offset=0.0, name='oXAS-NCM_gs_O', folder='data/2019_10/20191004')
time.sleep(5)
close_vg10()
TRY.write(0.0)
TRZ.write(0.0)
+32
View File
@@ -0,0 +1,32 @@
#wold be nice to print relative changes of the parameters
RANGE_OBJ = 1.0
STEP_OBJ = 0.1
RANGE_STIG = 10.0
STEP_STIG = 1.0
UPDATE_POSITION = True
AVERAGE = 1
width, height = eiger.getImageSize()
#ROI = Rectangle(width/3, height/3, width/3, height/3,)
#ROI = Rectangle(0, 0, width, height,)
ROI = Rectangle(200,100,256,256) #(x0,y0,delta_x(2**n), delta_y(2**n))
ROI = Rectangle(130,74,256,256)
ROI = Rectangle(180,170,256,256)
initial_state = get_focus_scan_pos()
print "Initial state:" , initial_state
set_focus_scan_roi(ROI)
#r=scan_focus(objective, RANGE_OBJ, STEP_OBJ,average = AVERAGE, update_position = UPDATE_POSITION)
r=scan_focus(obj_stig_a, RANGE_STIG, STEP_STIG, average = AVERAGE, update_position = UPDATE_POSITION)
#r=scan_focus(obj_stig_b, RANGE_STIG, STEP_STIG,average = AVERAGE, update_position = UPDATE_POSITION)
#r=scan_focus(objective, RANGE_OBJ, STEP_OBJ, average = AVERAGE, update_position = UPDATE_POSITION)
#r=scan_focus(obj_stig_a, RANGE_STIG, STEP_STIG, average = AVERAGE, update_position = UPDATE_POSITION)
#r=scan_focus(obj_stig_b, RANGE_STIG, STEP_STIG, average = AVERAGE, update_position = UPDATE_POSITION)
#r=scan_focus(objective, RANGE_OBJ, STEP_OBJ, average = AVERAGE, update_position = UPDATE_POSITION)#
final_state = get_focus_scan_pos()
print "Final state:" , final_state
+44
View File
@@ -0,0 +1,44 @@
#wold be nice to print relative changes of the parameters
RANGE_OBJ = 1.0
STEP_OBJ = 0.1
RANGE_STIG = 10.0
STEP_STIG = 1.0
UPDATE_POSITION = True
AVERAGE = 1
SETTLING_TIME =0.5
width, height = eiger.getImageSize()
#ROI = Rectangle(width/3, height/3, width/3, height/3,)
#ROI = Rectangle(0, 0, width, height,)
ROI = Rectangle(200,100,256,256)#(x0,y0,delta_x(2**n), delta_y(2**n))
ROI = Rectangle(130,74,256,256)
initial_state = objective.read(),obj_stig_a.read(),obj_stig_b.read()
print "Initial state:" , initial_state
def apply_pos(pos):
objective.write(pos[0])
obj_stig_a.write(pos[1])
obj_stig_b.write(pos[2])
def show_roi():
global ROI
pn=show_panel(image)
ov=Overlays.Rect(Pen(Color.BLUE), Point(ROI.x,ROI.y),Dimension(ROI.width,ROI.height))
pn.clearOverlays()
ov.setMovable(True)
pn.addOverlay(ov)
show_roi()
#r=scan_focus(objective, RANGE_OBJ, STEP_OBJ, roi = ROI, average = AVERAGE, update_position = UPDATE_POSITION)
r=scan_focus(obj_stig_a, RANGE_STIG, STEP_STIG, roi = ROI, average = AVERAGE, update_position = UPDATE_POSITION)
#r=scan_focus(obj_stig_b, RANGE_STIG, STEP_STIG, roi = ROI, average = AVERAGE, update_position = UPDATE_POSITION)
#r=scan_focus(objective, RANGE_OBJ, STEP_OBJ, roi = ROI, average = AVERAGE, update_position = UPDATE_POSITION)
#r=scan_focus(obj_stig_a, RANGE_STIG, STEP_STIG, roi = ROI, average = AVERAGE, update_position = UPDATE_POSITION)
#r=scan_focus(obj_stig_b, RANGE_STIG, STEP_STIG, roi = ROI, average = AVERAGE, update_position = UPDATE_POSITION)
#r=scan_focus(objective, RANGE_OBJ, STEP_OBJ, roi = ROI, average = AVERAGE, update_position = UPDATE_POSITION)#
final_state = objective.read(),obj_stig_a.read(),obj_stig_b.read()
print "Final state:" , final_state
+118
View File
@@ -0,0 +1,118 @@
#Sample 01 - RW-2-4
open_vg13()
TRX.write(1.41)
TRZ.write(11.9)
time.sleep(1)
##Survey
#nr_loops=1
#for i in range(nr_loops):
# caput('X11MA-KEI10:RANGE', 6)
# caput('X11MA-KEI11:RANGE', 7)
# caput('X11MA-KEI12:RANGE', 8)
# otf2(start=500, end=900, time=4, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='RW-2-4_Survey')
#Nickel L edge
nr_loops=1
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
otf2(start=845, end=885, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='RW-2-4_Ni')
#Cobalt L edge
nr_loops=1
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
otf2(start=772, end=805, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='RW-2-4_Co')
#Manganese L edge
nr_loops=1
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
otf2(start=630, end=670, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='RW-2-4_Mn')
#Oxygen K edge
nr_loops=1
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
otf2(start=520, end=570, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='RW-2-4_O')
#Carbon K edge
nr_loops=1
for i in range(nr_loops):
caput('X11MA-KEI10:RANGE', 6)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
otf2(start=270, end=320, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='RW-2-4_C')#
#Sample 03 - HR016
#open_vg13()
#
#TRX.write(11.95)
#TRZ.write(13.71)
#
#
#time.sleep(1)
##
###Survey
##nr_loops=1
##for i in range(nr_loops):
## caput('X11MA-KEI10:RANGE', 6)
## caput('X11MA-KEI11:RANGE', 7)
## caput('X11MA-KEI12:RANGE', 8)
## otf2(start=500, end=900, time=4, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='HR016_Survey')
#
###Nickel L edge
##nr_loops=1
##for i in range(nr_loops):
## caput('X11MA-KEI10:RANGE', 6)
## caput('X11MA-KEI11:RANGE', 7)
## caput('X11MA-KEI12:RANGE', 9)
## otf2(start=845, end=885, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='HR016_Ni')
#
##Manganese L edge
#nr_loops=1
#for i in range(nr_loops):
# caput('X11MA-KEI10:RANGE', 6)
# caput('X11MA-KEI11:RANGE', 7)
# caput('X11MA-KEI12:RANGE', 8)
# otf2(start=630, end=670, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='HR016_Mn')
#
#
##Oxygen K edge
#nr_loops=1
#for i in range(nr_loops):
# caput('X11MA-KEI10:RANGE', 6)
# caput('X11MA-KEI11:RANGE', 7)
# caput('X11MA-KEI12:RANGE', 8)
# otf2(start=520, end=570, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='HR016_O')
#
##Sn M edge
#nr_loops=1
#for i in range(nr_loops):
# caput('X11MA-KEI10:RANGE', 6)
# caput('X11MA-KEI11:RANGE', 7)
# caput('X11MA-KEI12:RANGE', 9)
# otf2(start=485, end=506, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='HR016_Sn')
#
#
##Carbon K edge
#nr_loops=1
#for i in range(nr_loops):
# caput('X11MA-KEI10:RANGE', 6)
# caput('X11MA-KEI11:RANGE', 7)
# caput('X11MA-KEI12:RANGE', 9)
# otf2(start=270, end=320, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='HR016_C')
#
#time.sleep(1)
+45
View File
@@ -0,0 +1,45 @@
##Constants
AVERAGE = 10
EXPOSURE = 1.0
MEASUREMENTS = 20
change_pol(2, "Lin" , alpha = 0)
two_energies(869.7, 870.9, measurements = MEASUREMENTS, exposure = EXPOSURE, average = AVERAGE)
time.sleep (2.0)
change_pol(2, "Lin" , alpha = 10)
two_energies(869.7, 870.9, measurements = MEASUREMENTS, exposure = EXPOSURE, average = AVERAGE)
time.sleep (2.0)
change_pol(2, "Lin" , alpha = 20)
two_energies(869.7, 870.9, measurements = MEASUREMENTS, exposure = EXPOSURE, average = AVERAGE)
time.sleep (2.0)
change_pol(2, "Lin" , alpha = 30)
two_energies(869.7, 870.9, measurements = MEASUREMENTS, exposure = EXPOSURE, average = AVERAGE)
time.sleep (2.0)
change_pol(2, "Lin" , alpha = 40)
two_energies(869.7, 870.9, measurements = MEASUREMENTS, exposure = EXPOSURE, average = AVERAGE)
time.sleep (2.0)
change_pol(2, "Lin" , alpha = 50)
two_energies(869.7, 870.9, measurements = MEASUREMENTS, exposure = EXPOSURE, average = AVERAGE)
time.sleep (2.0)
change_pol(2, "Lin" , alpha = 60)
two_energies(869.7, 870.9, measurements = MEASUREMENTS, exposure = EXPOSURE, average = AVERAGE)
time.sleep (2.0)
change_pol(2, "Lin" , alpha = 70)
two_energies(869.7, 870.9, measurements = MEASUREMENTS, exposure = EXPOSURE, average = AVERAGE)
time.sleep (2.0)
change_pol(2, "Lin" , alpha = 80)
two_energies(869.7, 870.9, measurements = MEASUREMENTS, exposure = EXPOSURE, average = AVERAGE)
time.sleep (2.0)
change_pol(2, "Lin" , alpha = 90)
two_energies(869.7, 870.9, measurements = MEASUREMENTS, exposure = EXPOSURE, average = AVERAGE)
time.sleep (2.0)
+19
View File
@@ -0,0 +1,19 @@
source=image
samples=10
roi=None
wait_next=False
sleep=0
outliers_threshold=None
outliers_mask=None
retries=None
timeout=None
frames = []
for i in range(samples):
if (i>0) and (sleep>0):
time.sleep(sleep)
aux = grab_frame(source, roi, wait_next, outliers_threshold, outliers_mask, retries, timeout)
frames.append(aux)
ret=average_frames(frames) if samples > 1 else frames[0]