diff --git a/script/RFscan/phase_scan_caqtdm.py b/script/RFscan/phase_scan_caqtdm.py index 8ef06c3..948ceff 100644 --- a/script/RFscan/phase_scan_caqtdm.py +++ b/script/RFscan/phase_scan_caqtdm.py @@ -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 arrpos, arrval, disp, energy0 + global disp, energy0 #arrpos, arrval, 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')) @@ -46,8 +46,6 @@ def after(rec): try: Vb = create_averager(V, nb, 0.100) xb = create_averager(x, nb, 0.100) - print(xb.mean) - print(xb.stdev) 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)] @@ -89,14 +87,9 @@ caput(station + "-RSYS:CALC-VSUM-PHASE-OFFSET", phase_offset) caput(station + "-RSYS:CALC-VSUM-AMPLT-SCALE" , amplitude_scale) caput(station + "-RSYS:CALC-VOLT-POWER-SCALE" , power_scale) -title="Phase scan "+str(station) -message=("Energy Gain: %0.2f" % energy_gain + "\n" + - "Phase Offset: %0.2f" % phase_offset + "\n" + - "Amplitude Scale: %0.2f" % amplitude_scale + "\n" + - "Power Scale: %0.2f" % power_scale) -elog(title, message) - -#set_return("\nEnergy Gain: " + str(energy_gain) + "\n" + -# "Phase Offset: " + str(phase_offset) + "\n" + -# "Amplitude Scale: " + str(amplitude_scale) + "\n" + -# "Power Scale: " + str(power_scale)) +#title="Phase scan "+str(station) +#message=("Energy Gain: %0.3f" % energy_gain + "\n" + +# "Phase Offset: %0.2f" % phase_offset + "\n" + +# "Amplitude Scale: %0.3f" % amplitude_scale + "\n" + +# "Power Scale: %0.3f" % power_scale) +#elog(title, message)