Closedown

This commit is contained in:
sfop
2016-07-06 11:45:54 +02:00
parent ce9cf27e67
commit 81bf4a89fe
3 changed files with 8 additions and 82 deletions

View File

@@ -37,56 +37,6 @@ print "Parameters: ", phi1, phi2, dphi, settling_time, plot_image, number_images
plot_name = datetime.datetime.fromtimestamp(time.time()).strftime('%H%M%S')
cam_x = Channel("SINEG01-DSCR190:profile.X_stats.com", alias = "cam_x")
cam_y = Channel("SINEG01-DSCR190:profile.Y_stats.com", alias = "cam_y")
profile_x = Channel("SINEG01-DSCR190:profile.X", alias = "profile_x")
profile_y = Channel("SINEG01-DSCR190:profile.Y", alias = "profile_y")
cam_raw_data = Channel("SINEG01-DSCR190:data")
class CameraImage(ReadableMatrix):
def read(self):
raw = cam_raw_data.read()
return Matrix(mono_to_bidi(raw, self.getHeight(), self.getWidth())).transpose().getData() #data is transposed
#return mono_to_bidi(raw, self.getWidth(), self.getHeight())
def getWidth(self):
return self._width
def getHeight(self):
return self._height
cam_img = CameraImage()
cam_img._width = len(profile_x.read())
cam_img._height = len(profile_y.read())
def ccr(mag):
n = 1
while n > 0:
sleep(0.5)
n = caget(mag + ":I-COMP")
def laser_on():
caput("SIN-TIMAST-TMA:Beam-Las-Delay-Sel", 0)
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")
# Switch off magnets
mag = [ "SINEG01-MCRX120","SINEG01-MCRY120",
@@ -98,11 +48,8 @@ mag = [ "SINEG01-MCRX120","SINEG01-MCRY120",
"SINEG01-MCRX220","SINEG01-MCRY220",
"SINEG01-MQUA310",
"SINEG01-MQUA320" ]
if zero_solenoids:
for m in mag:
caput(m + ":I-SET", 0.0)
for m in mag:
ccr(m)
if zero_solenoids:
switchOffMagnets(mag)
# add here gun phase setting see wiki page