Files
x11ma/script/Users/PEEM/Armin/TestUserScript_Armin.py
gac-x11ma 1d75bc4535
2023-07-18 11:00:54 +02:00

46 lines
1.8 KiB
Python

##Constants
AVERAGE = 1
EXPOSURE = 1.0
MEASUREMENTS = 5
##TakeImage at 710 eV at the given polarization
change_energy(712)
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, pol2="Lin_Hor") -> causes problems?
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="Fe_L3_fine", roi="test", switch_pol=False, scans=1, exposure=EXPOSURE, average=AVERAGE)
#eiger.stop()
#eiger_threshold.write(7500)
#eiger.start()
#tscan(['ca://X11MA-PC-ET7000:SW-K'], points=10, interval=1.0, title='temperature', keep=False, name='tewsst', layout='table', provider='txt', auto_range=True, domain_axis='Time')
#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()
#
#for i in [-1.9, -2.0, -2.1]:
# girder_x.move(i, -1)
# rmu_ry.move(-4.477, -1)
# print "Do something"
# caput("X11MA-HG:X_SET", 1.9)