This commit is contained in:
gac-x11ma
2020-02-04 12:08:13 +01:00
parent a0b61220e9
commit 27152efce8
9 changed files with 243 additions and 233 deletions

View File

@@ -1,17 +1,6 @@
#If running from editor
if get_exec_pars().source == CommandSource.ui:
ID = "ID2"
SWITCHING = "Normal"
POL_ID_1 = "Circ_Plus"
ALPHA_ID_1 = 0.0
HARMONIC_ID_1 = 1
OFFSET_ID_1 = 0.0
POL_ID_2 = "Circ_Minus"
ALPHA_ID_2 = 0.0
HARMONIC_ID_2 = 1
OFFSET_ID_2 = 0.0
ROI = {"Region1": [10,5,20, 10], "Region2": [20,15,20, 10]}
SAVE_SPECTRUM = True
SAVE_IMAGES = False
WITH_I0 = True
@@ -83,24 +72,15 @@ set_device_alias(averager, "Image") #Set display name
sensors.append(averager) #sensors.append(eiger.getDataMatrix())
#Initialize vartiables
open_vg10()
if not DRY_RUN:
open_vg10()
if ID=='ID1':
caput('X11PHS-E:OPT',1)
elif ID=='ID2':
caput('X11PHS-E:OPT',2)
elif ID =='ID1_ID2':
caput('X11PHS-E:OPT',3)
put_id_offset(1, OFFSET_ID_1) #offset on ID1
put_id_offset(2, OFFSET_ID_2) #offset on ID2
#put_id_offset(1, OFFSET_ID_1) #offset on ID1
#put_id_offset(2, OFFSET_ID_2) #offset on ID2
active_id = 1
current_pol=None
polID1=None
polID2=None
"""
if ID == "ID1":
current_pol=POL_IDS[POL_ID_1] #get_id_pol(1)
put_id_pol(1,current_pol)
@@ -116,6 +96,7 @@ elif ID == "ID1_ID2":
put_id_pol(1,polID1)
put_id_pol(2,polID2)
wait_channel("X11PHS:alldone", 1)
"""
try:
#tscan(rois, 10, 0.1, format="csv", before_read=grab_image, passes = NUMBER_SCANS, tag=tag)
@@ -124,6 +105,7 @@ finally:
if AVERAGE>1:
for i in range(len(rois)):
rois[i].parent.monitored = False # Remove listeners on the image
close_vg10()
if not DRY_RUN:
close_vg10()
eiger.grabMode=eiger.GrabMode.Continuous
eiger.start()