Closedown
This commit is contained in:
@@ -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|
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
after_scan()
|
||||
|
||||
Reference in New Issue
Block a user