From e39dc83468024544ab82546f20ebdca9f763ff6d Mon Sep 17 00:00:00 2001 From: voulot_d Date: Mon, 30 May 2016 09:54:30 +0200 Subject: [PATCH] Startup --- script/RF_phase_scan.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 script/RF_phase_scan.py diff --git a/script/RF_phase_scan.py b/script/RF_phase_scan.py new file mode 100644 index 0000000..7a4b721 --- /dev/null +++ b/script/RF_phase_scan.py @@ -0,0 +1,20 @@ +rsys = "SINSB01-RSYS" +bpm = "SINLH02-DBPM210" +phase_start = -175.0 +phase_stop = 180.0 +phase_step = 5.0 + +rf_phase_setpoint = Channel(rsys + ":SET-VSUM-PHASE") +rf_phase_readback = Channel(rsys + ":GET-VSUM-PHASE") +rf_ampl_readback = Channel(rsys + ":GET-VSUM-AMPLT") +x1 = Channel(bpm + ":X1") + +r = lscan(rf_phase_setpoint, [rf_phase_readback, rf_ampl_readback, x1], phase_start, phase_stop, phase_step, latency=0.5) + +plot(r.getReadable(2), xdata = r.getReadable(0), title = "phase scan") + +(amplitude, angular_frequency, phase, ok, maximum) = hfit(r.getReadable(2), xdata = r.getReadable(0)) + +caput(rsys + ":SET-ON-CREST-VSUM-PHASE", maximum) + +set_return(r.print())