From 4f515c44e7aa0ff309112666c08bc57888293b51 Mon Sep 17 00:00:00 2001 From: gac-x04sa Date: Fri, 12 Jan 2018 15:03:58 +0100 Subject: [PATCH] Closedown --- plugins/Pilatus.java | 12 ++++++------ script/scans/6mom.py | 11 +++++------ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/plugins/Pilatus.java b/plugins/Pilatus.java index 63b319b..dea979a 100644 --- a/plugins/Pilatus.java +++ b/plugins/Pilatus.java @@ -79,20 +79,20 @@ public class Pilatus extends AreaDetector{ return (Double) readCtrl("Phi", Double.class); } - public void setFileNumber(double value) throws IOException, InterruptedException{ + public void setFileNumber(int value) throws IOException, InterruptedException{ writeCtrl("FileNumber", value); } - public double getFileNumber() throws IOException, InterruptedException{ - return (Double) readCtrl("FileNumber", Double.class); + public int getFileNumber() throws IOException, InterruptedException{ + return (Integer) readCtrl("FileNumber", Integer.class); } - public void setFileName(double value) throws IOException, InterruptedException{ + public void setFileName(String value) throws IOException, InterruptedException{ writeCtrl("FileName", value); } - public double getFileName() throws IOException, InterruptedException{ - return (Double) readCtrl("FileName", Double.class); + public String getFileName() throws IOException, InterruptedException{ + return (String) readCtrl("FileName", String.class); } } diff --git a/script/scans/6mom.py b/script/scans/6mom.py index 81c5008..b5b69e3 100644 --- a/script/scans/6mom.py +++ b/script/scans/6mom.py @@ -12,12 +12,11 @@ fname='MRc_01' # remember the run number 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) - ## THE FOLLOWING LINES IMPLEMENT AND CALCULATE SEVERAL PARAMETERS exp_time = time_step -0.003 # calculates Exposure time phitot = endphi - startphi # calculates total omega span -images = phitot/step # calculates number of images -step10000 = step *10000 # shell does not like floating +images = int(phitot/step) # calculates number of images #TODO: floor or ceil? +step10000 = int(step *10000) # shell does not like floating velo10000 = step10000 / time_step # " velo = velo10000 *0.0001 # calculates real angular velocity check = velo10000 / 50001 # creates a check for max velocity @@ -26,14 +25,14 @@ if check!=0: raise Exception("Too fast velocity calculated for the motor, please change") scr.setSpeed(velo) # speed of the omega axis in deg/s -tottim =`time_step * images # calculates total time needed +tottim = time_step * images # calculates total time needed tottime = tottim + 5 # adds 5 for safety print "Total time: ", tottime print "Collecting ", fname, "..." # THE FOLLOWING LINES SEND COMMANDS TO THE CAMSERVER det.numImages = images # number of images -det.acquireTime = exp_time # Exposure time +det.exposure = exp_time # Exposure time det.acquirePeriod = time_step # Acquire period @@ -81,7 +80,7 @@ sleep(tottime) #sleep(tottime) -scr.setSpeed 5.0 +scr.setSpeed (5.0) sleep(1.0) #scr.move(startphi) sleep(16.0)