This commit is contained in:
voulot_d
2017-04-03 15:26:17 +02:00
parent 42714841e3
commit 2da9d35635
5 changed files with 20 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
#Mon Apr 03 11:24:29 CEST 2017
#Mon Apr 03 15:18:48 CEST 2017
colormap=Temperature
colormapAutomatic=true
colormapMax=578.797
@@ -18,8 +18,8 @@ roiY=0
rotation=0.0
rotationCrop=false
scale=1.0
spatialCalOffsetX=9324.4111328125
spatialCalOffsetY=11107.228515625
spatialCalOffsetX=-685.5355704856097
spatialCalOffsetY=-874.5371885002435
spatialCalScaleX=-13.612279109045152
spatialCalScaleY=-12.708499394975416
spatialCalUnits=mm

View File

@@ -12,9 +12,9 @@ else:
step = args[2]
nb = int(args[3])
lat = args[4]
phase = ControlledVariable("Phase", "SINEG01-RSYS:SET-VSUM-PHASE", "SINEG01-RSYS:GET-VSUM-PHASE")
phase = ControlledVariable("Phase", "SINEG01-RSYS:SET-VSUM-PHASE", "SINEG01-RSYS:SET-VSUM-PHASE")
phase.config.minValue =-180.0
phase.config.maxValue = 180.0
phase.config.resolution = 0.5
@@ -38,8 +38,8 @@ finally:
#st.close()
#Setting the return value
y = charge
x = rf_phase
y = charge
x = rf_phase
index_max = y.index(max(y))
phase_ref = x[index_max] - 80
phase_offset = - phase_ref

View File

@@ -306,6 +306,7 @@ if get_context().isServerEnabled():
#Managing local camtool server
CAMTOOL_SERVER_SCRIPT = "camtool_pshell" #"cam_server"
PRINT_CAMTOOL_OUTPUT = True #When process quit
def _get_camtool_port():
return camtool.url[camtool.url.rfind(":")+1:]
@@ -326,7 +327,10 @@ def kill_camtool():
def _run_camtool():
try:
#cmd = "source /opt/gfa/python\n"
cmd = CAMTOOL_SERVER_SCRIPT + " -p " + _get_camtool_port() + " -b /afs/psi.ch/intranet/SF/Applications/config/camtool_n > /dev/null &"
cmd = CAMTOOL_SERVER_SCRIPT + " -p " + _get_camtool_port() + " -b /afs/psi.ch/intranet/SF/Applications/config/camtool_n"
if not PRINT_CAMTOOL_OUTPUT:
cmd = cmd + " > /dev/null 2>&1"
print "Executing: ", cmd
print exec_cmd(cmd)
except:
import traceback
@@ -343,7 +347,7 @@ def check_camtool():
while not is_camtool_running():
if time.time() - start > 2.0:
raise Exception("Error starting camtool process")
time.sleep(0.1)
time.sleep(0.5)
def bsget(channel):
"""

View File

@@ -1,7 +0,0 @@
class PseudoDevice(ReadonlyRegisterBase):
def doRead(self):
return gun_solenoid.take()/gun_phase.take()
add_device(PseudoDevice("pseudo_device"), True)
pseudo_device.triggers = [gun_solenoid, gun_phase]

View File

@@ -0,0 +1,7 @@
class PseudoDevice(ReadonlyRegisterBase):
def doRead(self):
return gun_solenoid.readback.take()+gun_phase.readback.take()
add_device(PseudoDevice("pseudo_device"), True)
pseudo_device.triggers = [gun_solenoid.readback, gun_phase.readback]