From dd11a5f18b176d25a85732b4c307ed73ed0e6d58 Mon Sep 17 00:00:00 2001 From: gac-x03da Date: Wed, 31 Jan 2018 10:37:37 +0100 Subject: [PATCH] Closedown --- config/devices.properties | 4 ++-- script/optics/ExitSlitYScanKei.py | 11 ++--------- script/test/HoloFlyScan.py | 27 ++++++++++++++++++++------- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/config/devices.properties b/config/devices.properties index 108a5689..0e7f9329 100644 --- a/config/devices.properties +++ b/config/devices.properties @@ -109,8 +109,8 @@ ManipulatorCoolFlow=ch.psi.pshell.epics.ChannelDouble|X03DA-PC-BRONKHORST:GET-ME ManipulatorCoolFlowSet=ch.psi.pshell.epics.ChannelDouble|X03DA-PC-BRONKHORST:GET-SETPOINT|Read||true ps1=ch.psi.pshell.epics.AreaDetector|X03DA-ES-PS1:cam1 X03DA-ES-PS1:image1|||true op-ps1=ch.psi.pshell.epics.AreaDetector|X03DA-OP-PS1:cam1 X03DA-OP-PS1:image1|||true -OpticsCameraCentroidX=ch.psi.pshell.epics.ChannelDouble|X03DA-OP-PS1:Stats2:CentroidX_RBV|Read||true -OpticsCameraSigmaX=ch.psi.pshell.epics.ChannelDouble|X03DA-OP-PS1:Stats2:SigmaX_RBV|Read||true +OpticsCameraCentroidX=ch.psi.pshell.epics.ChannelDouble|X03DA-OP-PS1:Stats1:CentroidX_RBV|Read||true +OpticsCameraSigmaX=ch.psi.pshell.epics.ChannelDouble|X03DA-OP-PS1:Stats1:SigmaX_RBV|Read||true $dummy=ch.psi.pshell.epics.Motor|XXX|||false img=ch.psi.pshell.imaging.CameraSource|Scienta|||true cam1=ch.psi.pshell.imaging.MjpegSource|http://x03da-cam-1/axis-cgi/mjpg/video.cgi||-200| diff --git a/script/optics/ExitSlitYScanKei.py b/script/optics/ExitSlitYScanKei.py index e53cf4fd..7e7ce689 100644 --- a/script/optics/ExitSlitYScanKei.py +++ b/script/optics/ExitSlitYScanKei.py @@ -47,7 +47,7 @@ caput(KEI_DIODE + "RANGE", 6) # 200 nA #caput(KEI_RMU + "NPLC", 1) caput(KEI_RMU + "NAVG", 5) #caput(KEI_RMU + "TCOUNT", 1) -caput(KEI_RMU + "RANGE", 9) # 200 pA +caput(KEI_RMU + "RANGE", 8) # 2 nA time.sleep(1.0) @@ -65,11 +65,4 @@ def trig(): caput(KEI_DIODE + "DOFETCH", 1) caput(KEI_RMU + "DOFETCH", 1) -#FrontendHSize.write(2.0) -#FrontendVSize.write(3.0) - -try: - lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=trig, after_read=after_readout) -finally: - caput(KEI_DIODE + "DORESET", 1) - caput(KEI_RMU + "DORESET", 1) +lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=trig, after_read=after_readout) diff --git a/script/test/HoloFlyScan.py b/script/test/HoloFlyScan.py index 81967975..0bace77c 100644 --- a/script/test/HoloFlyScan.py +++ b/script/test/HoloFlyScan.py @@ -7,8 +7,6 @@ SENSORS (list) PHI_RANGE (tuple (min, max)) THETA_RANGE (tuple (min, max)) STEPS (tuple (phi, theta)) -LATENCY (double) -RELATIVE (BOOLEAN) ZIGZAG (BOOLEAN) """ @@ -19,14 +17,29 @@ adjust_sensors() set_adc_averaging() set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1}) +# time per scienta acquisition in seconds +time1 = time.time() +trig_scienta() +time2 = time.time() +scienta_time = (time2 - time1) * 1.01 + # time for one theta scan in seconds -TIME = 60 +THETA_NSTEPS = round((THETA_RANGE[1] - THETA_RANGE[0]) / THETA_STEP) + 1 +theta_time = scienta_time * THETA_STEPS + +PHI_STEP = 40.0 +PHI_NSTEPS = round((PHI_RANGE[1] - PHI_RANGE[0]) / PHI_STEP) + 1 +phi_positions = [PHI_RANGE[0] + PHI_STEP * i for i in range(PHI_NSTEPS)] try: - ascan((ManipulatorPhi, ManipulatorTheta), SENSORS, (PHI_RANGE[0], THETA_RANGE[0]), (PHI_RANGE[1], THETA_RANGE[1]), STEPS, LATENCY, RELATIVE, zigzag = ZIGZAG, before_read=before_readout, after_read = after_readout) - cscan(ManipulatorTheta, SENSORS, THETA_RANGE[0], THETA_RANGE[1], STEPS, time=TIME) - cscan( + for phi in phi_positions: + ManipulatorPhi.write(phi) + ManipulatorPhi.waitValueInRange(phi, 1.0, 100) + cscan(ManipulatorTheta, SENSORS, THETA_RANGE[0], THETA_RANGE[1], STEPS, time=TIME, before_read=before_readout, after_read = after_readout) + if ZIGZAG: + THETA_RANGE = (THETA_RANGE[1], THETA_RANGE[0]) finally: if ENDSCAN: - after_scan() \ No newline at end of file + after_scan() + \ No newline at end of file