Commit dd2d884a authored by id13 blissadm's avatar id13 blissadm

- changes eh2

parent 09cbe38a
......@@ -100,7 +100,6 @@ def akmap(fast_mot, xmin, xmax, x_nb_points,
e.deletememoryfiles()
return scan
def _add_detectors(chain,top_master,enabled_counters_name, vlms_cameras_name,
nb_points, expo_time, latency_time, frames_per_file,save_flag,
xmap_save_spectra=False):
......@@ -158,8 +157,8 @@ def _add_detectors(chain,top_master,enabled_counters_name, vlms_cameras_name,
#P201
if 'p201_eh3_0' in enabled_counters_name:
p201 = setup_globals.p201_eh3_0
if 'p201_eh2_0' in enabled_counters_name:
p201 = setup_globals.p201_eh2_0
p201_master = CT2AcquisitionMaster(p201,
npoints=nb_points,
acq_mode=P201AcqMode.ExtGate)
......@@ -195,6 +194,7 @@ def dkmap(fast_mot, xmin, xmax, x_nb_points,
with cleanup(fast_mot, slow_mot, restore_list=(cleanup_axis.POS, )):
return akmap(fast_mot, xmin, xmax, x_nb_points, slow_mot, ymin, ymax, y_nb_points, expo_time, latency_time, save_flag)
class KmapCScanDisplay(object):
def __init__(self,detectors, mcas, nb_points):
self.nb_points = nb_points
......@@ -229,6 +229,7 @@ class KmapCScanDisplay(object):
@contextmanager
def _multiplexer(multiplexer, musst_device):
started = time.time()
"""
musst_device.putget("IO !IO9") # Force shutter to be closed
multiplexer.switch('DET1_POL', 'NORMAL') # XIA negative logic on O2
multiplexer.switch('DET2_POL', 'INVERTED') # Eiger positive on O3
......@@ -236,9 +237,11 @@ def _multiplexer(multiplexer, musst_device):
multiplexer.switch('DET4_POL', 'INVERTED')
multiplexer.switch('DETECTOR', 'MUSST_BTRIG')
multiplexer.switch('shutter','MUSST_GATE_BACK',synchronous=True)
"""
try:
yield
finally:
"""
multiplexer.switch('DET1_POL', 'NORMAL')
multiplexer.switch('DET2_POL', 'NORMAL')
multiplexer.switch('DET3_POL', 'NORMAL')
......@@ -246,6 +249,7 @@ def _multiplexer(multiplexer, musst_device):
multiplexer.switch('DETECTOR', 'P201')
multiplexer.switch('SHUTTER','P201')
musst_device.putget("IO !IO9") # Force shutter to be closed
"""
print 'Took: %s seconds' % (time.time()-started)
def akmap_lut(fast_mot, xmin, xmax, x_nb_points,expo_time,
......@@ -273,11 +277,10 @@ def akmap_lut(fast_mot, xmin, xmax, x_nb_points,expo_time,
undershoot=None
fast_master = MotorMaster(fast_mot, xmin, xmax, x_nb_points*expo_time, undershoot=undershoot)
top_master = VariableStepTriggerMaster(*slow_motors_positions,
broadcast_len=x_nb_points)
top_master = VariableStepTriggerMaster(*slow_motors_positions,broadcast_len=x_nb_points)
chain.add(top_master,fast_master)
musst_device = setup_globals.musst
musst_device = setup_globals.musst_eh2
#vlms cameras
vlms_cameras_name = [x for x in enabled_counters_name if x.startswith('vlm')]
#for now abort musst program (workaround)
......@@ -358,7 +361,7 @@ def akmap_lut(fast_mot, xmin, xmax, x_nb_points,expo_time,
scan = Scan(chain,name='kmap_lut',
scan_info=scan_info,
data_watch_callback=display)
multiplexer = setup_globals.multiplexer_eh3
multiplexer = None #setup_globals.multiplexer_eh2
with _multiplexer(multiplexer, musst_device):
try:
scan.run()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment