diff --git a/script/RFscan/phase_scan_caqtdm_dv2.py b/script/RFscan/phase_scan_caqtdm_dv2.py index f11b3a7..7690530 100644 --- a/script/RFscan/phase_scan_caqtdm_dv2.py +++ b/script/RFscan/phase_scan_caqtdm_dv2.py @@ -66,23 +66,23 @@ try: raise Exception("Fit maximum outside scan range") phase.write(phase_fit_max) time.sleep(lat) - V = V.read() - P = P.read() + Ampl = V.read() + Power = P.read() caput(prefix + ":GET-ONCREST-VSUM-AMPLT", V) caput(prefix + ":GET-ONCREST-KLY-POWER", P) finally: phase.close() -# V.close() -# P.close() -# x.close() + V.close() + P.close() + x.close() print ("------------------------------------") print ("Valid fit") energy_gain = energy_max phase_offset = 90 - phase_fit_max -amplitude_scale = energy_gain / V -power_scale = P / math.pow(V,2) +amplitude_scale = energy_gain / Ampl +power_scale = Power / math.pow(V,2) caput(prefix + ":CALC-VSUM-PHASE-OFFSET", phase_offset) caput(prefix + ":CALC-VSUM-AMPLT-SCALE" , amplitude_scale)