From a7cc5f866cef2cd40d3349254eb65e2643e8b36e Mon Sep 17 00:00:00 2001 From: voulot_d Date: Thu, 20 Apr 2017 12:13:08 +0200 Subject: [PATCH] Startup --- devices/CurrentCamera.properties | 12 ++++++------ script/RFscan/phase_scan_caqtdm_sim.py | 21 +++++++++++---------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/devices/CurrentCamera.properties b/devices/CurrentCamera.properties index 02dfc2b..5e035f4 100644 --- a/devices/CurrentCamera.properties +++ b/devices/CurrentCamera.properties @@ -1,7 +1,7 @@ -#Wed Apr 19 16:17:06 CEST 2017 +#Thu Apr 20 11:04:47 CEST 2017 colormap=Flame colormapAutomatic=true -colormapMax=0.0 +colormapMax=200.0 colormapMin=0.0 flipHorizontally=false flipVertically=false @@ -21,9 +21,9 @@ rotation=0.0 rotationCrop=false scale=1.0 serverURL=localhost\:10000 -spatialCalOffsetX=-87.38325966970284 -spatialCalOffsetY=-54.36734816477289 -spatialCalScaleX=-26.761819847879956 -spatialCalScaleY=-26.595745475924744 +spatialCalOffsetX=-1093.4812581603794 +spatialCalOffsetY=-1098.5114274849898 +spatialCalScaleX=-7.617446798629459 +spatialCalScaleY=-7.774538463917676 spatialCalUnits=mm transpose=false diff --git a/script/RFscan/phase_scan_caqtdm_sim.py b/script/RFscan/phase_scan_caqtdm_sim.py index b85b354..fd142e5 100644 --- a/script/RFscan/phase_scan_caqtdm_sim.py +++ b/script/RFscan/phase_scan_caqtdm_sim.py @@ -1,7 +1,7 @@ import ch.psi.pshell.epics.ControlledVariable as ControlledVariable if get_exec_pars().source == CommandSource.ui: - station = "SINSB04" + station = "STEST01" bpm_ch = "SINBC02-DBPM140" else: station = args[0] @@ -15,15 +15,18 @@ nb = caget(station + "-RSYS:SET-NUM-AVERAGE") disp = caget(bpm_ch + ":DISPERSION") energy0 = caget(bpm_ch + ":ENERGY") -phase = ControlledVariable("Phase", station + "-RSYS:SET-VSUM-PHASE-SIM", station + "-RSYS:GET-VSUM-PHASE-SIM") -phase.config.minValue =-45.0 + +phase = ControlledVariable("Phase", station + "-RSYS:SET-VSUM-PHASE", station + "-RSYS:SET-VSUM-PHASE") +phase.config.minValue =-180.0 phase.config.maxValue = 360.0 phase.config.resolution = 0.5 phase.initialize() -V = Channel(station + "-RSYS:GET-VSUM-AMPLT-SIM", type = 'd', alias='Amplitude Readback') -P = Channel(station + "-RSYS:GET-KLY-POWER-SIM", type = 'd', alias='Power Readback') -x = Channel(bpm_ch + ":X1-SIMU", type = 'd', alias='BPM-X') +V = Channel(station + "-RSYS:GET-VSUM-AMPLT", type = 'd', alias='Amplitude Readback') +P = Channel(station + "-RSYS:GET-KLY-POWER", type = 'd', alias='Power Readback') +x = Channel(bpm_ch + ":X1-SIMU", type = 'd', alias='BPM-X') + +phase0 = phase.read() caput(station + "-RSYS:GET-FIT-PHASE-ARRAY", to_array([0.0],'d')) caput(station + "-RSYS:GET-FIT-ENERGY-ARRAY", to_array([0.0],'d')) @@ -31,9 +34,6 @@ caput(station + "-RSYS:GET-ONCREST-VSUM-PHASE", float('nan')) caput(station + "-RSYS:GET-ONCREST-VSUM-AMPLT", float('nan')) caput(station + "-RSYS:GET-ONCREST-E-GAIN", float('nan')) caput(station + "-RSYS:GET-ONCREST-KLY-POWER", float('nan')) -caput(station + "-RSYS:CALC-VSUM-PHASE-OFFSET", float('nan')) -caput(station + "-RSYS:CALC-VSUM-AMPLT-SCALE" , float('nan')) -caput(station + "-RSYS:CALC-VOLT-POWER-SCALE" , float('nan')) #update the plot dynamically arr_phase,arr_energy = [],[] @@ -41,8 +41,8 @@ def after(rec): global disp, energy0 arr_phase.append(rec.positions[0]) arr_energy.append(rec.values[0].mean/1000.0/disp*energy0) - caput(station + "-RSYS:GET-ENERGY-ARRAY", to_array(arr_energy,'d')) caput(station + "-RSYS:GET-PHASE-ARRAY", to_array(arr_phase, 'd')) + caput(station + "-RSYS:GET-ENERGY-ARRAY", to_array(arr_energy,'d')) try: xb = create_averager(x, nb, 0.100) @@ -70,6 +70,7 @@ try: caput(station + "-RSYS:GET-ONCREST-VSUM-AMPLT", Ampl) caput(station + "-RSYS:GET-ONCREST-KLY-POWER", Power) finally: + phase.write(phase0) phase.close() V.close() P.close()