diff --git a/script/Alignment/Gun_solenoid_alignment_dv.py b/script/Alignment/Gun_solenoid_alignment_dv.py index b9cc7e8..4e22fed 100644 --- a/script/Alignment/Gun_solenoid_alignment_dv.py +++ b/script/Alignment/Gun_solenoid_alignment_dv.py @@ -8,7 +8,7 @@ # change the current of the gun soleoid # look at the centroid position (BPM or screen) downstream of the gun. -I_set = Channel("SINEG01-MSOL130:I-SET") +I_set = Channel("SINEG01-MSOL130:I-SET"); I_get = Channel("SINEG01-MSOL130:I-READ") # cam_x, cam_y = ... # some camtool command / channel? bpm_x = Channel("SINEG01-DBPM340:X1") @@ -16,6 +16,13 @@ bpm_y = Channel("SINEG01-DBPM340:Y1") cam_x = Channel("SINEG01-DSCR190:profile.X_stats.com") cam_y = Channel("SINEG01-DSCR190:profile.Y_stats.com") +cam_raw_data = Channel("SINEG01-DSCR190:data") + +set_device_alias(I_set, "I_set") +set_device_alias(I_get, "I_get") +set_device_alias(cam_x, "cam_x") +set_device_alias(cam_y, "cam_y") + def ccr(mag): n = 1 @@ -27,6 +34,18 @@ def laser_on(): def laser_off(): caput("SIN-TIMAST-TMA:Beam-Las-Delay-Sel", 1) + + +def run_pipeline(): + caput("camtool...:start") + + while !caget("camtool...:done"): + sleep(0.1) + + caget("camtool....:data") + #caget("camtool....:X_stats.com") + #caget("camtool....:X_stats.com") + I1 = 20.0 I2 = 150.0 @@ -53,7 +72,7 @@ laser_on() # Scan using the BPM try: #r = lscan(I_set, [I_get, cam_x, cam_y], I1, I2, dI, 1.0, before_read = ccr) - r = lscan(I_set, [I_get, cam_x, cam_y], I1, I2, dI, 1.0) + r = lscan(I_set, [I_get, cam_x, cam_y, cam_raw_data], I1, I2, dI, 1.0) finally: laser_off()