Script execution
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user