Script execution
This commit is contained in:
@@ -22,17 +22,22 @@ rf_ampl_rbk = Channel(prefix + ":GET-VSUM-AMPLT-SIM", type = 'd', alias='Ampli
|
||||
rf_power_rbk = Channel(prefix + ":GET-KLY-POWER-SIM", type = 'd', alias='Power Readback')
|
||||
bpm_x = Channel(bpm_ch + ":X1-SIM", type = 'd', alias='BPM-X')
|
||||
|
||||
#TODO: update the plot dynamically
|
||||
#update the plot dynamically
|
||||
arrpos,arrval = [],[]
|
||||
def after(rec):
|
||||
pass
|
||||
|
||||
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'))
|
||||
|
||||
try:
|
||||
r = lscan(rf_phase_var, [rf_ampl_rbk, bpm_x], start, stop, step , latency=lat, passes = nb, after_read = after)
|
||||
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", rf_phase)
|
||||
caput(prefix + ":GET-ENERGY-ARRAY", energy)
|
||||
caput(prefix + ":GET-PHASE-ARRAY", to_array(rf_phase,'d'))
|
||||
caput(prefix + ":GET-ENERGY-ARRAY", to_array(energy,'d'))
|
||||
|
||||
phase_fit_max = None
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user