#Tool to align the laser on the cathode. # S. Bettoni, A. Gobbo, D. Voulot #10/05/2016 #Procedure: #I switch off all the magnets between the gun solenoid and the screen or BPM used for the measurement #I change the current of the gun soleoid #I look at the centroid position (BPM or screen) downstream of the gun. #TO BE PUT THE SIGNAL I-READ IN THE DEVICE DEFINITION GUN SOLENOID #caput("shutter:state", Closed) start_I = 0.001 #20 end_I = 0.005 #150 step_I = 0.0001 #1 #Scan using the screen r = lscan(gun_sol_current, [center_x, center_y], start_I, end_I, step_I, latency = 0.2) #Scan using the BPM #r = lscan(gun_sol_current, bpm_1_down_gun, start_I, end_I, step_I, latency = 0.2) #I take the result of the scan and I do the plots x = r.getReadable(0) y = r.getReadable(1) plot(y, xdata=x, title = "CM") #I save the entry in the logbook