Script execution

This commit is contained in:
voulot_d
2017-01-16 10:39:48 +01:00
parent 0b350fb7ea
commit 6b58ea21e7
+2 -1
View File
@@ -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