Tilt homing

This commit is contained in:
e19752
2022-05-24 10:16:16 +02:00
parent 065e33ad05
commit 6de2af0dca
181 changed files with 5817 additions and 1017 deletions

View File

@@ -4,21 +4,25 @@
open_vg13()
time.sleep(1)
#v_apply = -40
#run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
TRZ.write(33.8)
sample_name='2nm_'
#XMCD
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
#caput('X11MA-ES3-MAG1:V', 5)
sample_name='M4_150'
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(2):
for i in range(1):
#time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=700, end=715, time=1, delay=1, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+ sample_name + str(v_apply) + '_Cp')
#otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
#otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
#otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
#otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
close_vg13()

View File

@@ -0,0 +1,274 @@
open_vg13()
time.sleep(1)
'''
#XMCD
caput('X11MA-ES3-MAG1:V', 5)
#time.sleep(15)
TRZ.write(18.4)
sample_name='8nm'
for i in range(3):
#time.sleep(1)
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
# HYST
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
caput('X11MA-ES3-MAG1:V', 5)
#time.sleep(15)
TRZ.write(26.4)
sample_name='3nm'
for i in range(3):
#time.sleep(1)
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
# HYST
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
caput('X11MA-ES3-MAG1:V', 5)
#time.sleep(15)
TRZ.write(33.8)
sample_name='2nm'
for i in range(3):
#time.sleep(1)
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
'''
# HYST
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
# repeat loops
caput('X11MA-ES3-MAG1:V', 5)
#time.sleep(15)
TRZ.write(18.4)
sample_name='8nm'
# HYST
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
caput('X11MA-ES3-MAG1:V', 5)
#time.sleep(15)
TRZ.write(26.4)
sample_name='3nm'
# HYST
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
caput('X11MA-ES3-MAG1:V', 5)
#time.sleep(15)
TRZ.write(33.8)
sample_name='2nm'
# HYST
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
close_vg13()

View File

@@ -0,0 +1,283 @@
open_vg13()
time.sleep(1)
v_apply = 150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
#v_apply = 0
#run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
#XMCD
caput('X11MA-ES3-MAG1:V', 5)
#time.sleep(15)
TRZ.write(18.4)
sample_name='2nm_150V'
for i in range(3):
#time.sleep(1)
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
# HYST
caput('X11MA-ES3-MAG1:V', 2.5) # max Kepco current
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
v_apply = -40
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
#v_apply = 0
#run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
sample_name='2nm_-40V'
for i in range(3):
#time.sleep(1)
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
# HYST
caput('X11MA-ES3-MAG1:V', 2.5) # max Kepco current
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
v_apply = -150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
#v_apply = 0
#run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
sample_name='2nm_-150V'
for i in range(3):
#time.sleep(1)
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
# HYST
caput('X11MA-ES3-MAG1:V', 2.5) # max Kepco current
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
v_apply = 70
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
#v_apply = 0
#run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
sample_name='2nm_+70V'
for i in range(3):
#time.sleep(1)
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
# HYST
caput('X11MA-ES3-MAG1:V', 2.5) # max Kepco current
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
v_apply = 150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
v_apply = 0
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
#XMCD
caput('X11MA-ES3-MAG1:V', 5)
#time.sleep(15)
TRZ.write(18.4)
sample_name='2nm_0V'
for i in range(3):
#time.sleep(1)
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
# HYST
caput('X11MA-ES3-MAG1:V', 2.5) # max Kepco current
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
close_vg13()

View File

@@ -0,0 +1,24 @@
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 5)
#time.sleep(15)
sample_name='2nm'
#caput('X11MA-KEI10:RANGE', 7)
#caput('X11MA-KEI11:RANGE', 7)
#caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
#time.sleep(1)
otf2(start=705, end=713, time=1, delay=1, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
otf2(start=705, end=713, time=1, delay=1, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
close_vg13()

View File

@@ -0,0 +1,2 @@
sample_name='3nm_z26p9'
otf2(start=705, end=713, time=1, delay=1, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')

View File

@@ -1,22 +1,31 @@
v_start= -20
v_end = 0
#v_apply = 0
close_vg13()
v_start=caget('X11MA-KEI13:SETVOLTAGE')
caput('X11MA-KEI13:RANGE',0) # 0= auto range. To protect Keithley
step_size=5
n=(v_start - v_end)/step_size
n=(v_start - v_apply)/step_size
for i in range (int(abs(n))+1):
if v_start > v_end:
if v_start > v_apply:
v=v_start - i*step_size
#print "reverse"
print ("Apply", v," volts")
caput('X11MA-KEI11:SETVOLTAGE',v)
caput('X11MA-KEI13:SETVOLTAGE',v)
sleep(0.1)
else:
v= i*step_size+v_start
print "forward"
print ("Apply", v," volts")
caput('X11MA-KEI11:SETVOLTAGE',v)
caput('X11MA-KEI13:SETVOLTAGE',v)
sleep(0.1)
sleep(20)
open_vg13()

10
script/Users/Cinthia/field_sweepID2.py Executable file → Normal file
View File

@@ -1,6 +1,6 @@
#Parameters
sample_name='M4_120'
#sample_name='M4_120'
'''
FILENAME='Hyst_'+ sample_name + '_E2_Cm'
B1 = 1.0 # starting mag. field in Amps
@@ -58,8 +58,8 @@ for r in RANGES:
setpoints = setpoints + frange(r[0], r[1], r[2], True)
# plot properties
set_preference(Preference.ENABLED_PLOTS, ['field', 'tey_norm'])
set_preference(Preference.PLOT_TYPES, {'tey_norm':1})
set_preference(Preference.ENABLED_PLOTS, ['field', 'tey_norm'], ['field','tfy_norm'])
set_preference(Preference.PLOT_TYPES, {'tey_norm':1},{'tfy_norm':1})
#scan = ManualScan(['field', 'Energy'], ['TEY', 'I0', 'polarization', 'temperature', 'RingCurrent', 'tey_norm'] , [min(setpoints), min(ENERGIES)], [max(setpoints), max(ENERGIES)], [len(setpoints)-1, len(ENERGIES)-1])
scan = ManualScan(['field', 'Energy'], ['I0', 'TEY', 'TFY', 'polarization', 'temperature', 'RingCurrent', 'tey_norm','tfy_norm'] , [min(setpoints), min(ENERGIES)], [max(setpoints), max(ENERGIES)], [len(setpoints)-1, len(ENERGIES)-1])
@@ -77,8 +77,12 @@ for B in setpoints:
while abs(readback1-B) > FIELD_PRECISION:
#readback1 = caget("X11MA-XMCD:Ireadout")
readback1 = field.read()
print "Wait field is set"
time.sleep(0.1)
print "field setting done"
print "field readback is:", field.read()
for E in ENERGIES:
print "Setting energy = ", E
#caput('X11PHS-E:GO.A', E)

View File

@@ -0,0 +1,124 @@
#Parameters
#sample_name='M4_120'
'''
FILENAME='Hyst_'+ sample_name + '_E2_Cm'
B1 = 1.0 # starting mag. field in Amps
B2 = -1.0 # final mag. field in Amps
BSTEP = 0.5 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 # time in 100ms
'''
# List of scans. Each scan is defined as: (start,stop, step)
# to make a whole loop two scans are needed: [(B1, B2, BSTEP),(B2,B1,-BSTEP)]
# to make half of a loop one scan is needed: [(B1, B2, BSTEP),] <- don't forget to put comma before ]
RANGES = [(B1, B2, -BSTEP1),(B2, -B2, -BSTEP2),(-B2,-B1,-BSTEP1),(-B1,-B2,BSTEP1),(-B2,B2,BSTEP2),(B2,B1,BSTEP1)]
set_exec_pars(open=False, tag=FILENAME)
#open_vg13()
#Pre-actions
# Here polarization and offsets are set
caput ("X11PHS-E:OPT","PGM+ID2")
print "ID mode set to PGM+ID2"
#caput(OTF_OFF1,-50) #detune ID1
caput('X11MA-ID2:ENERGY-OFFS', OFFSET2)
print "ID offset set to ", OFFSET2
cawait('X11MA-ID2:DONE',1)
print "Offset setting done"
if MODE is 1 or 2:
caput('X11MA-ID2:MODE',MODE)
#print "Polarization mode set"
else:
raise Exception("Invalid polarization type: " + MODE)
cawait('X11MA-ID2:DONE',1)
print "ID mode setting done"
# setting number of samples to be averaged, which depends on the accumulation time
avg = ACC_TIME * 10
caput("X11MA-ES1-10ADC:AVG",avg)
# Generating a list of mag. fields (setpoints) needed for the loop
setpoints = []
for r in RANGES:
setpoints = setpoints + frange(r[0], r[1], r[2], True)
# plot properties
set_preference(Preference.ENABLED_PLOTS, ['field', 'tey_norm'])
set_preference(Preference.PLOT_TYPES, {'tey_norm':1})
#scan = ManualScan(['field', 'Energy'], ['TEY', 'I0', 'polarization', 'temperature', 'RingCurrent', 'tey_norm'] , [min(setpoints), min(ENERGIES)], [max(setpoints), max(ENERGIES)], [len(setpoints)-1, len(ENERGIES)-1])
scan = ManualScan(['field', 'Energy'], ['I0', 'TEY', 'TFY', 'polarization', 'temperature', 'RingCurrent', 'tey_norm','tfy_norm'] , [min(setpoints), min(ENERGIES)], [max(setpoints), max(ENERGIES)], [len(setpoints)-1, len(ENERGIES)-1])
scan.start()
# Main loop
for B in setpoints:
print "Setting field = ", B
caput("X11MA-XMCD:I-SETraw",B)
time.sleep( FIELD_CHANGE_SLEEP ) # Settling time
#readback1 = caget("X11MA-XMCD:Ireadout")
readback1 = field.read()
while abs(readback1-B) > FIELD_PRECISION:
#readback1 = caget("X11MA-XMCD:Ireadout")
readback1 = field.read()
print "difference", abs(readback1-B)
time.sleep(0.1)
time.sleep( FIELD_CHANGE_SLEEP ) # Settling time
print "field setting done"
print "field readback is:", field.read()
for E in ENERGIES:
print "Setting energy = ", E
#caput('X11PHS-E:GO.A', E)
energy.write(E)
time.sleep (0.1)
print "Energy set"
cawait('X11PHS:alldone', 1)
print "done"
readback2 = energy.read()
if abs(readback2 - E) > 0.1 : # TODO: Check accuracy
raise Exception('Energy could not be set to the value ' + str(E))
sleep( ENERGY_CHANGE_SLEEP ) # Settling time
detector1 = keithley_1a.read() #Keithley1
detector2 = keithley_2a.read() #Keithley2
detector3 = keithley_3a.read() #Keithley3
detector4 = caget('X11MA-ID2:MODE') #polarization in ID2
#detector5 = caget("X11MA-ID2:ALPHA-READ") # polAngle in ID2
detector6 = caget('X11MA-ES3-LSCI:TEMP_RBV') #temperature.get()
detector7 = caget("ARIDI-PCT:CURRENT")
#detector8 = signal_field_analog_x.read() # fieldAnalogX.get()
tey_norm = detector2/detector1
tfy_norm = detector3/detector1
#converting polarization strings to integer numbers: C+ -> 1 and C- -> 2
if detector4 == 'CIRC +': detector4 = 1
elif detector4 == 'CIRC -': detector4 = 2
else: detector4 = 0
#print "step 7"
#scan.append ([B, E], [readback1, readback2], [detector1, detector2, detector4, detector6, detector7, tey_norm])
scan.append ([B, E], [readback1, readback2], [detector1, detector2, detector3, detector4, detector6, detector7, tey_norm, tfy_norm])
scan.end()
caput("X11MA-ES1-10ADC:AVG",1)
#close_vg13()

30
script/Users/Cinthia/hyst_ID2_Fe.py Executable file → Normal file
View File

@@ -1,24 +1,27 @@
open_vg13()
sample_name='M4_120'
TRZ.write(18.4)
sample_name='8nm'
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
#caput('X11MA-KEI10:RANGE', 7)
#caput('X11MA-KEI11:RANGE', 7)
#caput('X11MA-KEI12:RANGE', 9)
# HYST
caput('X11MA-ES3-MAG1:V', 2.5) # max Kepco current
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
B1 = 2.5 # starting mag. field in Amps
B2 = -2.5 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
@@ -26,17 +29,18 @@ for i in range(1):
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
B1 = 2.5 # starting mag. field in Amps
B2 = -2.5 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
close_vg13()

View File

@@ -0,0 +1,486 @@
'''
TRZ.write(33.8)
sample_name='2nm_150'
v_apply = 150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
#cawait ('ACOAU-ACCU:OP-MODE', "Light-Available") # wait for electron beam to be back
#sleep(0.5)
sample_name='2nm_150_rem'
v_apply = 0
#run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
'''
sample_name='2nm_-40'
v_apply = -20
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
sample_name='2nm_-60'
v_apply = -40
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
sample_name='2nm_-80'
v_apply = -60
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
sample_name='2nm_-100'
v_apply = -80
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
sample_name='2nm_-150'
v_apply = -100
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
'''
sample_name='2nm_-150_rem'
v_apply = 0
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
sample_name='2nm_40'
v_apply = 40
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
sample_name='2nm_60'
v_apply = 60
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
sample_name='2nm_80'
v_apply = 80
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
sample_name='2nm_100'
v_apply = 100
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
sample_name='2nm_150'
v_apply = 150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
'''
close_vg13()

View File

@@ -0,0 +1,123 @@
#Parameters
#sample_name='M4_120'
'''
FILENAME='Hyst_'+ sample_name + '_E2_Cm'
B1 = 1.0 # starting mag. field in Amps
B2 = -1.0 # final mag. field in Amps
BSTEP = 0.5 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 # time in 100ms
'''
# List of scans. Each scan is defined as: (start,stop, step)
# to make a whole loop two scans are needed: [(B1, B2, BSTEP),(B2,B1,-BSTEP)]
# to make half of a loop one scan is needed: [(B1, B2, BSTEP),] <- don't forget to put comma before ]
RANGES = [(B1, B2, -BSTEP),(B2,B1,BSTEP)]
set_exec_pars(open=False, tag=FILENAME)
#open_vg13()
#Pre-actions
# Here polarization and offsets are set
caput ("X11PHS-E:OPT","PGM+ID2")
print "ID mode set to PGM+ID2"
#caput(OTF_OFF1,-50) #detune ID1
caput('X11MA-ID2:ENERGY-OFFS', OFFSET2)
print "ID offset set to ", OFFSET2
cawait('X11MA-ID2:DONE',1)
print "Offset setting done"
if MODE is 1 or 2:
caput('X11MA-ID2:MODE',MODE)
#print "Polarization mode set"
else:
raise Exception("Invalid polarization type: " + MODE)
cawait('X11MA-ID2:DONE',1)
print "ID mode setting done"
# setting number of samples to be averaged, which depends on the accumulation time
avg = ACC_TIME * 10
caput("X11MA-ES1-10ADC:AVG",avg)
# Generating a list of mag. fields (setpoints) needed for the loop
setpoints = []
for r in RANGES:
setpoints = setpoints + frange(r[0], r[1], r[2], True)
# plot properties
set_preference(Preference.ENABLED_PLOTS, ['field', 'tey_norm'])
set_preference(Preference.PLOT_TYPES, {'tey_norm':1})
#scan = ManualScan(['field', 'Energy'], ['TEY', 'I0', 'polarization', 'temperature', 'RingCurrent', 'tey_norm'] , [min(setpoints), min(ENERGIES)], [max(setpoints), max(ENERGIES)], [len(setpoints)-1, len(ENERGIES)-1])
scan = ManualScan(['field', 'Energy'], ['I0', 'TEY', 'TFY', 'polarization', 'temperature', 'RingCurrent', 'tey_norm','tfy_norm'] , [min(setpoints), min(ENERGIES)], [max(setpoints), max(ENERGIES)], [len(setpoints)-1, len(ENERGIES)-1])
scan.start()
# Main loop
for B in setpoints:
print "Setting field = ", B
caput("X11MA-XMCD:I-SETraw",B)
time.sleep( FIELD_CHANGE_SLEEP ) # Settling time
#readback1 = caget("X11MA-XMCD:Ireadout")
readback1 = field.read()
while abs(readback1-B) > FIELD_PRECISION:
#readback1 = caget("X11MA-XMCD:Ireadout")
readback1 = field.read()
print "Wait field is set"
time.sleep(0.1)
print "field setting done"
print "field readback is:", field.read()
for E in ENERGIES:
print "Setting energy = ", E
#caput('X11PHS-E:GO.A', E)
energy.write(E)
time.sleep (0.1)
print "Energy set"
cawait('X11PHS:alldone', 1)
print "done"
readback2 = energy.read()
if abs(readback2 - E) > 0.1 : # TODO: Check accuracy
raise Exception('Energy could not be set to the value ' + str(E))
sleep( ENERGY_CHANGE_SLEEP ) # Settling time
detector1 = keithley_1a.read() #Keithley1
detector2 = keithley_2a.read() #Keithley2
detector3 = keithley_3a.read() #Keithley3
detector4 = caget('X11MA-ID2:MODE') #polarization in ID2
#detector5 = caget("X11MA-ID2:ALPHA-READ") # polAngle in ID2
detector6 = caget('X11MA-ES3-LSCI:TEMP_RBV') #temperature.get()
detector7 = caget("ARIDI-PCT:CURRENT")
#detector8 = signal_field_analog_x.read() # fieldAnalogX.get()
tey_norm = detector2/detector1
tfy_norm = detector3/detector1
#converting polarization strings to integer numbers: C+ -> 1 and C- -> 2
if detector4 == 'CIRC +': detector4 = 1
elif detector4 == 'CIRC -': detector4 = 2
else: detector4 = 0
#print "step 7"
#scan.append ([B, E], [readback1, readback2], [detector1, detector2, detector4, detector6, detector7, tey_norm])
scan.append ([B, E], [readback1, readback2], [detector1, detector2, detector3, detector4, detector6, detector7, tey_norm, tfy_norm])
scan.end()
caput("X11MA-ES1-10ADC:AVG",1)
#close_vg13()

View File

@@ -0,0 +1,120 @@
#Parameters
sample_name='8nm_0p16A'
ENERGIES = (709,709) #list of energies in eV
#FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
#caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='V_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
# List of scans. Each scan is defined as: (start,stop, step)
# to make a whole loop two scans are needed: [(B1, B2, BSTEP),(B2,B1,-BSTEP)]
# to make half of a loop one scan is needed: [(B1, B2, BSTEP),] <- don't forget to put comma before ]
#RANGES = [(B1, B2, -BSTEP1),(B2, -B2, -BSTEP2),(-B2,-B1,-BSTEP1),(-B1,-B2,BSTEP1),(-B2,B2,BSTEP2),(B2,B1,BSTEP1)]
RANGES = [(150, 0, -20),(0, -150, -5),(-150,0,20),(0, 150,5)]
set_exec_pars(open=False, tag=FILENAME)
#open_vg13()
#Pre-actions
# Here polarization and offsets are set
caput ("X11PHS-E:OPT","PGM+ID2")
print "ID mode set to PGM+ID2"
#caput(OTF_OFF1,-50) #detune ID1
caput('X11MA-ID2:ENERGY-OFFS', OFFSET2)
print "ID offset set to ", OFFSET2
cawait('X11MA-ID2:DONE',1)
print "Offset setting done"
if MODE is 1 or 2:
caput('X11MA-ID2:MODE',MODE)
#print "Polarization mode set"
else:
raise Exception("Invalid polarization type: " + MODE)
cawait('X11MA-ID2:DONE',1)
print "ID mode setting done"
# setting number of samples to be averaged, which depends on the accumulation time
avg = ACC_TIME * 10
caput("X11MA-ES1-10ADC:AVG",avg)
# Generating a list of mag. fields (setpoints) needed for the loop
setpoints = []
for r in RANGES:
setpoints = setpoints + frange(r[0], r[1], r[2], True)
# plot properties
set_preference(Preference.ENABLED_PLOTS, ['field', 'tfy_norm'])
set_preference(Preference.PLOT_TYPES, {'tfy_norm':1})
scan = ManualScan(['field', 'Energy'], ['I0', 'TEY', 'TFY', 'polarization', 'temperature', 'RingCurrent', 'tey_norm','tfy_norm'] , [min(setpoints), min(ENERGIES)], [max(setpoints), max(ENERGIES)], [len(setpoints)-1, len(ENERGIES)-1])
#scan = ManualScan(['field'], ['Energy','I0', 'TEY', 'TFY', 'polarization', 'temperature', 'RingCurrent', 'tey_norm','tfy_norm'] , [min(setpoints)], [max(setpoints)], [len(setpoints)-1])
scan.start()
# Main loop
for B in setpoints:
print "Setting field = ", B
caput("X11MA-KEI13:SETVOLTAGE",B)
time.sleep( FIELD_CHANGE_SLEEP ) # Settling time
#time.sleep(0.5)
readback1 = caget('X11MA-KEI13:SETVOLTAGE')
#print "field setting done"
#print "field readback is:", field.read()
for E in ENERGIES:
print "Setting energy = ", E
#caput('X11PHS-E:GO.A', E)
energy.write(E)
time.sleep (0.1)
print "Energy set"
cawait('X11PHS:alldone', 1)
print "done"
readback2 = energy.read()
if abs(readback2 - E) > 0.1 : # TODO: Check accuracy
raise Exception('Energy could not be set to the value ' + str(E))
sleep( ENERGY_CHANGE_SLEEP ) # Settling time
detector1 = energy.read()
detector2 = keithley_1a.read() #Keithley1
detector3 = keithley_2a.read() #Keithley2
detector4 = keithley_3a.read() #Keithley3
detector5 = caget('X11MA-ID2:MODE') #polarization in ID2
#detector5 = caget("X11MA-ID2:ALPHA-READ") # polAngle in ID2
detector6 = caget('X11MA-ES3-LSCI:TEMP_RBV') #temperature.get()
detector7 = caget("ARIDI-PCT:CURRENT")
#detector8 = signal_field_analog_x.read() # fieldAnalogX.get()
tey_norm = detector2/detector1
tfy_norm = detector3/detector1
#converting polarization strings to integer numbers: C+ -> 1 and C- -> 2
if detector4 == 'CIRC +': detector4 = 1
elif detector4 == 'CIRC -': detector4 = 2
else: detector4 = 0
#print "step 7"
#scan.append ([B, E], [readback1, readback2], [detector1, detector2, detector4, detector6, detector7, tey_norm])
scan.append ([B, E], [readback1, readback2], [detector1, detector2, detector3, detector4, detector6, detector7, tey_norm, tfy_norm])
scan.end()
caput("X11MA-ES1-10ADC:AVG",1)
#close_vg13()

View File

@@ -0,0 +1,34 @@
#auto_intensity()
#time_sleep(2)
#TakeImage at 710 eV at the given polarization
# do autoajust, give 1 minute to settle, do image aquisition with 5 frame average and go to sleep after
# entire run should take 10 min per loop execution
#Constants
# otf_img(700, 750, time=1, delay = 0.1, exposure=0.2, roi="test", name="test", save_images=True)
AVERAGE1 = 1
AVERAGE2 = 5
EXPOSURE1 = 0.5
EXPOSURE2 = 1.0
MEASUREMENTS = 1
i = 0
#change_energy(709.4)
time.sleep(20)
for i in range(0, 30):
# open_vg10()
#time.sleep(1)
#auto_intensity()
#close_vg10()
time.sleep(30)
#open_vg10()
#otf_img(704, 720, time=1.5, delay = 0.1, exposure=0.5, roi="test", name="400C_H2", save_images=True)
#time.sleep(10)
#close_vg10()
abs_spec(ranges="Fe_L3__Arik_Beck_fine", roi="test", switch_pol = False, scans=1, exposure=EXPOSURE1, average=AVERAGE1)
time.sleep(10)
change_energy(709.4)
time.sleep(10)
take_image(scans=1, switch_pol=False, measurements=MEASUREMENTS, exposure=EXPOSURE1, average=AVERAGE2)
time.sleep(270)
print(i)

View File

@@ -0,0 +1,22 @@
#auto_intensity()
#time_sleep(2)
#TakeImage at 710 eV at the given polarization
# do autoajust, give 1 minute to settle, do image aquisition with 5 frame average and go to sleep after
# entire run should take 10 min per loop execution
#Constants
AVERAGE = 5
EXPOSURE = 1.0
MEASUREMENTS = 1
i = 0
change_energy(709.4)
time.sleep(60)
for i in range(0, 23):
# open_vg10()
#time.sleep(1)
#auto_intensity()
#close_vg10()
time.sleep(60)
take_image(scans=1, switch_pol=False, measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(534)
print(i)

View File

@@ -0,0 +1,23 @@
#Constants
AVERAGE = 1
EXPOSURE = 2.0
MEASUREMENTS = 50
Energies=[]
step=0.2
for item in range(0,20,1):
Energies.append(round(642.0 - item*step, 1))
#Energies=[ 640.8,641,641.2,641.4,641.6,] #5 maximum
#Energies=[637, 637.2, 637.4, 637.6, 637.8, 638, 638.2, 638.4, 638.6, 638.8, 639, 639.2, 639.4, 639.6, 639.8, 640, 640.5, 641]
#TakeImage at 710 eV at the given polarization
change_energy(638.2)
#TwoImages Two Pol with C+/C- and ID1 + ID2, tune-detune, at 710 eV
set_beamline_setup(id ="ID1_ID2", en=638.2, pol1="Circ_Plus", alp1=0.0, har1=1, off1=0.0, pol2="Circ_Minus", alp2=0.0, har2=1, off2=0.0)
time.sleep(2.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
for item in Energies:
change_energy(item)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)

View File

@@ -0,0 +1,49 @@
#Constants
AVERAGE = 3
EXPOSURE = 2.0
MEASUREMENTS = 50
#TakeImage at 710 eV at the given polarization
change_energy(639)
#take_image(scans=1, switch_pol=False, measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
#TwoImages Two Pol with Lin_hor/lin_ver and ID1 + ID2, tune-detune, at 638.8 eV
set_beamline_setup(id ="ID1_ID2", en=638.8, pol1="Lin_Hor", alp1=0.0, har1=1, off1=0.0, pol2="Lin_Ver", alp2=90.0, har2=1, off2=0.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
change_energy(637.5)
time.sleep(2.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
#TwoImages Two Pol with C+/C- and ID1 + ID2, tune-detune, at 710 eV
set_beamline_setup(id ="ID1_ID2", en=638.2, pol1="Circ_Plus", alp1=0.0, har1=1, off1=0.0, pol2="Circ_Minus", alp2=0.0, har2=1, off2=0.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
#TwoEnergies with lin hor polarization ID2 only (normal)
#set_beamline_setup(id ="ID2", en=710, pol1="Lin_Hor")
#two_energies(705, 710, measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
#time.sleep(2.0)
#abs_spec(ranges=[[500.0, 1000.0, 100.0],], switch_pol=False, scans=1, exposure=EXPOSURE, average=AVERAGE) #Use manulally defined ranges and rois defined in GUI
#abs_spec(ranges="C_edge", roi="test", switch_pol=False, scans=1, exposure=EXPOSURE, average=AVERAGE)
#manip_x.write(0.1)
#Direct functions to change energy, pol, offset:
#change_energy(700)
#change_pol(1, "Circ_Plus" ) #Pol on ID1: "Circ_Plus", "Circ_Minus" , "Lin_Hor", "Lin_Ver"
#change_pol(1, "Lin" , alpha = "0" ) #Lin pol on ID 1
#change_offset(1, 0.0) #offset on ID1
#Auto-switching:
#switch_pol()
#Restoring beamline state defined in last set_beamline_setut:
#restore_beamline_setup()

View File

@@ -0,0 +1,29 @@
#Constants
AVERAGE = 1
EXPOSURE = 1.0
MEASUREMENTS = 50
positions=[-510, -525, -540, -555, -570, -585]
for position in positions:
manip_x.write(position)
time.sleep(60)
#auto_intensity()
#time_sleep(2)
#TakeImage at 710 eV at the given polarization
change_energy(638.8)
#take_image(scans=1, switch_pol=False, measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
#TwoImages Two Pol with Lin_hor/lin_ver and ID1 + ID2, tune-detune, at 638.8 eV
set_beamline_setup(id ="ID1_ID2", en=638.8, pol1="Lin_Hor", alp1=0.0, har1=1, off1=0.0, pol2="Lin_Ver", alp2=90.0, har2=1, off2=0.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
change_energy(638.0)
time.sleep(2.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
#TwoImages Two Pol with C+/C- and ID1 + ID2, tune-detune, at 710 eV
set_beamline_setup(id ="ID1_ID2", en=638.2, pol1="Circ_Plus", alp1=0.0, har1=1, off1=0.0, pol2="Circ_Minus", alp2=0.0, har2=1, off2=0.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)

View File

@@ -0,0 +1,32 @@
#Constants
AVERAGE = 4
EXPOSURE = 2.0
MEASUREMENTS = 50
#TakeImage at 710 eV at the given polarization
#change_energy(639)
#take_image(scans=1, switch_pol=False, measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
#time.sleep(2.0)
#TwoImages Two Pol with Lin_hor/lin_ver and ID1 + ID2, tune-detune, at 638.8 eV
#set_beamline_setup(id ="ID1_ID2", en=638.9, pol1="Lin_Hor", alp1=0.0, har1=1, off1=0.0, pol2="Lin_Ver", alp2=90.0, har2=1, off2=0.0)
#two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
#time.sleep(2.0)
for i in range(1):
change_energy(638.2)
time.sleep(2.0)
#TwoImages Two Pol with C+/C- and ID1 + ID2, tune-detune, at 710 eV
set_beamline_setup(id ="ID1_ID2", en=638.2, pol1="Circ_Plus", alp1=0.0, har1=1, off1=0.0, pol2="Circ_Minus", alp2=0.0, har2=1, off2=0.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
change_energy(637.6)
time.sleep(2.0)
set_beamline_setup(id ="ID1_ID2", en=637.6, pol1="Lin_Hor", alp1=0.0, har1=1, off1=0.0, pol2="Lin_Ver", alp2=90.0, har2=1, off2=0.0)
time.sleep(2.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)

View File

@@ -0,0 +1,174 @@
#otf(start, end, time, delay = 0.0, mode = None, offset = None, alpha = None, name = None, folder = 'TEST')
#Sample M1
#TRY.write(-1.5)
#TRZ.write(14)
#time.sleep(30)
#open_vg13()
#time.sleep(1)
#caput('X11MA-ES3-MAG1:V', 2)
#time.sleep(15)
#caput('X11MA-KEI10:RANGE', 7)
#caput('X11MA-KEI11:RANGE', 8)
#caput('X11MA-KEI12:RANGE', 9)
#for i in range(2):
# time.sleep(1)
# otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M1_Cp')
# otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M1_Cm')
# otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M1_Cm')
# otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M1_Cp')
#otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M1_LH')
#otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M1_LV')
#otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M1_LV')
#otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M1_LH')
#Sample M2
#TRY.write(-0.9)
#TRZ.write(22.5)
#time.sleep(30)
#open_vg13()
#time.sleep(1)
#caput('X11MA-ES3-MAG1:V', 2)
#time.sleep(15)
#caput('X11MA-KEI10:RANGE', 7)
#caput('X11MA-KEI11:RANGE', 8)
#caput('X11MA-KEI12:RANGE', 9)
#for i in range(2):
# time.sleep(1)
# otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M2_Cp')
# otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M2_Cm')
# otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M2_Cm')
# otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M2_Cp')
#otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M2_LH')
#otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M2_LV')
#otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M2_LV')
#otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M2_LH')
#Sample M3
TRY.write(-0.9)
TRZ.write(30)
time.sleep(30)
open_vg13()
time.sleep(1)
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 9)#Changed th gain to 9 due to saturation
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M3_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M3_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M3_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M3_Cp')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M3_LH')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M3_LV')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M3_LV')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M3_LH')
#Sample M6
TRY.write(2.0)
TRZ.write(30.0)
time.sleep(30)
open_vg13()
time.sleep(1)
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 9)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M6_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M6_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M6_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M6_Cp')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M6_LH')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M6_LV')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M6_LV')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M6_LH')
#Sample M5
TRY.write(2.0)
TRZ.write(24.5)
time.sleep(30)
open_vg13()
time.sleep(1)
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 9)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_Cp')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M5_LH')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M5_LV')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M5_LV')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M5_LH')
#Sample M4
TRY.write(1.0)
TRZ.write(18)
time.sleep(30)
open_vg13()
time.sleep(1)
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 9)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M4_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M4_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M4_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M4_Cp')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M4_LH')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M4_LV')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M4_LV')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M4_LH')
close_vg13()

View File

@@ -0,0 +1,24 @@
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
sample_name='M4_150'
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(2):
#time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
close_vg13()

View File

@@ -0,0 +1,763 @@
#otf(start, end, time, delay = 0.0, mode = None, offset = None, alpha = None, name = None, folder = 'TEST')
#Sample M5 30V
'''
TRY.write(2.0)
TRZ.write(24.5)
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI11:VOLTOUT','ON')
caput('X11MA-KEI11:SETVOLTAGE',0)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',30)
time.sleep(10)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_30_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_30_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_30_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_30_Cp')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="Hyst_M5_30_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="Hyst_M5_30_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M5 -30
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI11:SETVOLTAGE',25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',0)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-5)
time.sleep(1)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-30)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-30_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-30_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-30_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-30_Cp')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="Hyst_M5_-30_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="Hyst_M5_-30_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M5 -50V
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI11:SETVOLTAGE',-35)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-40)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-45)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-50)
time.sleep(10)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-50_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-50_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-50_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-50_Cp')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="Hyst_M5_-50_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="Hyst_M5_-50_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M5 50V
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI11:SETVOLTAGE',-45)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-40)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-35)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-30)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',0)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',30)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',35)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',40)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',45)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',50)
time.sleep(10)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_50_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_50_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_50_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_50_Cp')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="Hyst_M5_50_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="Hyst_M5_50_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M5 70V
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI11:SETVOLTAGE',55)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',65)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',70)
time.sleep(10)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_70_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_70_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_70_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_70_Cp')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="Hyst_M5_70_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="Hyst_M5_70_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M5 -70V
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI11:SETVOLTAGE',65)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',60)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',55)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',50)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',45)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',40)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',35)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',30)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',0)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-30)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-35)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-40)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-45)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-50)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-55)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-60)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-65)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-70)
time.sleep(10)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-70_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-70_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-70_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-70_Cp')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="Hyst_M5_-70_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="Hyst_M5_-70_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M5 -100V
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI11:SETVOLTAGE',-75)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-80)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-85)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-90)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-95)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-100)
time.sleep(10)
'''
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-100_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-100_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-100_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-100_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-100_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-100_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-100_Cp')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="Hyst_M5_-100_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="Hyst_M5_-100_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#M5 100V
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI11:SETVOLTAGE',-95)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-90)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-85)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-80)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-75)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-70)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-65)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-60)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-55)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-50)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-45)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-40)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-35)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-30)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',0)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',30)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',35)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',40)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',45)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',50)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',55)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',60)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',65)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',70)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',75)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',80)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',85)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',95)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',100)
time.sleep(10)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_100_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_100_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_100_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_100_Cp')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="Hyst_M5_100_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="Hyst_M5_100_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
caput('X11MA-KEI11:SETVOLTAGE',95)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',90)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',85)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',80)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',75)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',70)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',65)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',60)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',55)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',50)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',45)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',40)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',35)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',30)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',0)
caput('X11MA-KEI11:VOLTOUT','OFF')
close_vg13()

View File

@@ -0,0 +1,67 @@
#otf(start, end, time, delay = 0.0, mode = None, offset = None, alpha = None, name = None, folder = 'TEST')
#Sample M5
TRY.write(2.0)
TRZ.write(24.5)
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
sample_name='M5_100_-20'
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
close_vg13()

View File

@@ -0,0 +1,78 @@
#otf(start, end, time, delay = 0.0, mode = None, offset = None, alpha = None, name = None, folder = 'TEST')
#Sample M5
TRY.write(2.0)
TRZ.write(24.5)
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
'''
caput('X11MA-KEI11:VOLTOUT','ON')
#caput('X11MA-KEI11:VOLTOUT',1)
caput('X11MA-KEI11:SETVOLTAGE',5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',20)
'''
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 9)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-20_0_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-20_0_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-20_0_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-20_0_Cp')
#HYST
'''
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="Hyst_M5_-20_0_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="Hyst_M5_-20_0_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
'''
close_vg13()

View File

@@ -0,0 +1,613 @@
#otf(start, end, time, delay = 0.0, mode = None, offset = None, alpha = None, name = None, folder = 'TEST')
#Sample M6 150
TRY.write(2.0)
TRZ.write(30.0)
open_vg13()
time.sleep(1)
'''
#XMCD
sample_name='M6_150'
v_start =0
v_end = 150
#run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
sample_name='M6_150_-20'
v_start =150
v_end = -20
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
#sample_name='M6_-150'
v_start =-20
v_end = -150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
sample_name='M6_-150'
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
#sample_name='M6_-150_55'
v_start =-150
v_end = 55
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
sample_name='M6_-150_55'
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
#sample_name='M6_150_0'
v_start =55
v_end = 150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
v_start =150
v_end = 0
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
sample_name='M6_150_0'
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
#sample_name='M6_-150_0'
v_start =0
v_end = -150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
v_start =-150
v_end = 0
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
sample_name='M6_-150_0'
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
#sample_name='M6_150'
v_start =0
v_end = 150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
'''
sample_name='M6_150'
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
sample_name='M6_150_-20'
v_start =150
v_end = -20
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
#sample_name='M6_-150'
v_start =-20
v_end = -150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
sample_name='M6_-150'
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
sample_name='M6_-150_55'
v_start =-150
v_end = 55
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
v_start =55
v_end = 0
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI11:VOLTOUT','OFF')
close_vg13()

View File

@@ -0,0 +1,2 @@
#otf2(start=703, end=715, time=0.2, delay=5, mode='LINEAR', alpha = 0.0, offset=-1.2, name='test')
otf2(start=450, end=475, time=3.0, delay=5, mode='CIRC -', alpha = 0.0, offset=-1.2, name='test')

View File

@@ -0,0 +1,22 @@
v_start= -20
v_end = 0
step_size=5
n=(v_start - v_end)/step_size
for i in range (int(abs(n))+1):
if v_start > v_end:
v=v_start - i*step_size
#print "reverse"
print ("Apply", v," volts")
caput('X11MA-KEI11:SETVOLTAGE',v)
sleep(0.1)
else:
v= i*step_size+v_start
print "forward"
print ("Apply", v," volts")
caput('X11MA-KEI11:SETVOLTAGE',v)
sleep(0.1)
sleep(20)

View File

@@ -0,0 +1,119 @@
#Parameters
sample_name='M4_120'
'''
FILENAME='Hyst_'+ sample_name + '_E2_Cm'
B1 = 1.0 # starting mag. field in Amps
B2 = -1.0 # final mag. field in Amps
BSTEP = 0.5 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 # time in 100ms
'''
# List of scans. Each scan is defined as: (start,stop, step)
# to make a whole loop two scans are needed: [(B1, B2, BSTEP),(B2,B1,-BSTEP)]
# to make half of a loop one scan is needed: [(B1, B2, BSTEP),] <- don't forget to put comma before ]
RANGES = [(B1, B2, -BSTEP),(B2,B1,BSTEP)]
set_exec_pars(open=False, tag=FILENAME)
#open_vg13()
#Pre-actions
# Here polarization and offsets are set
caput ("X11PHS-E:OPT","PGM+ID2")
print "ID mode set to PGM+ID2"
#caput(OTF_OFF1,-50) #detune ID1
caput('X11MA-ID2:ENERGY-OFFS', OFFSET2)
print "ID offset set to ", OFFSET2
cawait('X11MA-ID2:DONE',1)
print "Offset setting done"
if MODE is 1 or 2:
caput('X11MA-ID2:MODE',MODE)
#print "Polarization mode set"
else:
raise Exception("Invalid polarization type: " + MODE)
cawait('X11MA-ID2:DONE',1)
print "ID mode setting done"
# setting number of samples to be averaged, which depends on the accumulation time
avg = ACC_TIME * 10
caput("X11MA-ES1-10ADC:AVG",avg)
# Generating a list of mag. fields (setpoints) needed for the loop
setpoints = []
for r in RANGES:
setpoints = setpoints + frange(r[0], r[1], r[2], True)
# plot properties
set_preference(Preference.ENABLED_PLOTS, ['field', 'tey_norm'])
set_preference(Preference.PLOT_TYPES, {'tey_norm':1})
#scan = ManualScan(['field', 'Energy'], ['TEY', 'I0', 'polarization', 'temperature', 'RingCurrent', 'tey_norm'] , [min(setpoints), min(ENERGIES)], [max(setpoints), max(ENERGIES)], [len(setpoints)-1, len(ENERGIES)-1])
scan = ManualScan(['field', 'Energy'], ['I0', 'TEY', 'TFY', 'polarization', 'temperature', 'RingCurrent', 'tey_norm','tfy_norm'] , [min(setpoints), min(ENERGIES)], [max(setpoints), max(ENERGIES)], [len(setpoints)-1, len(ENERGIES)-1])
scan.start()
# Main loop
for B in setpoints:
print "Setting field = ", B
caput("X11MA-XMCD:I-SETraw",B)
time.sleep( FIELD_CHANGE_SLEEP ) # Settling time
#readback1 = caget("X11MA-XMCD:Ireadout")
readback1 = field.read()
while abs(readback1-B) > FIELD_PRECISION:
#readback1 = caget("X11MA-XMCD:Ireadout")
readback1 = field.read()
time.sleep(0.1)
for E in ENERGIES:
print "Setting energy = ", E
#caput('X11PHS-E:GO.A', E)
energy.write(E)
time.sleep (0.1)
print "Energy set"
cawait('X11PHS:alldone', 1)
print "done"
readback2 = energy.read()
if abs(readback2 - E) > 0.1 : # TODO: Check accuracy
raise Exception('Energy could not be set to the value ' + str(E))
sleep( ENERGY_CHANGE_SLEEP ) # Settling time
detector1 = keithley_1a.read() #Keithley1
detector2 = keithley_2a.read() #Keithley2
detector3 = keithley_3a.read() #Keithley3
detector4 = caget('X11MA-ID2:MODE') #polarization in ID2
#detector5 = caget("X11MA-ID2:ALPHA-READ") # polAngle in ID2
detector6 = caget('X11MA-ES3-LSCI:TEMP_RBV') #temperature.get()
detector7 = caget("ARIDI-PCT:CURRENT")
#detector8 = signal_field_analog_x.read() # fieldAnalogX.get()
tey_norm = detector2/detector1
tfy_norm = detector3/detector1
#converting polarization strings to integer numbers: C+ -> 1 and C- -> 2
if detector4 == 'CIRC +': detector4 = 1
elif detector4 == 'CIRC -': detector4 = 2
else: detector4 = 0
#print "step 7"
#scan.append ([B, E], [readback1, readback2], [detector1, detector2, detector4, detector6, detector7, tey_norm])
scan.append ([B, E], [readback1, readback2], [detector1, detector2, detector3, detector4, detector6, detector7, tey_norm, tfy_norm])
scan.end()
caput("X11MA-ES1-10ADC:AVG",1)
#close_vg13()

View File

@@ -0,0 +1,48 @@
open_vg13()
sample_name='M4_120'
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
close_vg13()

View File

@@ -0,0 +1,238 @@
time.sleep(1)
open_vg13()
open_vg13()
'''
#Sample M1
TRY.write(-1.5)
TRZ.write(14)
time.sleep(30)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.04 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.03 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.04 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.03 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M2
TRY.write(-0.9)
TRZ.write(22.5)
time.sleep(30)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.04 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.03 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="M2_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.04 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.03 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M3
TRY.write(-0.9)
TRZ.write(30)
time.sleep(30)
FILENAME="M3"
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="M3_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="M3_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
'''
#Sample M4
TRY.write(1.0)
TRZ.write(18)
time.sleep(30)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
FILENAME="M4_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="M4_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M5
TRY.write(2.0)
TRZ.write(24.5)
time.sleep(30)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
FILENAME="M5_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="M5_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M6
TRY.write(2.0)
TRZ.write(30)
time.sleep(30)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
FILENAME="M6_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="M6_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
close_vg13()

View File

@@ -0,0 +1,2 @@
#run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/2021_june_Energy.py')#there was a timeout in the second script, but this one was complete, so I re start from the second one
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/hyst_ID2_Fe_all_samples.py')

View File

@@ -0,0 +1,3 @@
#energy.write(710)
#time.sleep (2)
cawait('X11PHS:alldone', 0, timeout=5)

View File

@@ -0,0 +1,74 @@
#Constants
AVERAGE = 10
EXPOSURE = 5
MEASUREMENTS = 40
#TwoImages Two Pol with C+/C- and ID1 + ID2, tune-detune, at 710 eV
set_beamline_setup(id ="ID1_ID2", en=706.7, pol1="Circ_Plus", alp1=0.0, har1=1, off1=0.0, pol2="Circ_Minus", alp2=0.0, har2=1, off2=0.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
#TwoEnergies with lin hor polarization ID2 only (normal)
set_beamline_setup(id ="ID2", en=706.7, pol1="Lin_Hor")
two_energies(706.7, 703, measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
#TwoEnergies with lin hor polarization ID2 only (normal)
set_beamline_setup(id ="ID2", en=464.2, pol1="Lin_Hor")
two_energies(462.6, 458.2, measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
#Constants
AVERAGE2 = 4
EXPOSURE2 = 4.0
change_energy(703)
abs_spec(ranges="Fe_L32__Arik_Beck_fine", roi="saraROI", switch_pol=False, scans=1, exposure=EXPOSURE2, average=AVERAGE2)
#Constants
AVERAGE3 = 1
EXPOSURE3 = 4.0
change_energy(450)
abs_spec(ranges="Ti_Sara", roi="saraROI", switch_pol=False, scans=1, exposure=EXPOSURE3, average=AVERAGE3)
change_energy(523)
abs_spec(ranges="O_Sara", roi="saraROI", switch_pol=False, scans=1, exposure=EXPOSURE3, average=AVERAGE3)
#TakeImage at 710 eV at the given polarization
#change_energy(710)
#take_image(scans=1, switch_pol=False, measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
#time.sleep(2.0)
#TwoImages Two Pol with C+/C- and ID1 + ID2, tune-detune, at 710 eV
#set_beamline_setup(id ="ID1_ID2", en=710, pol1="Circ_Plus", alp1=0.0, har1=1, off1=0.0, pol2="Circ_Minus", alp2=0.0, har2=1, off2=0.0)
#two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
#time.sleep(2.0)
#TwoEnergies with lin hor polarization ID2 only (normal)
#set_beamline_setup(id ="ID2", en=710, pol1="Lin_Hor")
#two_energies(705, 710, measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
#time.sleep(2.0)
#abs_spec(ranges=[[500.0, 1000.0, 100.0],], switch_pol=False, scans=1, exposure=EXPOSURE, average=AVERAGE) #Use manulally defined ranges and rois defined in GUI
#Direct functions to change energy, pol, offset:
#change_energy(700)
#change_pol(1, "Circ_Plus" ) #Pol on ID1: "Circ_Plus", "Circ_Minus" , "Lin_Hor", "Lin_Ver"
#change_pol(1, "Lin" , alpha = "0" ) #Lin pol on ID 1
#change_offset(1, 0.0) #offset on ID1
#Auto-switching:
#switch_pol()
#Restoring beamline state defined in last set_beamline_setut:
#restore_beamline_setup()

View File

@@ -0,0 +1,11 @@
set_exec_pars(open=False)
print('la')
run("templates/Eiger2Img", { \
"METHOD": "Take_Image", "AUTO_SAVE": True, \
"MEASUREMENTS": 1, "EXPOSURE": 1, "AVERAGE": 1, \
"SWITCHING": None, "SEQUENCE": None, \
"ENERGY_1":None, "ENERGY_2":None, \
"NUMBER_SCANS":1, "SWITCH_POL": False, \
})

Some files were not shown because too many files have changed in this diff Show More