From 3a03c3c405309a4aaa6784e33e2b1c2b70369451 Mon Sep 17 00:00:00 2001 From: gac-x04sa Date: Mon, 22 Jan 2018 10:08:35 +0100 Subject: [PATCH] Startup --- script/scans/6mom.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/script/scans/6mom.py b/script/scans/6mom.py index ff09af7..81e99d1 100644 --- a/script/scans/6mom.py +++ b/script/scans/6mom.py @@ -1,12 +1,16 @@ startphi=-60 endphi=120 # for DACs the middle is 57 -time_step=4 +time_step=1 step=0.5 # in degrees #fname='testing' fname='MRc_01' # remember the run number + +startphi, endphi, time_step, step = float(startphi), float(endphi), float(time_step), float(step) #TODO: Should not move to startphi? +scr.setSpeed (5.0) +scr.move(startphi) filt=caget("X04SA-ES2-FI:TRANSM",'d') *1000000000 #TODO:Check if wtiting 1000000000.00000000000000 or 1.0E9 is equivalent caput("X04SA-ES2-PIL:cam1:FilterTransm",filt) @@ -14,7 +18,7 @@ caput("X04SA-ES2-PIL:cam1:FilterTransm",filt) exp_time = time_step -0.003 # calculates Exposure time phitot = endphi - startphi # calculates total omega span images = int(phitot/step) # calculates number of images #TODO: floor or ceil? -velo = float(step)/time_step +velo = step/time_step if velo > 5.0: raise Exception("Too fast velocity calculated for the motor, please change") @@ -49,8 +53,9 @@ sleep (1.0) scr.moveAsync(endphi) det.start() -#scr.waitReady(tottime * 1000) #TODO: Should sleep or wait end of move? -sleep(tottime) +#scr.waitInPosition(endphi, int(tottime * 1000)) #TODO: Should sleep or wait end of move? or waiting Pilatus to finish: det.waitReady(int(tottime * 1000)) +scr.waitReady(int(tottime * 1000)) +#sleep(tottime) ### BACKWARD ###