Script execution
This commit is contained in:
@@ -37,7 +37,7 @@ caput(station + "-RSYS:CALC-VOLT-POWER-SCALE" , float('nan'))
|
||||
#update the plot dynamically
|
||||
arr_phase,arr_energy = [],[]
|
||||
def after(rec):
|
||||
global disp, energy0 #arrpos, arrval,
|
||||
global disp, energy0
|
||||
arr_phase.append(rec.positions[0])
|
||||
arr_energy.append(rec.values[1].mean/1000.0/disp*energy0)
|
||||
caput(station + "-RSYS:GET-ENERGY-ARRAY", to_array(arr_energy,'d'))
|
||||
@@ -49,6 +49,7 @@ try:
|
||||
r = lscan(phase, [Vb, xb], start, stop, step , latency=lat, after_read = after)
|
||||
rf_phase = r.getPositions(0)
|
||||
energy = [val.mean/1000.0/disp*energy0 for val in r.getReadable(1)]
|
||||
print energy[2]
|
||||
caput(station + "-RSYS:GET-ENERGY-ARRAY", to_array(energy, 'd'))
|
||||
caput(station + "-RSYS:GET-PHASE-ARRAY", to_array(rf_phase,'d'))
|
||||
phase_fit_max = None
|
||||
|
||||
Reference in New Issue
Block a user