16 lines
493 B
Python
16 lines
493 B
Python
#Parameters
|
|
is_panel = get_exec_pars().source != CommandSource.ui # run from panel
|
|
if is_panel:
|
|
tds = args[0]
|
|
phase = args[1]
|
|
else:
|
|
tds = "S30CB14"
|
|
phase = 0.0
|
|
|
|
# set beam phase offset
|
|
phase_rf = caget(tds + "-RSYS:GET-VSUM-PHASE")
|
|
phase_corr = caget(tds + "-RSYS:GET-VSUM-PHASE-OFFSET-CORR")
|
|
phase_offset = phase - phase_rf - phase_corr
|
|
caput(tds + "-RSYS:SET-VSUM-PHASE-OFFSET-BASE", phase_offset)
|
|
caput(tds + "-RSYS:SET-BEAM-PHASE", phase)
|