ap.initNSLS2VSR() ap.initNSLS2VSRTwiss() alphac = 3.6261976841792413e-04 gamma = 3.0e3/.511 eta = alphac - 1/gamma/gamma # orbit at cell 3-6 BPMs bpmobj = ap.getElements('p*c0[3-6]*') bpmnames = [b.name for b in bpmobj] s1 = [b.sb for b in bpmobj] eta0 = ap.getDispersion(bpmnames) print "dispersion:", eta0 # f in MHz f0 = ap.getRfFrequency() f = np.linspace(f0 - 1e-5, f0 + 1e-5, 5) # avoid a bug in virtac obt0 = ap.getOrbit(bpmnames) x0, y0 = obt0[:,0], obt0[:,1] time.sleep(4) codx = np.zeros((len(f), len(bpmobj)), 'd') cody = np.zeros((len(f), len(bpmobj)), 'd') for i,f1 in enumerate(f): ap.putRfFrequency(f1) time.sleep(3) obt1 = ap.getOrbit() # repeat the put/get in case simulator did not response latest results
ap.initNSLS2VSR() ap.initNSLS2VSRTwiss() alphac = 3.6261976841792413e-04 gamma = 3.0e3 / .511 eta = alphac - 1 / gamma / gamma # orbit at cell 3-6 BPMs bpmobj = ap.getElements('p*c0[3-6]*') bpmnames = [b.name for b in bpmobj] s1 = [b.sb for b in bpmobj] eta0 = ap.getDispersion(bpmnames) print "dispersion:", eta0 # f in MHz f0 = ap.getRfFrequency() f = np.linspace(f0 - 1e-5, f0 + 1e-5, 5) # avoid a bug in virtac obt0 = ap.getOrbit(bpmnames) x0, y0 = obt0[:, 0], obt0[:, 1] time.sleep(4) codx = np.zeros((len(f), len(bpmobj)), 'd') cody = np.zeros((len(f), len(bpmobj)), 'd') for i, f1 in enumerate(f): ap.putRfFrequency(f1) time.sleep(3) obt1 = ap.getOrbit() # repeat the put/get in case simulator did not response latest results
def test_rf_l0(self): f0 = ap.getRfFrequency() v0 = ap.getRfVoltage()