Closedown

This commit is contained in:
gac-x04sa
2018-01-12 15:03:58 +01:00
parent 37d55aa12a
commit 4f515c44e7
2 changed files with 11 additions and 12 deletions
+6 -6
View File
@@ -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);
}
}
+5 -6
View File
@@ -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)