Script execution
This commit is contained in:
@@ -23,21 +23,20 @@ rf_power_rbk = Channel(prefix + ":GET-KLY-POWER-SIM", type = 'd', alias='Power
|
||||
bpm_x = Channel(bpm_ch + ":X1-SIM", type = 'd', alias='BPM-X')
|
||||
|
||||
#update the plot dynamically
|
||||
arrpos,arrval = [],[]
|
||||
arr_phase,arr_energy = [],[]
|
||||
def after(rec):
|
||||
global arrpos,arrval, disp, energy0
|
||||
arrval.append(rec.values[0]/1000.0/disp*energy0)
|
||||
arrpos.append(rec.positions[0])
|
||||
caput(prefix + ":GET-PHASE-ARRAY", to_array(rf_phase,'d'))
|
||||
caput(prefix + ":GET-ENERGY-ARRAY", to_array(energy,'d'))
|
||||
|
||||
arr_phase.append(rec.positions[0])
|
||||
arr_energy.append(rec.values[0]/1000.0/disp*energy0)
|
||||
caput(prefix + ":GET-ENERGY-ARRAY", to_array(arr_energy,'d'))
|
||||
caput(prefix + ":GET-PHASE-ARRAY", to_array(arr_phase,'d'))
|
||||
try:
|
||||
r = lscan(rf_phase_var, [rf_ampl_rbk, bpm_x], start, stop, step , latency=lat, after_read = after)
|
||||
|
||||
rf_phase = r.getPositions(0)
|
||||
energy = [x/1000.0/disp*energy0 for x in r.getReadable(1)]
|
||||
caput(prefix + ":GET-PHASE-ARRAY", to_array(rf_phase,'d'))
|
||||
energy = [x/1000.0/disp*energy0 for x in r.getReadable(1)]
|
||||
caput(prefix + ":GET-ENERGY-ARRAY", to_array(energy,'d'))
|
||||
caput(prefix + ":GET-PHASE-ARRAY", to_array(rf_phase,'d'))
|
||||
|
||||
phase_fit_max = None
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user