Startup
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
#Thu Mar 17 10:55:30 CET 2016
|
||||
#Fri Apr 15 15:24:21 CEST 2016
|
||||
autoSaveScanData=true
|
||||
createSessionFiles=false
|
||||
dataLayout=default
|
||||
dataPath={data}/{year}_{month}/{date}/{date}_{time}_{name}
|
||||
dataProvider=default
|
||||
dataScanFlushRecords=true
|
||||
dataServerPort=-1
|
||||
devicePoolFile={config}/devices.properties
|
||||
deviceUpdateStrategyFile={config}/update.properties
|
||||
logDaysToLive=-1
|
||||
logLevel=Info
|
||||
logLevelConsole=Off
|
||||
logPath={logs}/{date}_{time}
|
||||
scanStreamerPort=-1
|
||||
scanStreamingPort=-1
|
||||
serverEnabled=true
|
||||
serverPort=8080
|
||||
@@ -21,6 +23,6 @@ terminalPort=3579
|
||||
userAuthenticator=
|
||||
userManagement=false
|
||||
versionTrackingEnabled=true
|
||||
versionTrackingLogin=
|
||||
versionTrackingManual=true
|
||||
versionTrackingRemote=https\://git.psi.ch/pshell_config/x06da.git
|
||||
versionTrackingLogin={context}/svcusr-hlapp_robot\u200E
|
||||
versionTrackingManual=false
|
||||
versionTrackingRemote=git@git.psi.ch\:pshell_config/x06da.git
|
||||
|
||||
@@ -4,7 +4,7 @@ current=ch.psi.pshell.epics.ChannelDouble|ARIDI-PCT:CURRENT|Read||true
|
||||
i0=ch.psi.pshell.epics.ChannelDouble|X06DA-ES-I0:READOUT 6|Read||true
|
||||
diode=ch.psi.pshell.epics.ChannelDouble|X06DA-ES-DIODE:READOUT|Read||true
|
||||
cats_block=ch.psi.pshell.epics.BinaryPositioner|X06DA-ES-CATS:BLOCKED|Read||true
|
||||
exp_shutter=ch.psi.pshell.epics.BinaryPositioner|X06DA-ES-PH1:SET X06DA-ES-PH1:GET|Read||true
|
||||
exp_shutter=ch.psi.pshell.epics.BinaryPositioner|X06DA-ES-PH1:SET X06DA-ES-PH1:GET|||true
|
||||
ketek=ch.psi.pshell.epics.BinaryPositioner|X06DA-ES-FD:SET-POS X06DA-ES-FD:GET-POS|Read||true
|
||||
beam_stop_pos=ch.psi.pshell.epics.BinaryPositioner|X06DA-ES-BS:SET-POS X06DA-ES-BS:GET-POS|Read||true
|
||||
det_cover=ch.psi.pshell.epics.DiscretePositioner|X06DA-ES-PILCOV:SET|Read||true
|
||||
|
||||
@@ -1 +1,9 @@
|
||||
ch.psi.jcae.ContextFactory.maxArrayBytes=10000000
|
||||
#Fri Apr 15 15:21:04 CEST 2016
|
||||
ch.psi.jcae.ContextFactory.maxArrayBytes=10000000
|
||||
ch.psi.jcae.ContextFactory.addressList=
|
||||
ch.psi.jcae.ChannelFactory.retries=1
|
||||
ch.psi.jcae.ChannelFactory.timeout=500
|
||||
ch.psi.jcae.impl.DefaultChannelService.retries=2
|
||||
ch.psi.jcae.impl.DefaultChannelService.timeout=500
|
||||
ch.psi.jcae.impl.DefaultChannelService.waitTimeout=
|
||||
ch.psi.jcae.impl.DefaultChannelService.waitRetryPeriod=10000
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#Tue Nov 24 11:34:27 CET 2015
|
||||
#Fri Apr 15 14:05:22 CEST 2016
|
||||
colormap=Grayscale
|
||||
colormapAutomatic=false
|
||||
colormapMax=255.0
|
||||
colormapMin=0.0
|
||||
flipHorizontally=false
|
||||
flipVertically=false
|
||||
flipVertically=true
|
||||
grayscale=false
|
||||
invert=false
|
||||
rescaleFactor=1.0
|
||||
rescaleOffset=0.0
|
||||
rotation=0.0
|
||||
rotation=90.0
|
||||
scale=1.0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#Fri Dec 18 10:06:09 CET 2015
|
||||
#Fri Apr 15 10:41:00 CEST 2016
|
||||
defaultSpeed=0.05000000074505806
|
||||
estbilizationDelay=0
|
||||
hasEnable=false
|
||||
@@ -9,6 +9,6 @@ minSpeed=0.00800000037997961
|
||||
minValue=-26.0
|
||||
offset=0.0
|
||||
precision=5
|
||||
resolution=1.0E-4
|
||||
resolution=5.0E-4
|
||||
scale=1.0
|
||||
unit=deg
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#Thu Nov 26 16:06:20 CET 2015
|
||||
#Fri Apr 15 10:41:27 CEST 2016
|
||||
defaultSpeed=0.05000000074505806
|
||||
estbilizationDelay=0
|
||||
hasEnable=false
|
||||
@@ -9,6 +9,6 @@ minSpeed=0.00800000037997961
|
||||
minValue=-1.0149999856948853
|
||||
offset=0.0
|
||||
precision=5
|
||||
resolution=3.9999998989515007E-5
|
||||
resolution=5.0E-4
|
||||
scale=1.0
|
||||
unit=deg
|
||||
|
||||
@@ -16,7 +16,7 @@ if int(ENERGY) < 6:
|
||||
|
||||
# if theta1 and theta2 differ too much (>0.01deg), rock won't work well, sete should be used in this case
|
||||
# 20130614, change threshold from 0.015 to 0.02
|
||||
if abs(THETA1 - THETA2) > 0.02:
|
||||
if abs(THETA1 + THETA2) > 0.02:
|
||||
raise Exception("Two mono crystals are not synchronized, please use 'sete()'")
|
||||
#
|
||||
# check the flux
|
||||
@@ -82,7 +82,7 @@ POSV = int(BPM1POSV * 1000)
|
||||
if POSV <= -6 or POSV >= 6 :
|
||||
print "Beam is not aligned at E-BOX BPM1"
|
||||
print "lets fix it."
|
||||
fbm()
|
||||
#fbm()
|
||||
time.sleep(2)
|
||||
else :
|
||||
print "Beam is aligned at E-BOX BPM1,"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""
|
||||
Diode scan
|
||||
"""
|
||||
|
||||
|
||||
asd
|
||||
#Execute the scan: 200 steps, a1 from 0 to 40
|
||||
|
||||
+8
-3
@@ -163,11 +163,16 @@ def flux_diode():
|
||||
"""
|
||||
"""
|
||||
run("flux_diode")
|
||||
|
||||
def sete(e, all=True, wavelengt=False):
|
||||
|
||||
def sete(e, all=True, wavelength=False):
|
||||
run("sete", {"e":e, "all":all, "wavelength":wavelength})
|
||||
|
||||
def seteq(e):
|
||||
def seteq(e):
|
||||
run("seteq", {"e":e})
|
||||
|
||||
|
||||
def check_rock():
|
||||
run("check_rock")
|
||||
|
||||
|
||||
import ch.psi.pshell.device.ReadonlyRegisterBase as ReadonlyRegisterBase
|
||||
|
||||
+2
-2
@@ -38,10 +38,10 @@ def rock(axis = th1, tt = 0.2, seti0 = False, dx = None, noref = False):
|
||||
br = mono_beam.read()
|
||||
mono_beam_ref.write(br)
|
||||
print 'rock_success new mono beam at ' + str(br) + ' at' + str(e) + ' keV'
|
||||
return true
|
||||
return True
|
||||
else:
|
||||
print 'fit failed - centering on maximum'
|
||||
max_x= xdata[ydata.index(max(ydata))]
|
||||
axis.move(max_x)
|
||||
return false
|
||||
return False
|
||||
|
||||
+4
-4
@@ -37,14 +37,14 @@ act = 0
|
||||
|
||||
# do a setenergy to move theta 1 and 2 to calculated position in case they are not synchronized.
|
||||
theta1 = th1.read() #TODO: setpoint?
|
||||
etheta1 = a2e(abs(theta1),1,1,1,True)
|
||||
etheta1 = a2e(abs(theta1),1,1,1,deg=True,ln=True)
|
||||
theta2 = th2.read()
|
||||
etheta2 = a2e(ABS(theta2),1,1,1,True)
|
||||
etheta2 = a2e(abs(theta2),1,1,1,deg=True,ln=False)
|
||||
if abs (etheta1-etheta2) > 0.01:
|
||||
set_energy(e)
|
||||
|
||||
|
||||
while abs(e-e0) > 3e-5/tan(angle(e, deg=False)): #TODO: deg==false? WHILE ABS(e-e0) GT 3e-5/TAN(ANGLE(e)) DO BEGIN
|
||||
while abs(e-e0) > 3e-5/math.tan(angle(e, deg=False)): #TODO: deg==false? WHILE ABS(e-e0) GT 3e-5/TAN(ANGLE(e)) DO BEGIN
|
||||
set_energy(e)
|
||||
e0 = get_energy(False)
|
||||
|
||||
@@ -75,7 +75,7 @@ rock()
|
||||
e0 = get_energy()
|
||||
print e0
|
||||
mono_energy.write(e0)
|
||||
print caget(mono_energy.read())
|
||||
print mono_energy.read()
|
||||
|
||||
caput(beam_err, 'Finito')
|
||||
caput(beam_set, 'DONE')
|
||||
|
||||
+47
-46
@@ -33,59 +33,60 @@ print "X06DA-ES-BPM1:POSV BEFORE" + str(eboxbpm0)
|
||||
#--------------- setting theta 1, 2 --------------------
|
||||
|
||||
# adjust 'Retry deadband' to 0.0001 (from 0.00004) and 'Retries Max' to 1 (from 5)
|
||||
caput(th1.channelName +'.RDBD',0.00001)
|
||||
caput(th2.channelName +'.RDBD',0.00001)
|
||||
caput(th1.channelName +'.RTRY',1)
|
||||
caput(th2.channelName +'.RTRY',1)
|
||||
try:
|
||||
caput(th1.channelName +'.RDBD',0.00001)
|
||||
caput(th2.channelName +'.RDBD',0.00001)
|
||||
caput(th1.channelName +'.RTRY',1)
|
||||
caput(th2.channelName +'.RTRY',1)
|
||||
|
||||
#in order to do a small energy change without rock,
|
||||
# 1) move theta2 to calculated angle
|
||||
# 2) move theta1 to exact amount as theta2 moved
|
||||
#
|
||||
while abs(e-e0) > (3e-5 / math.tan(angle(e, deg=False)))): #TODO: deg==false? WHILE ABS(e-e0) GT 3e-5/TAN(ANGLE(e)) DO BEGIN
|
||||
t1v = th1.read() #TODO: setpoint?
|
||||
t2v = th2.read()
|
||||
t2s = angle(float(e),1,1,1)
|
||||
dt2 = t2s-t2v
|
||||
dt1 = -dt2
|
||||
t1p = t1v+dt1
|
||||
t2p = t2s # which is t2v+dt2
|
||||
print 'set angles th1, th2, relative move dt1, dt2 ', t1p, t2p, dt1, dt2
|
||||
th1.move(t1p)
|
||||
th2.move(t2p)
|
||||
eo=get_energy(False)
|
||||
time.sleep(2.0)
|
||||
Inow = mono_beam.read()
|
||||
print e, Istart, Inow
|
||||
#in order to do a small energy change without rock,
|
||||
# 1) move theta2 to calculated angle
|
||||
# 2) move theta1 to exact amount as theta2 moved
|
||||
|
||||
while (abs(e-e0) > (3e-5 / math.tan(angle(e, deg=False)))):
|
||||
t1v = th1.read() #TODO: setpoint?
|
||||
t2v = th2.read()
|
||||
t2s = angle(float(e),1,1,1, deg=True)
|
||||
dt2 = t2s-t2v
|
||||
dt1 = -dt2
|
||||
t1p = t1v+dt1
|
||||
t2p = t2s # which is t2v+dt2
|
||||
print 'set angles th1, th2, relative move dt1, dt2 ', t1p, t2p, dt1, dt2
|
||||
th1.move(t1p)
|
||||
th2.move(t2p)
|
||||
e0=get_energy(False)
|
||||
time.sleep(2.0)
|
||||
Inow = mono_beam.read()
|
||||
print e, Istart, Inow
|
||||
|
||||
# feedback at BPM5
|
||||
eboxbpm = es_beam_posv.read()
|
||||
while abs(eboxbpm-eboxbpm0) > 0.002:
|
||||
if (eboxbpm-eboxbpm0) >0:
|
||||
th1.moveRel(-0.00004)
|
||||
else:
|
||||
th1.moveRel(0.00004)
|
||||
|
||||
time.sleep(1.0)
|
||||
eboxbpm = es_beam_posv.read()
|
||||
# if BPM1:POSV is too off, stop it
|
||||
if eboxbpm > 0.050:
|
||||
raise Exception("BPM1:POSV is too off")
|
||||
|
||||
# put 'Retry deadband' to 0.00004 and 'Retries Max' to 5
|
||||
# wait a bit until motor movement finished (of course, this won't work if move across large energy range. but who use seteq to do that.)
|
||||
time.sleep(0.2)
|
||||
|
||||
# feedback at BPM5
|
||||
eboxbpm = es_beam_posv.read()
|
||||
while abs(eboxbpm-eboxbpm0) > 0.002:
|
||||
if (eboxbpm-eboxbpm0) >0:
|
||||
th1.moveRel(-0.00004)
|
||||
else:
|
||||
th1.moveRel(0.00004)
|
||||
|
||||
time.sleep(1.0)
|
||||
eboxbpm = es_beam_posv.read()
|
||||
# if BPM1:POSV is too off, stop it
|
||||
if eboxbpm > 0.050:
|
||||
raise Exception("BPM1:POSV is too off")
|
||||
|
||||
|
||||
# put 'Retry deadband' to 0.00004 and 'Retries Max' to 5
|
||||
# wait a bit until motor movement finished (of course, this won't work if move across large energy range. but who use seteq to do that.)
|
||||
time.sleep(0.2)
|
||||
caput(th1.channelName +'.RDBD',0.00004)
|
||||
caput(th2.channelName +'.RDBD',0.00004)
|
||||
caput(th1.channelName +'.RTRY',5)
|
||||
caput(th2.channelName +'.RTRY',5)
|
||||
finally:
|
||||
caput(th1.channelName +'.RDBD',0.00004)
|
||||
caput(th2.channelName +'.RDBD',0.00004)
|
||||
caput(th1.channelName +'.RTRY',5)
|
||||
caput(th2.channelName +'.RTRY',5)
|
||||
|
||||
e0 = get_energy()
|
||||
print e0
|
||||
mono_energy.write(e0)
|
||||
print caget(mono_energy.read())
|
||||
print mono_energy.read()
|
||||
|
||||
|
||||
# release the token!
|
||||
|
||||
Reference in New Issue
Block a user