PSI sics-cvs-psi-2006

This commit is contained in:
2006-05-08 02:00:00 +00:00
committed by Douglas Clowes
parent ae77364de2
commit 6e926b813f
388 changed files with 445529 additions and 14109 deletions

13
mcstas/dmc/D3C.inp Normal file
View File

@ -0,0 +1,13 @@
TITLE D3C
CONDIT 2.5000 5.0 85.0 0 NE N
CELL 19.40000
SPCRGP F D 3 M
ATOM SI 1 0.0675 0.0675 0.3701
ATOM SI 2 0.21641 0.21641 0.21641
ATOM SI 3 0.125 0.125 0.125
ATOM O 1 .0 .3434 -.3434
ATOM O 2 0.2004 0.2004 0.2936
ATOM O 3 0.3736 0.125 0.125
ATOM O 4 0.1702 0.1702 0.1702
END
FINISH

119
mcstas/dmc/D3C.q Normal file
View File

@ -0,0 +1,119 @@
// mult Q(hkl) F2 DW w
8 0.560969 156.250000 1 0
12 0.916063 561.690000 1 0
24 1.074177 858.490000 1 0
8 1.121937 1376.410000 1 0
6 1.295502 1142.440000 1 0
24 1.411730 201.640000 1 0
24 1.586663 380.250000 1 0
24 1.682921 973.440000 1 0
8 1.682921 924.160000 1 0
12 1.832100 1169.640000 1 0
48 1.916073 924.160000 1 0
24 1.943273 141.610000 1 0
24 2.048375 316.840000 1 0
24 2.123774 237.160000 1 0
24 2.148318 3.610000 1 0
8 2.243915 0.490000 1 0
24 2.312971 25.000000 1 0
24 2.312971 0.090000 1 0
48 2.423694 20.250000 1 0
24 2.487701 114.490000 1 0
48 2.487701 134.560000 1 0
6 2.591004 313.290000 1 0
24 2.651021 104.040000 1 0
24 2.670741 23.040000 1 0
12 2.748189 19.360000 1 0
24 2.748189 1.690000 1 0
48 2.804868 13.690000 1 0
8 2.804868 73.960000 1 0
24 2.823523 182.250000 1 0
24 2.896812 1797.760000 1 0
48 2.950683 1239.040000 1 0
24 2.950683 734.410000 1 0
48 2.968387 384.160000 1 0
24 3.038291 3.240000 1 0
48 3.089534 62.410000 1 0
24 3.173326 870.250000 1 0
24 3.222477 497.290000 1 0
24 3.222477 538.240000 1 0
24 3.222477 256.000000 1 0
24 3.302941 404.010000 1 0
48 3.302941 552.250000 1 0
48 3.350139 1.440000 1 0
24 3.350139 0.040000 1 0
24 3.365752 3102.490000 1 0
8 3.365752 5055.210000 1 0
48 3.473100 707.560000 1 0
48 3.488333 42.250000 1 0
48 3.547818 864.360000 1 0
24 3.592034 240.250000 1 0
24 3.592034 70.560000 1 0
12 3.664306 3014.010000 1 0
24 3.706894 501.760000 1 0
48 3.706894 1.000000 1 0
48 3.706894 299.290000 1 0
24 3.720944 992.250000 1 0
24 3.720944 691.690000 1 0
24 3.777088 428.490000 1 0
24 3.777088 3.610000 1 0
24 3.818405 610.090000 1 0
48 3.818405 7.840000 1 0
48 3.832145 392.040000 1 0
6 3.886426 918.090000 1 0
24 3.886426 1030.410000 1 0
48 3.926745 445.210000 1 0
8 3.926745 309.760000 1 0
24 3.993127 102.010000 1 0
48 3.993127 39.690000 1 0
48 4.032336 129.960000 1 0
48 4.032336 2.560000 1 0
24 4.096750 204.490000 1 0
24 4.135035 59.290000 1 0
24 4.147591 316.840000 1 0
48 4.147591 104.040000 1 0
48 4.198026 6.760000 1 0
48 4.235094 0.640000 1 0
24 4.235094 136.890000 1 0
24 4.235094 29.160000 1 0
24 4.235094 166.410000 1 0
24 4.247692 361.000000 1 0
24 4.296783 2284.840000 1 0
48 4.333231 60.840000 1 0
48 4.333231 278.890000 1 0
24 4.333231 412.090000 1 0
48 4.345218 106.090000 1 0
48 4.393221 0.010000 1 0
24 4.428833 1339.560000 1 0
24 4.428833 70.560000 1 0
8 4.487669 1747.240000 1 0
48 4.522555 372.490000 1 0
48 4.522555 739.840000 1 0
48 4.534304 302.760000 1 0
24 4.580249 302.760000 1 0
12 4.580249 2550.250000 1 0
48 4.580249 432.640000 1 0
48 4.614560 1274.490000 1 0
48 4.614560 1672.810000 1 0
24 4.625771 585.640000 1 0
24 4.625771 278.890000 1 0
24 4.671166 372.490000 1 0
24 4.704392 53.290000 1 0
48 4.704392 201.640000 1 0
48 4.715690 4.410000 1 0
24 4.759989 125.440000 1 0
48 4.759989 556.960000 1 0
24 4.759989 60.840000 1 0
24 4.793032 2.890000 1 0
48 4.793032 948.640000 1 0
24 4.793032 60.840000 1 0
48 4.847389 1857.610000 1 0
48 4.879765 73.960000 1 0
24 4.879765 79.210000 1 0
48 4.879765 37.210000 1 0
24 4.890400 8.410000 1 0
24 4.890400 784.000000 1 0
24 4.933018 272.250000 1 0
48 4.964982 327.610000 1 0
48 4.975598 2.250000 1 0
24 4.975598 42.250000 1 0

3
mcstas/dmc/DataNumber Normal file
View File

@ -0,0 +1,3 @@
120
NEVER, EVER modify or delete this file
You'll risk eternal damnation and a reincarnation as a cockroach!|n

109
mcstas/dmc/MKMonitor.comp Normal file
View File

@ -0,0 +1,109 @@
/*******************************************************************************
*
* McStas, neutron ray-tracing package
* Copyright 1997-2002, All rights reserved
* Risoe National Laboratory, Roskilde, Denmark
* Institut Laue Langevin, Grenoble, France
*
* Component: Monitor
*
* %I
* Written by: Kim Lefmann
* Date: October 4, 1997
* Version: $Revision$
* Origin: Risoe
* Release: McStas 1.6
* Modified to write monitor file for SICS: Mark Koennecke, June 2005
*
* Simple single detector/monitor.
*
* %D
* Sums neutrons (0th, 1st, and 2nd moment of p) flying through
* the rectangular monitor opening. May also be used as detector.
*
* Example: Monitor(xmin=-0.1, xmax=0.1, ymin=-0.1, ymax=0.1)
*
* %P
* INPUT PARAMETERS:
*
* xmin: Lower x bound of opening [m]
* xmax: Upper x bound of opening [m]
* ymin: Lower y bound of opening [m]
* ymax: Upper y bound of opening [m]
*
* OUTPUT PARAMETERS:
*
* Nsum: Number of neutron hits
* psum: Sum of neutron weights
* p2sum: 2nd moment of neutron weights
*
* %E
*******************************************************************************/
DEFINE COMPONENT MKMonitor
DEFINITION PARAMETERS ()
SETTING PARAMETERS (xmin, xmax, ymin, ymax,char *controlfile="mon1.dat",int dumpCount=1000)
OUTPUT PARAMETERS (Nsum, psum, p2sum,currentCount)
STATE PARAMETERS (x,y,z,vx,vy,vz,t,s1,s2,p)
SHARE
%{
void dumpTotal(char *ffilename, long totalCounts){
FILE *fd = NULL;
char tmp[1024];
strncpy(tmp,ffilename, 1000);
strcat(tmp,"tmp");
fd = fopen(tmp,"w");
if(fd != NULL){
fprintf(fd,"%ld\n",totalCounts);
fclose(fd);
rename(tmp,ffilename);
unlink(tmp);
}
}
%}
DECLARE
%{
long currentCount;
double Nsum;
double psum, p2sum;
%}
INITIALIZE
%{
psum = 0;
p2sum = 0;
Nsum = 0;
currentCount = 0;
%}
TRACE
%{
PROP_Z0;
if (x>xmin && x<xmax && y>ymin && y<ymax)
{
Nsum++;
psum += p;
p2sum += p*p;
currentCount++;
if(dumpCount > 0 && currentCount > dumpCount){
dumpTotal(controlfile,(long)Nsum);
currentCount = 0;
}
SCATTER;
}
%}
SAVE
%{
DETECTOR_OUT_0D("Single monitor", Nsum, psum, p2sum);
%}
MCDISPLAY
%{
magnify("xy");
multiline(5, (double)xmin, (double)ymin, 0.0,
(double)xmax, (double)ymin, 0.0,
(double)xmax, (double)ymax, 0.0,
(double)xmin, (double)ymax, 0.0,
(double)xmin, (double)ymin, 0.0);
%}
END

127
mcstas/dmc/PSD_monitor.comp Normal file
View File

@ -0,0 +1,127 @@
/*******************************************************************************
*
* McStas, neutron ray-tracing package
* Copyright 1997-2002, All rights reserved
* Risoe National Laboratory, Roskilde, Denmark
* Institut Laue Langevin, Grenoble, France
*
* Component: PSD_monitor
*
* %I
* Written by: Kim Lefmann
* Date: Feb 3, 1998
* Version: $Revision$
* Origin: Risoe
* Release: McStas 1.6
*
* Hacked by to dump the total number of neutrons any dumpCount
* neutrons into a very simple one line file. This is needed to stay in control
* for virtual instruments.
*
* Mark Koennecke, June 2005
*
* Position-sensitive monitor.
*
* %D
* An (n times m) pixel PSD monitor. This component may also be used as a beam
* detector.
*
* Example: PSD_monitor(xmin=-0.1, xmax=0.1, ymin=-0.1, ymax=0.1,
nx=90, ny=90, filename="Output.psd")
*
* %P
* INPUT PARAMETERS:
*
* xmin: Lower x bound of detector opening (m)
* xmax: Upper x bound of detector opening (m)
* ymin: Lower y bound of detector opening (m)
* ymax: Upper y bound of detector opening (m)
* nx: Number of pixel columns (1)
* ny: Number of pixel rows (1)
* filename: Name of file in which to store the detector image (text)
* controlfile: A file to which the total number of neutrons detected is dumped
* any dumpCount counts.
* dumpCount: The number of counst after which a controlfile is written. A negative
* value switches the feauture off.
* OUTPUT PARAMETERS:
*
* PSD_N: Array of neutron counts
* PSD_p: Array of neutron weight counts
* PSD_p2: Array of second moments
* totalCounts: The total number of counts in the detector
* currentCount: The current counter since the last dump.
*
* %E
*******************************************************************************/
DEFINE COMPONENT PSD_monitor
DEFINITION PARAMETERS (nx=90, ny=90, filename, controlfile="mon01.dat")
SETTING PARAMETERS (xmin, xmax, ymin, ymax, int dumpCount = -1.)
OUTPUT PARAMETERS (PSD_N, PSD_p, PSD_p2, totalCount, currentCount)
STATE PARAMETERS (x,y,z,vx,vy,vz,t,s1,s2,p)
SHARE
%{
void dumpTotal(char *ffilename, long totalCounts){
FILE *fd = NULL;
fd = fopen(ffilename,"w");
if(fd != NULL){
fprintf(fd,"%ld\n",totalCounts);
fclose(fd);
}
}
%}
DECLARE
%{
long totalCount, currentCount;
double PSD_N[nx][ny];
double PSD_p[nx][ny];
double PSD_p2[nx][ny];
%}
INITIALIZE
%{
int i,j;
for (i=0; i<nx; i++)
for (j=0; j<ny; j++)
{
PSD_N[i][j] = 0;
PSD_p[i][j] = 0;
PSD_p2[i][j] = 0;
}
totalCount = 0;
currentCount = 0;
%}
TRACE
%{
int i,j;
PROP_Z0;
if (x>xmin && x<xmax && y>ymin && y<ymax)
{
i = floor((x - xmin)*nx/(xmax - xmin));
j = floor((y - ymin)*ny/(ymax - ymin));
PSD_N[i][j]++;
PSD_p[i][j] += p;
PSD_p2[i][j] += p*p;
totalCount++;
currentCount++;
if(dumpCount > 0 && currentCount > dumpCount){
dumpTotal(controlfile,totalCount);
currentCount = 0;
}
SCATTER;
}
%}
SAVE
%{
%}
MCDISPLAY
%{
%}
END

8
mcstas/dmc/batch.tcl Normal file
View File

@ -0,0 +1,8 @@
proc SplitReply { text } {
set l [split $text =]
return [lindex $l 1]
}
proc batchrun file {
fileeval [string trim [SplitReply [BatchRoot]]/$file]
}

62
mcstas/dmc/conv.tcl Normal file
View File

@ -0,0 +1,62 @@
#!/usr/bin/tclsh
#--------------------------------------------------------------------------
# script for extracting detector data with error bars from a simulation
# XML file. The output can be used for plotting with gnuplot
# The program reads from stdin and prints to stdout.
#
# Mark Koennecke, July 2005
#-------------------------------------------------------------------------
#------- locate detector data
while { [gets stdin line] >= 0} {
if {[string first det9.dat $line] > 0} {
break
}
}
#------- locate data record
while { [gets stdin line] >= 0} {
if {[string first "<data" $line] > 0} {
break
}
}
#------ remove XML stuff
set idx [string first > $line]
set line [string range $line [expr $idx + 1] end]
set l [split $line]
set count 0
foreach e $l {
set e [string trim $e]
if { [string length $e] > 0} {
set data($count) $e
incr count
}
}
set maxCount $count
#---- find errors line
while { [gets stdin line] >= 0} {
if {[string first "<errors" $line] > 0} {
break
}
}
#------ remove XML stuff
set idx [string first > $line]
set line [string range $line [expr $idx + 1] end]
set l [split $line]
set count 0
foreach e $l {
set e [string trim $e]
if { [string length $e] > 0} {
set err($count) $e
incr count
}
}
for {set i 0} {$i < $maxCount} {incr i} {
puts stdout "$i $data($i) $err($i)"
}

89
mcstas/dmc/dmc.dic Normal file
View File

@ -0,0 +1,89 @@
##NXDICT-1.0
#----------------------------------------------------------------------------
# NeXus dictionary file for the SINQ instrument DMC and HRPT
#
# DO NOT EDIT WHEN YOU DO NOT KNOW WHAT YOU ARE DOING!
# This file determines the placement of data items in the Powder NeXus
# data file. Your data may not be readable if this file is messed up.
#
# Mark Koennecke, May 2004
#----------------------------------------------------------------------------
inst=DMC
detector=DMC-BF3-Detector
noofdetectors=400
#---------- NXentry level
etitle=/entry1,NXentry/SDS title -type DFNT_CHAR -rank 1
estart=/entry1,NXentry/SDS start_time -type DFNT_CHAR -rank 1
eend=/entry1,NXentry/SDS end_time -type DFNT_CHAR -rank 1
#----------------- NXinstrument
iname=/entry1,NXentry/$(inst),NXinstrument/SDS name -type DFNT_CHAR \
-rank 1 -dim {132}
#----------------- NXsource
sname=/entry1,NXentry/$(inst),NXinstrument/SINQ,NXsource/SDS name \
-type DFNT_CHAR -rank 1
stype=/entry1,NXentry/$(inst),NXinstrument/SINQ,NXsource/SDS type \
-type DFNT_CHAR -rank 1
#-------------- Monochromator
mname=/entry1,NXentry/$(inst),NXinstrument/Monochromator,NXcrystal/SDS type \
-type DFNT_CHAR -rank 1
mtheta=/entry1,NXentry/$(inst),NXinstrument/Monochromator,NXcrystal/SDS \
theta
mttheta=/entry1,NXentry/$(inst),NXinstrument/Monochromator,NXcrystal/SDS \
two_theta
mlambda=/entry1,NXentry/$(inst),NXinstrument/Monochromator,NXcrystal/SDS \
lambda -attr {units,Angstroem}
mdd=/entry1,NXentry/$(inst),NXinstrument/Monochromator,NXcrystal/SDS \
d_spacing -attr {units,Angstroem}
mcurve=/entry1,NXentry/$(inst),NXinstrument/Monochromator,NXcrystal/SDS \
curvature
monox=/entry1,NXentry/$(inst),NXinstrument/Monochromator,NXcrystal/SDS \
x_translation
monoy=/entry1,NXentry/$(inst),NXinstrument/Monochromator,NXcrystal/SDS \
y_translation
mchi=/entry1,NXentry/$(inst),NXinstrument/Monochromator,NXcrystal/SDS \
chi
mphi=/entry1,NXentry/$(inst),NXinstrument/Monochromator,NXcrystal/SDS \
phi
#------------- counter
cter_mode=/entry1,NXentry/$(inst),NXinstrument/$(detector),NXpsd/SDS \
CounterMode -type DFNT_CHAR -rank 1 -dim {30}
cter_preset=/entry1,NXentry/$(inst),NXinstrument/$(detector),NXpsd/SDS \
Preset -type NX_INT32
cter_time=/entry1,NXentry/$(inst),NXinstrument/$(detector),NXpsd/SDS \
time
cter_01=/entry1,NXentry/$(inst),NXinstrument/$(detector),NXpsd/SDS \
Monitor -type DFNT_INT32 -attr {units,counts}
cter_00=/entry1,NXentry/$(inst),NXinstrument/$(detector),NXpsd/SDS \
beam_monitor -type DFNT_INT32 -attr {units,counts}
cter_04=/entry1,NXentry/$(inst),NXinstrument/$(detector),NXpsd/SDS \
proton_monitor -type DFNT_INT32 -attr {units,counts}
#-------------- detector bank
dtheta=/entry1,NXentry/$(inst),NXinstrument/$(detector),NXpsd/SDS \
two_theta -rank 1 -dim {$(noofdetectors)} -attr {axis,1} \
-attr {units,degree}
dcounts=/entry1,NXentry/$(inst),NXinstrument/$(detector),NXpsd/SDS \
counts -type DFNT_INT32 -LZW -rank 1 -dim {$(noofdetectors)} \
-attr {signal,1}
dthst=/entry1,NXentry/$(inst),NXinstrument/$(detector),NXpsd/SDS \
two_theta_start -attr {units,degree}
dtstep=/entry1,NXentry/$(inst),NXinstrument/$(detector),NXpsd/SDS \
Step -attr {units,degree}
dtnstep=/entry1,NXentry/$(inst),NXinstrument/$(detector),NXpsd/SDS \
no_of_steps -type NX_INT32
#--------------- Sample
saname=/entry1,NXentry/sample,NXsample/SDS sample_name -type DFNT_CHAR \
-rank 1
devname=/entry1,NXentry/sample,NXsample/SDS device_name -type DFNT_CHAR \
-rank 1
stemp=/entry1,NXentry/sample,NXsample/SDS sample_temperature -attr {units,K}
smean=/entry1,NXentry/sample,NXsample/SDS temperature_mean -attr {units,K}
stddev=/entry1,NXentry/sample,NXsample/SDS temperature_stddev -attr {units,K}
mfield=/entry1,NXentry/sample,NXsample/SDS magfield -attr {units,T}
saangle=/entry1,NXentry/sample,NXsample/SDS sample_table_rotation \
-attr {units,degree}
smur=/entry1,NXentry/sample,NXsample/SDS sample_mur \
-attr {units,degree}
#----------------NXdata ------------------------------------------------
dana=/entry1,NXentry/data1,NXdata/NXVGROUP

100024
mcstas/dmc/dmc245.dat Normal file

File diff suppressed because it is too large Load Diff

100024
mcstas/dmc/dmc256.dat Normal file

File diff suppressed because it is too large Load Diff

100024
mcstas/dmc/dmc380.dat Normal file

File diff suppressed because it is too large Load Diff

100024
mcstas/dmc/dmc420.dat Normal file

File diff suppressed because it is too large Load Diff

127
mcstas/dmc/dmc_sics01.instr Normal file
View File

@ -0,0 +1,127 @@
DEFINE INSTRUMENT DMC_diff(TKOFF,lambda,char *samplefile, char *monfile)
DECLARE
%{
double mono_q = 1.87;
double OMA;
double RV;
double y_mono = 0.025;
double NV = 5;
double d_phi_0;
double TKOFF;
double sample_radius = 0.005;
double sample_height = 0.03;
double lambda;
double ldiff=0.5;
char *samplefile;
%}
INITIALIZE
%{
OMA = TKOFF/2;
RV = fabs(2*2.82*sin(DEG2RAD*OMA));
%}
TRACE
COMPONENT source_arm = Arm()
AT (0, 0, 0) ABSOLUTE
/* values for guide side window RNR12 */
COMPONENT csource = Source_gen(
radius = 0.08,xw = 0.02, yh = 0.12, dist = 1.5,
Lambda0 = lambda, dLambda = ldiff,
T1=150.42,I1=5.98e11,
T2=37.23,I2=5.637e11,T3=14.9,I3=0.962e11)
AT (0,0,0) RELATIVE source_arm ROTATED (0,0,0) RELATIVE source_arm
/* guide segment 1, m=2, 4.66 m */
COMPONENT guide1 = Guide(w1=0.02, h1=0.12, w2=0.02, h2=0.12,
l=4.66, R0=0.995, Qc=0.0217, alpha = 5.76,
m = 2.0, W = 0.0033)
AT (0,0,1.5) RELATIVE source_arm ROTATED (0,0,0) RELATIVE source_arm
/* guide segment 2, curved, m=2, 24.5 m */
COMPONENT guide2 = Bender(
w = 0.02, h = 0.12, r = 3612, R0a = 0.995, Qca = 0.0217,
alphaa = 5.76, ma = 2, Wa = 0.0033, R0i = 0.995, Qci = 0.0217,
alphai = 5.76, mi = 2, Wi = 0.0033, R0s = 0.995, Qcs = 0.0217,
alphas = 5.76, ms = 2, Ws = 0.0033, l = 24.5)
AT (0,0,6.16) RELATIVE source_arm ROTATED (0,0,0) RELATIVE source_arm
/* bunker wall, m=2, 3.0 m */
COMPONENT bunker = Guide(
w1=0.02, h1=.12, w2=0.02, h2=.12,
l=3.0, R0=0.995, Qc=0.0217, alpha = 5.76,
m = 2.0, W = 0.0033)
AT (0,0,30.66) RELATIVE source_arm ROTATED (0,0,0) RELATIVE source_arm
/* guide segment 3, m=2, 8.84 m */
COMPONENT guide3 = Guide(
w1=0.02, h1=.12, w2=0.02, h2=.12,
l=8.84, R0=0.995,Qc=0.0217, alpha = 5.76,
m = 2.0, W = 0.0033)
AT (0,0,33.66) RELATIVE source_arm ROTATED (0,0,0) RELATIVE source_arm
/* guide exit at 42.5 m - measured flux 2.46 10e8 cm-2 s-1 mA-1 */
COMPONENT in_slit = Slit(
xmin = -0.01, xmax=0.01 , ymin = -0.06, ymax = 0.06)
AT (0,0,42.5) RELATIVE source_arm ROTATED (0,0,0) RELATIVE source_arm
/* Monochromator description */
COMPONENT sma = Arm() /* source - monochromator arm */
AT (0, 0, 43.15) RELATIVE source_arm ROTATED (0,OMA,0) RELATIVE source_arm
COMPONENT foc_mono = Monochromator_2foc(
zwidth = 0.05, yheight = 0.025, gap = 0.0005, NH = 1, NV = 5,
mosaich = 38, mosaicv = 38, r0 = 0.7, Q = 1.8857, RV = RV,
RH = 0)
AT (0, 0, 0) RELATIVE sma
COMPONENT msa = Arm() /* monochromator - sample arm */
AT (0, 0, 0) RELATIVE sma ROTATED (0, TKOFF, 0) RELATIVE source_arm
COMPONENT out1_slit = Slit(
xmin=-0.01, xmax=0.01, ymin=-0.06, ymax=0.06)
AT (0,0,0.2) RELATIVE msa ROTATED (0,0,0) RELATIVE msa
COMPONENT Amoin_slit = Slit(
xmin=-0.01, xmax=0.01, ymin=-0.06, ymax=0.06)
AT (0,0,0.325) RELATIVE msa ROTATED (0,0,0) RELATIVE msa
COMPONENT Bmoin_slit = Slit(
xmin=-0.01, xmax=0.01, ymin=-0.06, ymax=0.06)
AT (0,0,0.525) RELATIVE msa ROTATED (0,0,0) RELATIVE msa
COMPONENT out2_slit = Slit(
xmin=-0.01, xmax=0.01, ymin=-0.06, ymax=0.06)
AT (0,0,0.65) RELATIVE msa ROTATED (0,0,0) RELATIVE msa
COMPONENT PSD_sample = PSD_monitor(
xmin=-0.02, xmax=0.02, ymin=-0.065, ymax=0.065,
nx=80, ny=80, filename="PSD_sample.dat",controlfile=monfile, dumpCount=500)
AT ( 0, 0, 1.5) RELATIVE msa
COMPONENT sa_arm = Arm()
AT (0, 0, 2.82) RELATIVE msa
ROTATED (0, 0, 0) RELATIVE msa
COMPONENT sample = PowderN (
d_phi0=40,radius=sample_radius, h=sample_height,
pack=1, Vc=1076.98, reflections = samplefile,
sigma_a=0.2, target_index=+4)
AT ( 0, 0, 0) RELATIVE sa_arm
COMPONENT sda = Arm() /* sample-detector arm */
AT (0, 0, 0) RELATIVE sa_arm ROTATED (0, -93.8, 0) RELATIVE sa_arm
COMPONENT Det9 = Monitor_nD(
xwidth=3.0,yheight=0.09,
options="banana theta limits [19 99] bins=400, file=det9.dat")
AT (0,0,0) RELATIVE sa_arm
ROTATED (0, 0, 180) RELATIVE sa_arm
END

145
mcstas/dmc/dmc_sics05.instr Normal file
View File

@ -0,0 +1,145 @@
DEFINE INSTRUMENT DMC_diff(lambda,Det_start, char *samplefile, char *monfile)
DECLARE
%{
double mono_q;
double dm;
double OMA;
double RV;
double NV = 5;
double TKOFF;
double sample_radius = 0.005;
double sample_height = 0.03;
double lambda;
double ldiff=0.5;
double Det_start;
double Det_end;
char option_list[150];
%}
INITIALIZE
%{
dm = 3.3537;
TKOFF = lambda/(2.*dm);
TKOFF = 2.*asin(TKOFF)*57.29577951308232087679815481410517;
printf("TKOFF = %f\n", TKOFF);
OMA = TKOFF/2;
RV = fabs(2*2.82*sin(DEG2RAD*OMA));
Det_end= Det_start + 80;
sprintf(option_list,"banana theta limits [%f %f] bins=400, file=det9.dat",Det_start,Det_end);
printf("%s \n",option_list);
%}
TRACE
COMPONENT source_arm = Arm()
AT (0, 0, 0) ABSOLUTE
COMPONENT progress = Progress_bar(percent=5,flag_save=1)
AT (0,0,0) ABSOLUTE
/* values for guide side window RNR12 */
COMPONENT csource = Source_gen(
radius = 0.08,xw = 0.02, yh = 0.12, dist = 1.5,
Lambda0 = lambda, dLambda = ldiff,
T1=150.42,I1=5.98e11,
T2=37.23,I2=5.637e11,T3=14.9,I3=0.962e11)
AT (0,0,0) RELATIVE source_arm ROTATED (0,0,0) RELATIVE source_arm
/* guide segment 1, m=2, 4.66 m */
COMPONENT guide1 = Guide(w1=0.02, h1=0.12, w2=0.02, h2=0.12,
l=4.66, R0=0.995, Qc=0.0217, alpha = 5.76,
m = 2.0, W = 0.0033)
AT (0,0,1.5) RELATIVE source_arm ROTATED (0,0,0) RELATIVE source_arm
/* guide segment 2, curved, m=2, 24.5 m */
COMPONENT guide2 = Bender(
w = 0.02, h = 0.12, r = 3612, R0a = 0.995, Qca = 0.0217,
alphaa = 5.76, ma = 2, Wa = 0.0033, R0i = 0.995, Qci = 0.0217,
alphai = 5.76, mi = 2, Wi = 0.0033, R0s = 0.995, Qcs = 0.0217,
alphas = 5.76, ms = 2, Ws = 0.0033, l = 24.5)
AT (0,0,6.16) RELATIVE source_arm ROTATED (0,0,0) RELATIVE source_arm
/* bunker wall, m=2, 3.0 m */
COMPONENT bunker = Guide(
w1=0.02, h1=.12, w2=0.02, h2=.12,
l=3.0, R0=0.995, Qc=0.0217, alpha = 5.76,
m = 2.0, W = 0.0033)
AT (0,0,30.66) RELATIVE source_arm ROTATED (0,0,0) RELATIVE source_arm
/* guide segment 3, m=2, 8.84 m */
COMPONENT guide3 = Guide(
w1=0.02, h1=.12, w2=0.02, h2=.12,
l=8.84, R0=0.995,Qc=0.0217, alpha = 5.76,
m = 2.0, W = 0.0033)
AT (0,0,33.66) RELATIVE source_arm ROTATED (0,0,0) RELATIVE source_arm
/* guide exit at 42.5 m - measured flux 2.46 10e8 cm-2 s-1 mA-1 */
COMPONENT in_slit = Slit(
xmin = -0.01, xmax=0.01 , ymin = -0.06, ymax = 0.06)
AT (0,0,42.5) RELATIVE source_arm ROTATED (0,0,0) RELATIVE source_arm
/* Monochromator description */
COMPONENT sma = Arm() /* source - monochromator arm */
AT (0, 0, 43.15) RELATIVE source_arm ROTATED (0,OMA,0) RELATIVE source_arm
COMPONENT foc_mono = Monochromator_curved(
zwidth = 0.05, yheight = 0.025, gap = 0.0005, NH = 1, NV = 5,
mosaich = 38, mosaicv = 38, r0 = 0.7, DM=dm, RV = RV,
RH = 0)
AT (0, 0, 0) RELATIVE sma
COMPONENT msa = Arm() /* monochromator - sample arm */
AT (0, 0, 0) RELATIVE sma ROTATED (0, TKOFF, 0) RELATIVE source_arm
COMPONENT out1_slit = Slit(
xmin=-0.01, xmax=0.01, ymin=-0.06, ymax=0.06)
AT (0,0,0.2) RELATIVE msa ROTATED (0,0,0) RELATIVE msa
COMPONENT Amoin_slit = Slit(
xmin=-0.01, xmax=0.01, ymin=-0.06, ymax=0.06)
AT (0,0,0.325) RELATIVE msa ROTATED (0,0,0) RELATIVE msa
COMPONENT Bmoin_slit = Slit(
xmin=-0.01, xmax=0.01, ymin=-0.06, ymax=0.06)
AT (0,0,0.525) RELATIVE msa ROTATED (0,0,0) RELATIVE msa
COMPONENT out2_slit = Slit(
xmin=-0.01, xmax=0.01, ymin=-0.06, ymax=0.06)
AT (0,0,0.65) RELATIVE msa ROTATED (0,0,0) RELATIVE msa
COMPONENT PSD_sample = MKMonitor(
xmin=-0.05, xmax=0.05, ymin=-0.07, ymax=0.07,controlfile=monfile)
AT ( 0, 0, 1.5) RELATIVE msa
/*
COMPONENT PSD_sample = PSD_monitor(
xmin=-0.05, xmax=0.05, ymin=-0.07, ymax=0.07,
nx=80, ny=80, filename="PSD_sample.dat",controlfile=monfile,dumpCount=1000)
AT ( 0, 0, 1.5) RELATIVE msa
COMPONENT PSD_sample = PSD_monitor(
xmin=-0.05, xmax=0.05, ymin=-0.07, ymax=0.07,
nx=80, ny=80, filename="PSD_sample.dat")
AT ( 0, 0, 1.5) RELATIVE msa
*/
COMPONENT sa_arm = Arm()
AT (0, 0, 2.82) RELATIVE msa
ROTATED (0, 0, 0) RELATIVE msa
COMPONENT sample = PowderN (
d_phi0=0, radius=sample_radius, h=sample_height,
pack=1, Vc=1076.98, reflections = samplefile,
sigma_a=0.2, focus_aw=80, focus_ah=3.5, target_index=+1)
AT ( 0, 0, 0) RELATIVE sa_arm
COMPONENT Det9 = Monitor_nD(
xwidth=3.0,yheight=0.09,
options=option_list)
AT (0,0,0.000001) RELATIVE sa_arm
ROTATED (0, 0, 180) RELATIVE sa_arm
END

68
mcstas/dmc/dmcafter.instr Normal file
View File

@ -0,0 +1,68 @@
DEFINE INSTRUMENT DMC_diff(Det_start, char *samplefile, char *monfile,
char *lambdafile,int repeat)
DECLARE
%{
double sample_radius = 0.005;
double sample_height = 0.03;
double Det_start;
double Det_end;
char option_list[150];
%}
INITIALIZE
%{
Det_end= Det_start + 80;
sprintf(option_list,"banana theta limits [%f %f] bins=400, file=det9.dat",Det_start,Det_end);
printf("%s \n",option_list);
%}
TRACE
COMPONENT msa = Arm() /* monochromator - sample arm */
AT (0, 0, 0) ABSOLUTE
/*
COMPONENT progress = Progress_bar(percent=5,flag_save=1)
AT (0,0,.1) ABSOLUTE
*/
COMPONENT in = Virtual_input(file=lambdafile,repeat_count=repeat)
AT (0,0,0.64) RELATIVE msa ROTATED (0,0,0) RELATIVE msa
COMPONENT out2_slit = Slit(
xmin=-0.01, xmax=0.01, ymin=-0.06, ymax=0.06)
AT (0,0,0.65) RELATIVE msa ROTATED (0,0,0) RELATIVE msa
COMPONENT PSD_sample = MKMonitor(
xmin=-0.05, xmax=0.05, ymin=-0.07, ymax=0.07,controlfile=monfile)
AT ( 0, 0, 1.5) RELATIVE msa
/*
COMPONENT PSD_sample = PSD_monitor(
xmin=-0.05, xmax=0.05, ymin=-0.07, ymax=0.07,
nx=80, ny=80, filename="PSD_sample.dat",controlfile=monfile,dumpCount=1000)
AT ( 0, 0, 1.5) RELATIVE msa
COMPONENT PSD_sample = PSD_monitor(
xmin=-0.05, xmax=0.05, ymin=-0.07, ymax=0.07,
nx=80, ny=80, filename="PSD_sample.dat")
AT ( 0, 0, 1.5) RELATIVE msa
*/
COMPONENT sa_arm = Arm()
AT (0, 0, 2.82) RELATIVE msa
ROTATED (0, 0, 0) RELATIVE msa
COMPONENT sample = PowderN (
d_phi0=0, radius=sample_radius, h=sample_height,
pack=1, Vc=1076.98, reflections = samplefile,
sigma_a=0.2, focus_aw=80, focus_ah=3.5, target_index=+1)
AT ( 0, 0, 0) RELATIVE sa_arm
COMPONENT Det9 = Monitor_nD(
xwidth=3.0,yheight=0.09,
options=option_list)
AT (0,0,0.000001) RELATIVE sa_arm
ROTATED (0, 0, 180) RELATIVE sa_arm
END

113
mcstas/dmc/dmcprecalc.instr Normal file
View File

@ -0,0 +1,113 @@
DEFINE INSTRUMENT DMC_diff(lambda,Det_start, char *samplefile, char *monfile,
char *lambdafile)
DECLARE
%{
double mono_q;
double dm;
double OMA;
double RV;
double NV = 5;
double TKOFF;
double sample_radius = 0.005;
double sample_height = 0.03;
double lambda;
double ldiff=0.5;
double Det_start;
double Det_end;
char option_list[150];
%}
INITIALIZE
%{
dm = 3.3537;
TKOFF = lambda/(2.*dm);
TKOFF = 2.*asin(TKOFF)*57.29577951308232087679815481410517;
printf("TKOFF = %f\n", TKOFF);
OMA = TKOFF/2;
RV = fabs(2*2.82*sin(DEG2RAD*OMA));
Det_end= Det_start + 80;
sprintf(option_list,"banana theta limits [%f %f] bins=400, file=det9.dat",Det_start,Det_end);
printf("%s \n",option_list);
%}
TRACE
COMPONENT source_arm = Arm()
AT (0, 0, 0) ABSOLUTE
/* values for guide side window RNR12 */
COMPONENT csource = Source_gen(
radius = 0.08,xw = 0.02, yh = 0.12, dist = 1.5,
Lambda0 = lambda, dLambda = ldiff,
T1=150.42,I1=5.98e11,
T2=37.23,I2=5.637e11,T3=14.9,I3=0.962e11)
AT (0,0,0) RELATIVE source_arm ROTATED (0,0,0) RELATIVE source_arm
/* guide segment 1, m=2, 4.66 m */
COMPONENT guide1 = Guide(w1=0.02, h1=0.12, w2=0.02, h2=0.12,
l=4.66, R0=0.995, Qc=0.0217, alpha = 5.76,
m = 2.0, W = 0.0033)
AT (0,0,1.5) RELATIVE source_arm ROTATED (0,0,0) RELATIVE source_arm
/* guide segment 2, curved, m=2, 24.5 m */
COMPONENT guide2 = Bender(
w = 0.02, h = 0.12, r = 3612, R0a = 0.995, Qca = 0.0217,
alphaa = 5.76, ma = 2, Wa = 0.0033, R0i = 0.995, Qci = 0.0217,
alphai = 5.76, mi = 2, Wi = 0.0033, R0s = 0.995, Qcs = 0.0217,
alphas = 5.76, ms = 2, Ws = 0.0033, l = 24.5)
AT (0,0,6.16) RELATIVE source_arm ROTATED (0,0,0) RELATIVE source_arm
/* bunker wall, m=2, 3.0 m */
COMPONENT bunker = Guide(
w1=0.02, h1=.12, w2=0.02, h2=.12,
l=3.0, R0=0.995, Qc=0.0217, alpha = 5.76,
m = 2.0, W = 0.0033)
AT (0,0,30.66) RELATIVE source_arm ROTATED (0,0,0) RELATIVE source_arm
/* guide segment 3, m=2, 8.84 m */
COMPONENT guide3 = Guide(
w1=0.02, h1=.12, w2=0.02, h2=.12,
l=8.84, R0=0.995,Qc=0.0217, alpha = 5.76,
m = 2.0, W = 0.0033)
AT (0,0,33.66) RELATIVE source_arm ROTATED (0,0,0) RELATIVE source_arm
/* guide exit at 42.5 m - measured flux 2.46 10e8 cm-2 s-1 mA-1 */
COMPONENT in_slit = Slit(
xmin = -0.01, xmax=0.01 , ymin = -0.06, ymax = 0.06)
AT (0,0,42.5) RELATIVE source_arm ROTATED (0,0,0) RELATIVE source_arm
/* Monochromator description */
COMPONENT sma = Arm() /* source - monochromator arm */
AT (0, 0, 43.15) RELATIVE source_arm ROTATED (0,OMA,0) RELATIVE source_arm
COMPONENT foc_mono = Monochromator_curved(
zwidth = 0.05, yheight = 0.025, gap = 0.0005, NH = 1, NV = 5,
mosaich = 38, mosaicv = 38, r0 = 0.7, DM=dm, RV = RV,
RH = 0)
AT (0, 0, 0) RELATIVE sma
COMPONENT msa = Arm() /* monochromator - sample arm */
AT (0, 0, 0) RELATIVE sma ROTATED (0, TKOFF, 0) RELATIVE source_arm
COMPONENT out1_slit = Slit(
xmin=-0.01, xmax=0.01, ymin=-0.06, ymax=0.06)
AT (0,0,0.2) RELATIVE msa ROTATED (0,0,0) RELATIVE msa
COMPONENT Amoin_slit = Slit(
xmin=-0.01, xmax=0.01, ymin=-0.06, ymax=0.06)
AT (0,0,0.325) RELATIVE msa ROTATED (0,0,0) RELATIVE msa
COMPONENT Bmoin_slit = Slit(
xmin=-0.01, xmax=0.01, ymin=-0.06, ymax=0.06)
AT (0,0,0.525) RELATIVE msa ROTATED (0,0,0) RELATIVE msa
COMPONENT out = Virtual_output(file=lambdafile,bufsize=100000)
AT(0,0,0.64) RELATIVE msa ROTATED (0,0,0) RELATIVE msa
END

84
mcstas/dmc/log.tcl Normal file
View File

@ -0,0 +1,84 @@
#-----------------------------------------------------------------------------
# This file implements a LogBook facility for SICS.
# Usage:
# LogBook - lists the current status
# LogBook filename - sets the logbook file name
# LogBook on - starts logging, creates new file
# LogBook off - closes log file
#
# Mark Koennecke, June 1997, initially developed for SANS
# works using one procedure and an array for data. All internal procedures
# start with cli
#----------------------------------------------------------------------------
set cliArray(file) default.log
set cliArray(status) off
set cliArray(number) 0
#---------------------------------------------------------------------------
proc cliList { } {
global cliArray
# ClientPut [format " LogBook file: %s\n" $cliArray(file)]
# ClientPut [format " Logging: %s " $cliArray(status)] ]
append res [format " LogBook file: %s\n" $cliArray(file)] \
[format " Logging: %s " $cliArray(status)]
return $res
}
#-------------------------------------------------------------------------
proc cliLogOn { } {
global cliArray
set cmd [list config File $cliArray(file)]
set ret [catch {eval $cmd} msg]
if { $ret != 0 } {
error $msg
} else {
set l [ split $msg = ]
set cliArray(number) [lindex $l 1]
set cliArray(status) on
}
}
#--------------------------------------------------------------------------
proc cliLogOff { } {
global cliArray
set cmd [list config close $cliArray(number)]
set ret [catch {eval $cmd} msg]
if { $ret != 0 } {
error $msg
} else {
set cliArray(status) off
}
}
#-------------------------------------------------------------------------
proc logbook args {
global cliArray
#---- first case: a listing
if { [llength $args] == 0} {
return [cliList]
}
#---- there must be an argument
set argument [lindex $args 0]
#---- on/ off
if {[string compare "on" $argument] == 0} {
set ret [catch {cliLogOn} msg]
if { $ret != 0 } {
error $msg
} else {
ClientPut OK
}
} elseif {[string compare "off" $argument] == 0} {
set ret [catch {cliLogOff} msg]
if { $ret != 0 } {
error $msg
} else {
ClientPut OK
}
} elseif {[string compare "file" $argument] >= 0} {
if {[llength $args] < 1} {
error "ERROR: nor filename specified for LogBook"
}
set cliArray(file) [lindex $args 1]
} elseif {[string compare "no" $argument] == 0} {
ClientPut $cliArray(number)
} else {
error [format "ERROR: unknown argument %s to LogBook" $argument]
}
}

4
mcstas/dmc/makelambda.sh Normal file
View File

@ -0,0 +1,4 @@
dmcprecalc -n 1e9 lambda=2.56 Det_start=19. monfile=monfile samplefile=na2ca3al2f14.q lambdafile="dmc256.dat"
dmcprecalc -n 1e9 lambda=4.2 Det_start=19. monfile=monfile samplefile=na2ca3al2f14.q lambdafile="dmc420.dat"
dmcprecalc -n 1e9 lambda=2.45 Det_start=19. monfile=monfile samplefile=na2ca3al2f14.q lambdafile="dmc245.dat"
dmcprecalc -n 1e9 lambda=3.8 Det_start=19. monfile=monfile samplefile=na2ca3al2f14.q lambdafile="dmc380.dat"

111
mcstas/dmc/mcsupport.tcl Normal file
View File

@ -0,0 +1,111 @@
#-------------------------------------------------------------------
# These are a couple of Tcl function which help with the interface
# between SICS and McStas
#
# Mark Koennecke, June 2005
#--------------------------------------------------------------------
# washsimfile fixes the evil NXsimulation name ="./dmc.xml" thing in
# the XML file. Path separators in name attributes throw off
# NXopenpath
#--------------------------------------------------------------------
proc washsimfile {name} {
set oriname $name
set in [open $name "r"]
set name [file tail $name]
set out [open /tmp/$name "w"]
while { [gets $in line] >= 0} {
if { [string first "NXsimulation name=" $line] > 0} {
puts $out "<NXsimulation name=\"$name\">"
} else {
puts $out $line
}
}
close $in
close $out
file copy -force /tmp/$name $oriname
file delete /tmp/$name
}
#---------------------------------------------------------------------
# When McStas dumps or is killed we need to give McStas some time to
# dump its data. Otherwise we observe that data reading fails.
# mcwaittime is used for this. Increase if you see problems
#--------------------------------------------------------------------
set mcwaittime 7
#----------------------------------------------------------------------
proc mcstasdump {pid} {
global mcwaittime
if { $pid <= 0} {
error "Trying to dump invalid PID: $pid"
}
clientput "Dumping ..."
# catch {eval exec /usr/bin/kill -USR2 $pid}
catch {eval exec /bin/kill -USR2 $pid}
wait $mcwaittime
}
#-----------------------------------------------------------------------
# mcstasisrunning has to open a pipe to ps and to read the results of
# the ps command. This is because a terminated McStas simulation turns
# into a Zombie process which finishes never. This can only be cured
# by checking for this in the STAT field of ps's output. According to
# the Unix FAQ this is the best solution......
#----------------------------------------------------------------------
proc readPID {pid} {
# set f [ open "| /bin/ps -up $pid" r]
# This is system dependent. The above works for SL, below for Suse
set f [ open "| /bin/ps up $pid" r]
set pstxt [read $f]
close $f
return $pstxt
}
#----------------------------------------------------------------------
proc mcstasisrunning {pid} {
global runningCount runningLast
# clientput "Checking McStas PID $pid"
if { $pid <= 0} {
return 0
}
set pstxt " "
set ret [catch {set pstxt [readPID $pid]} msg]
# clientput "pstext = $pstxt"
set pslist [split $pstxt "\n"]
if { [llength $pslist] < 2} {
return 0
}
set header [lindex $pslist 0]
set idx [string first STAT $header]
set stat [string trim [string range [lindex $pslist 1] $idx [expr $idx + 4]]]
if { [string first Z $stat] >= 0 || [string first T $stat] >= 0} {
mccontrol finish
return 0
} else {
return 1
}
}
#-----------------------------------------------------------------------
proc mcstaskill {pid} {
global mcwaittime
if { $pid <= 0} {
error "Trying to kill invalid PID $pid"
}
clientput "Killing $pid"
# catch {eval exec /usr/bin/kill -TERM $pid} msg
# On Suse kill is /bin/kill, on others it is /usr/bin/kill
catch {eval exec /bin/kill -TERM $pid} msg
clientput "Kill message $msg"
# catch {mccontrol finish}
wait 10
}
#-----------------------------------------------------------------------
proc mcinstall {} {
allowexec /usr/bin/kill
allowexec /bin/kill
allowexec /bin/ps
Publish mcstasdump User
Publish mcstasisrunning User
Publish mcstaskill User
mccontrol configure mcdump mcstasdump
mccontrol configure mckill mcstaskill
mccontrol configure mcisrunning mcstasisrunning
mccontrol configure update 300
}

29
mcstas/dmc/na2ca3al2f14.q Normal file
View File

@ -0,0 +1,29 @@
// mult Q(hkl) F2 DW w
12 0.8669 0.81 1 0
6 1.2259 16.0 1 0
24 1.5015 9.0 1 0
12 1.7338 40.96 1 0
12 1.9384 7.84 1 0
12 1.9384 0.64 1 0
8 2.1234 26.01 1 0
24 2.2936 5.29 1 0
24 2.2936 10.24 1 0
6 2.4519 62.41 1 0
24 2.601 38.44 1 0
12 2.601 0.81 1 0
12 2.7413 56.25 1 0
12 2.7413 60.84 1 0
24 2.8751 161.29 1 0
24 3.003 4.41 1 0
24 3.1256 108.16 1 0
12 3.1256 1.96 1 0
12 3.1256 18.49 1 0
24 3.1256 51.84 1 0
24 3.3574 116.64 1 0
24 3.3574 53.29 1 0
12 3.4675 256.0 1 0
12 3.5743 28.09 1 0
12 3.5743 0.81 1 0
24 3.5743 4.0 1 0
24 3.6779 39.69 1 0
6 3.6779 33.64 1 0

108
mcstas/dmc/nxdmc.tcl Normal file
View File

@ -0,0 +1,108 @@
#--------------------------------------------------------------------------
# NeXus file writing for DMC
#
# This is the scripted version using nxscript
#
# Mark Koennecke, May 2004
#---------------------------------------------------------------------------
proc storeMonochromator {} {
nxscript puttext mname "Pyrolithic Graphite 002"
writeFloatVar mtheta OmegaM
writeFloatVar mttheta TwoThetaM
writeFloatVar mlambda lambda
writeFloatVar mcurve CurveM
writeFloatVar monox MonoX
writeFloatVar monoy MonoY
writeFloatVar mchi MonoChi
writeFloatVar mphi MonoPhi
set dd [SplitReply [mono dd]]
set dd [string trim $dd]
set ret [catch {expr $dd * 1.0} msg]
if {$ret != 0} {
clientput "ERROR: failed to read monochromator d spacing"
} else {
nxscript putfloat mdd $dd
}
}
#------------------------------------------------------------------------
proc storeSample {} {
writeTextVar saname sample
writeFloatVar saangle Table
set ret [catch {set temp [SplitReply [temperature]]} msg]
if {$ret == 0} {
nxscript putfloat stemp $temp
set dname [string trim [SplitReply [temperature driver]]]
if {"$dname" == "tecs"} {
set dname [SplitReply [temperature device]]
}
nxscript puttext devname $dname
set ret [catch {temperature log getmean} msg]
if {$ret == 0} {
set l [split $msg =]
set stddev [string trim [lindex $l 2]]
set l2 [split [string trim [lindex $l 1]]]
set mean [string trim [lindex $l2 0]]
nxscript putfloat smean $mean
nxscript putfloat stddev $stddev
}
}
writeFloatVar smur sample_mur
set ret [catch {set mtemp [SplitReply [magfield]]} msg]
if {$ret == 0} {
nxscript putfloat mfield $mtemp
}
}
#---------------------------------------------------------------------
proc storeDetector {ndet stepwidth} {
nxscript udpatedictvar noofdetectors $ndet
set start [string trim [SplitReply [TwoThetaD]]]
for {set i 0} { $i < $ndet} {incr i} {
set th($i) [expr $start + $i * $stepwidth]
}
nxscript putfloat dthst $start
nxscript putfloat dtstep $stepwidth
nxscript putint dtnstep [string trim $ndet]
nxscript putarray dtheta th 400
nxscript puthm dcounts banana
}
#----------------------------------------------------------------------
proc makeLinks {} {
nxscript makelink dana dcounts
nxscript makelink dana dtheta
nxscript makelink dana dthst
nxscript makelink dana dtstep
nxscript makelink dana dtnstep
nxscript makelink dana mlambda
}
#-------------------------------------------------------------------------
# store DMC data
#-------------------------------------------------------------------------
proc storedata {} {
global home
set fil [newFileName]
clientput "Opening $fil for writing"
nxscript create4 $fil $home/dmc.dic
writeStandardAttributes $fil
writeTextVar etitle title
nxscript puttext estart [sicstime]
nxscript puttext iname "DMC at SINQ"
nxscript puttext sname "SINQ"
nxscript puttext stype "Continuous flux spallation source"
nxscript updatedictvar inst DMC
nxscript updatedictvar detector "DMC-BF3-Detector"
storeMonochromator
storeSample
nxscript putcounter cter counter
storeDetector 400 .2
makeLinks
nxscript close
}

96
mcstas/dmc/nxsupport.tcl Normal file
View File

@ -0,0 +1,96 @@
#===========================================================================
# Support routines for scripting NeXus files with nxscript.
#
# Mark Koennecke, February 2003
# Mark Koennecke, January 2004
#==========================================================================
proc makeFileName args {
sicsdatanumber incr
set num [SplitReply [sicsdatanumber]]
set p [string trim [SplitReply [sicsdatapath]]]
set pre [string trim [SplitReply [sicsdataprefix]]]
set po [string trim [SplitReply [sicsdatapostfix]]]
return [format "%s%s%5.5d2003%s" $p $pre $num $po]
}
#==========================================================================
# new version, attending to the new 1000 grouping logic
proc newFileName args {
set ret [catch {nxscript makefilename} msg]
if {$ret != 0} {
clientput "ERROR: Misconfiguration of file writing variables"
clientput "Defaulting filename to emergency.hdf"
set fil emergency.hdf
} else {
set fil $msg
}
return $fil
}
#==========================================================================
proc writeFloatVar {alias var} {
set ret [catch {set val [SplitReply [$var]]} val]
if { $ret != 0} {
clientput [format "ERROR: failed to read %s, %s" $var $val]
return
} else {
set val [string trim $val]
set ret [catch {expr $val * 1.0} val]
if { $ret == 0} {
nxscript putfloat $alias [expr $val * 1.0 ]
} else {
clientput "ERROR: bad value $val when reading $var"
}
}
}
#==========================================================================
proc writeIntVar {alias var} {
set ret [catch {set val [SplitReply [$var]]} val]
if { $ret != 0} {
clientput [format "ERROR: failed to read %s, %s" $var $val]
return
} else {
set val [string trim $val]
set ret [catch {expr $val * 1.0} val]
if { $ret == 0} {
nxscript putint $alias [expr int($val * 1.0) ]
} else {
clientput "ERROR: bad value $val when reading $var"
}
}
}
#=========================================================================
proc writeTextVar {alias var} {
set ret [catch {$var} val]
if { $ret != 0} {
clientput [format "ERROR: failed to read %s" $var]
return
} else {
set index [string first = $val]
if {$index >= 0} {
set txt [string trim [string range $val [expr $index + 1] end]]
nxscript puttext $alias $txt
} else {
clientput [format "ERROR: failed to read %s" $var]
}
}
}
#========================================================================
proc writeTextAttribute {attName var} {
set ret [catch {set val [SplitReply [$var]]} val]
if { $ret != 0} {
clientput [format "ERROR: failed to read %s" $var]
return
} else {
nxscript putglobal $attName [string trim $val]
}
}
#=======================================================================
proc writeStandardAttributes {fileName} {
nxscript putglobal file_name $fileName
nxscript putglobal file_time [sicstime]
writeTextAttribute instrument instrument
writeTextAttribute owner user
writeTextAttribute owner_telephone_number phone
writeTextAttribute owner_fax_number fax
writeTextAttribute owner_email email
writeTextAttribute owner_address adress
}

149
mcstas/dmc/vdmc.tcl Normal file
View File

@ -0,0 +1,149 @@
# --------------------------------------------------------------------------
# Initialization script for a virtual DMC instrument using a McStas
# simulationas a data source
#
# Dr. Mark Koennecke, June 2005
#---------------------------------------------------------------------------
# O P T I O N S
set home $env(HOME)/src/workspace/sics/mcstas/dmc
#--------------------------------- first all the server options are set
#ServerOption RedirectFile $home/stdcdmc
ServerOption ReadTimeOut 10
ServerOption AcceptTimeOut 10
ServerOption ReadUserPasswdTimeout 500000
ServerOption LogFileBaseName "$home/vdmclog"
ServerOption LogFileDir $home/
ServerOption ServerPort 2911
ServerOption statusfile $home/vdmcstatus.tcl
ServerOption InterruptPort 3007
ServerOption TelnetPort 1301
ServerOption TelWord sicslogin
#---------------------------------------------------------------------------
# U S E R S
SicsUser lnsmanager lnsSICSlns 1
SicsUser Manager Manager 1
SicsUser user looser 2
SicsUser Spy 007 1
#--------------------------------------------------------------------------
# D E V I C E S : M O T O R S
#---------------------------------------------------------------------------
ClientPut "Installing Motors"
Motor OmegaM SIM 0 120 -.1 2.
Motor TwoThetaM SIM 30 100 -.1 1.
Motor MonoX SIM -30 30 -.1 3.0
Motor MonoY SIM -30 30 -.1 3.0
Motor CurveM SIM 0 20 -.1 3.0
Motor MonoPhi SIM -30 30 -.1 3.0
Motor MonoChi SIM -30 30 -.1 3.0
# sample Table
Motor Table SIM -180 360 -.1 2.
Motor TwoThetaD SIM -10 120 -.1 1.
#-------------------------------------------------------------
# Monochromator
#-------------------------------------------------------------
MakeMono Mono "PG-002" OmegaM TwoThetaM CurveM
Mono DD 3.3537
Mono vk1 -0.025942
Mono vk2 5.351660
# Syntax MakeWaveLength name MonochromatorToUse
MakeWaveLength lambda Mono
#--------------------------------------------------------------------------
# Configure Detector
# NOTE: the McStas objects have to be created first, otherwise
# the initialisation will fail.
#--------------------------------------------------------------------------
MakeMcStasReader
MakeMcStasController
allowexec $home/dmcafter
allowexec $home/dmc_sics05
ClientPut "Installing counter"
MakeCounter counter mcstas
counter SetExponent 1
MakeHM banana mcstas
banana configure HistMode Normal
banana configure OverFlowMode Ceil
banana configure Rank 1
banana configure dim0 400
banana configure BinWidth 4
banana preset 100.
banana CountMode Timer
banana configure Counter counter
banana configure init 0
banana init
banana exponent 3
#-------------------------------------------------------------------------
# Aliases
#-------------------------------------------------------------------------
SicsAlias OmegaM A1
SicsAlias TwoThetaM A2
SicsAlias Table A3
SicsAlias TwoThetaD A4
SicsAlias MonoX A5
SicsAlias MonoY A6
SicsAlias MonoPhi A7
SicsAlias MonoChi A8
SicsAlias CurveM A9
DefineAlias TT temperature
#--------------------------------------------------------------------------
# V A R I A B L E S
# now a few general variables are created
# Syntax: VarMake name type access
# type can be one of: Text, Int, Float
#access can be one of: Internal, Mugger, User, Spy
#-----------------------------------------------------------------------------
VarMake SicsDataPath Text Internal
SicsDataPath "$home/"
SicsDataPath lock
VarMake DetStepWidth Float Internal
DetStepWidth 0.2
DetStepWidth lock
VarMake Instrument Text Internal
Instrument "Virtual DMC driven by McStas"
Instrument lock
VarMake Title Text User
VarMake User Text User
VarMake Collimation Text User
VarMake SampleIntern Text User
SampleIntern Kellerit
VarMake comment1 Text User
VarMake comment2 Text User
VarMake comment3 Text User
VarMake starttime Text User
starttime ""
VarMake SicsDataPrefix Text Internal
SicsDataPrefix vdmc
#--------- make data number
MakeDataNumber SicsDataNumber $home/DataNumber
VarMake SicsDataPostFix Text Internal
SicsDataPostFix ".hdf"
VarMake Adress Text User
VarMake phone Text User
VarMake fax Text User
VarMake email Text User
VarMake sample_mur Float User
#--------------------------------------------------------------------------
# P R O C E D U R E S
#--------------------------------------------------------------------------
MakeDrive
MakeBatchManager
MakeNXScript
#-------------------- initialize scripted commands
source $home/vdmccom.tcl
#-------------------- configure commandlog
commandlog auto
commandlog intervall 5
#----------- enable sycamore
#InstallProtocolHandler
#InstallSinfox
#source sycFormat.tcl
#source /usr/lib/tcllib1.6.1/stooop/stooop.tcl
#namespace import stooop::*
#source sinfo.tcl
#source sycamore.tcl
#Publish sinfo Spy

381
mcstas/dmc/vdmccom.tcl Normal file
View File

@ -0,0 +1,381 @@
#----------------------------------------------------------------------------
# VDMC instrument special scripted commands
#
# Mark Koennecke, June 2005
#---------------------------------------------------------------------------
source $home/mcsupport.tcl
if { [info exists vdmcinit] == 0 } {
set vdmcinit 1
Publish LogBook Spy
Publish count User
Publish Repeat User
Publish storedmcdata User
Publish rundmcsim User
Publish copydmcdata User
Publish sample User
Publish wwwsics Spy
mcinstall
}
source $home/log.tcl
source $home/nxsupport.tcl
source $home/nxdmc.tcl
#------------------------------------------------------------------------
proc SplitReply { text } {
set l [split $text =]
return [lindex $l 1]
}
#---------------------------------------------------------------------
# load a lazy pulverix file
#---------------------------------------------------------------------
proc washlazy {name} {
global home
set newNam [file rootname [file tail $name]]
set in [open $name r]
set out [open $home/$newNam.q w]
#------- proceed to first header line
while { [gets $in line] >= 0} {
if { [string first "H K L THETA 2THETA D VALUE" $line] > 0} {
break
}
}
#------- process data lines
puts $out "// mult Q(hkl) F2 DW w"
while { [gets $in line] >= 0} {
set num [scan $line "%d %d %d %f %f %f %f %f %d %d %d %f %f %f %f %f %d"\
h k l th th2 d di sin h2 k2 l2 I F A B ang mul]
if { $num == 17} {
set q [expr (2.*3.14159265358979323846)/$d]
set f2 [expr $F * $F]
puts $out [format "%d %f %f 1 0" $mul $q $f2]
}
}
close $in
close $out
}
#----------------------------------------------------------------------
# script for setting the sample. We only allow samples for which
# there is a corresponing q data file
#------------------------------------------------------------------------
proc sample args {
global home
if { [llength $args] < 1} {
set sa [SplitReply [sampleintern]]
return "sample = $sa"
}
set txt [lindex $args 0]
#-------- list
if { [string compare $txt list] == 0} {
set l [glob $home/*.q]
foreach f $l {
append out [file rootname [file tail $f]] "\n"
}
return $out
}
#--------- load
if { [string compare $txt load] == 0} {
if { [llength $args] < 2} {
error "Need path to lazy pulverix output file to load"
}
set nam [lindex $args 1]
washlazy $nam
set nam2 [file rootname [file tail $nam]]
eval sampleintern $nam2
return OK
}
if { ![file exists $home/$txt.q] } {
error "No Q data for sample $txt"
} else {
eval sampleintern $txt
return OK
}
}
#-----------------------------------------------------------------------
# Scripts required for controlling McStas simulations
#-----------------------------------------------------------------------
proc rundmcsim {mode preset} {
global home
append command $home/dmc_sics05 " -f $home/dmc.xml --format=\"XML\""
append command " -n 1e10 "
append command " lambda=[string trim [SplitReply [lambda]]]"
append command " Det_start=[string trim [SplitReply [TwoThetaD]]]"
append command " samplefile=$home/[string trim [SplitReply [sampleintern]]].q"
append command " monfile=$home/monfile "
append command " >& $home/dmc.log &"
clientput "Starting McStas.. "
# clientput $command
set ret [catch {eval exec $command} msg]
if {$ret != 0} {
error $msg
} else {
return $msg
}
}
#------------------------------------------------------------------------
# Run the DMC simulation in an optimized mode with neutrons
# precalculated for various wave length until the sample slit
#------------------------------------------------------------------------
set dmcdata(2.56) dmc256.dat
set dmcdata(4.2) dmc420.dat
set dmcdata(2.45) dmc245.dat
set dmcdata(3.8) dmc380.dat
#-------------------------------------------------------------------------
proc rundmcoptsim {mode preset } {
global home dmcdata
#--------- locate closest precalculated neutron data file
set lambda [SplitReply [lambda]]
set myLambda $lambda
set wv [array names dmcdata]
set diff 999999.99
set lambdafile $dmcdata(2.56)
foreach w $wv {
set tmp [expr abs($w - $lambda)]
if { $tmp < $diff} {
set diff $tmp
set lambdafile $dmcdata($w)
set myLambda $w
}
}
#-------- build McStas command line
append command $home/dmcafter " -f $home/dmc.xml --format=\"XML\""
append command " -n 1e10 "
append command " lambdafile=$home/$lambdafile"
append command " Det_start=[string trim [SplitReply [TwoThetaD]]]"
append command " samplefile=$home/[string trim [SplitReply [sampleintern]]].q"
append command " monfile=$home/monfile "
append command " repeat=1000000000 "
append command " >& $home/dmc.log &"
#--------- start McStas
clientput "Starting McStas.. "
clientput "Coercing $lambda to precalculated $myLambda"
# clientput $command
set ret [catch {eval exec $command} msg]
if {$ret != 0} {
error "ERROR: $msg"
} else {
return $msg
}
}
#------------------------------------------------------------------------
proc copydmcdataold { } {
global home
set mcversion "McStas 1.8 - Mar. 05, 2004"
washsimfile $home/dmc.xml
mcreader open $home/dmc.xml
mcreader insertmon \
"/$mcversion/DMC_diff/dmc.xml/PSD_sample/values" \
counter 1 [expr 1./350]
mcreader insertmon \
"/$mcversion/DMC_diff/dmc.xml/Det9/det9.dat/values" \
counter 5
set hmScale [SplitReply [counter getmonitor 5]]
if { $hmScale <= 0} {
set hmScale 1e9
} else {
set hmScale [expr $hmScale * 5e4]
}
clientput "HM scale = $hmScale"
mcreader inserthm \
"/$mcversion/DMC_diff/dmc.xml/Det9/det9.dat/data" banana $hmScale
mcreader close
}
#------------------------------------------------------------------------
proc copydmcdata { } {
global home
set mcversion "McStas 1.8 - Mar. 05, 2004"
washsimfile $home/dmc.xml
mcreader open $home/dmc.xml
mcreader insertmon \
"/$mcversion/DMC_diff/dmc.xml/PSD_sample/values" \
counter 1 [expr 1./350]
# mcreader insertmon \
# "/$mcversion/DMC_diff/dmc.xml/Det9/det9.dat/values" \
# counter 4
set val [mcreader getfield\
"/$mcversion/DMC_diff/dmc.xml/Det9/det9.dat/values"]
set l [split $val]
set a [lindex $l 0]
set b [lindex $val 2]
if {$b > .0} {
set hmScale [expr $b / $a]
set hmScale [expr $hmScale / 6.]
} else {
set hmScale 1e9
}
clientput "HM scale = $hmScale"
mcreader inserthm \
"/$mcversion/DMC_diff/dmc.xml/Det9/det9.dat/data" banana $hmScale
mcreader close
}
#-------------------------------------------------------------------------
proc dmcdump {pid} {
#--do nothing: progress is doing it for us
}
#--------------------------------------------------------------------------
mccontrol configure mcstart rundmcoptsim
mccontrol configure mccopydata copydmcdata
mccontrol configure update 30
mccontrol configure mcmonfile $home/monfile
mccontrol configure monitorscale [expr 1. /350]
mccontrol configure mcdump mcstasdump
#--------------------------------------------------------------------------
# A count command for VDMC
# All arguments are optional. The current values will be used if not
# specified
# Dr. Mark Koennecke, Juli 1997
#--------------------------------------------------------------------------
proc count { {mode NULL } { preset NULL } } {
starttime [sicstime]
catch {temperature log clear} msg
#----- deal with mode
set mode2 [string toupper $mode]
set mode3 [string trim $mode2]
set mc [string index $mode2 0]
if { [string compare $mc T] == 0 } {
banana CountMode Timer
} elseif { [string compare $mc M] == 0 } {
banana CountMode Monitor
}
#------ deal with preset
if { [string compare $preset NULL] != 0 } {
banana preset $preset
}
#------ prepare a count message
set a [banana preset]
set aa [SplitReply $a]
set b [banana CountMode]
set bb [SplitReply $b]
ClientPut [format " Starting counting in %s mode with a preset of %s" \
$bb $aa]
#------- count
banana InitVal 0
wait 1
banana count
set ret [catch {Success} msg]
#------- StoreData
storedata
if { $ret != 0 } {
error [format "Counting ended with error"]
}
}
#---------------- Repeat -----------------------------------------------
proc repeat { num {mode NULL} {preset NULL} } {
for { set i 0 } { $i < $num } { incr i } {
set ret [catch {count $mode $preset} msg]
if {$ret != 0} {
error "Counting ended with error"
}
}
}
#--------------------------------------------------------------------------
proc GetNum { text } {
set list [split $text =]
return [lindex $list 1]
}
#------------------------------------------------------------------------
# This implements the wwwsics command which generates a listing of
# important experiment parameters in html format for the SICS WWW Status
# application. This version is for the powder diffractometers DMC and
# HRPT.
#
# Mark Koennecke, March 2000
#------------------------------------------------------------------------
proc wwwsics {} {
#----- get all the data we need
set user [GetNum [user]]
set sample [GetNum [sample]]
set tit [GetNum [title]]
set ret [catch {lambda} msg]
if {$ret != 0 } {
set lam Undetermined
} else {
set lam [GetNum $msg]
}
set ret [catch {temperature} msg]
if {$ret != 0 } {
set tem Undetermined
} else {
set tem [GetNum $msg]
}
set run [GetNum [sicsdatanumber]]
catch {incr run} msg
set stat [GetNum [status]]
#------- html format the reply
append result "<table BORDER=2>"
append result <tr> <th>Run Number</th> <td> $run </td> </tr>
append result <tr> <th>Title</th> <td> $tit </td> </tr>
append result <tr> <th>User</th> <td> $user </td> </tr>
append result <tr> <th>Sample </th> <td> $sample </td> </tr>
append result <tr> <th>wavelength</th> <td> $lam</td> </tr>
append result <tr> <th>Sample Temperature</th> <td> $tem</td> </tr>
append result <tr> <th>Status</th> <td> $stat</td> </tr>
append result </table>
return $result
}
#----------------------------------------------------------------------------
# wwpar formats a parameter for display in the WWW-control.
#
# Mark Koennecke, June 2000
#---------------------------------------------------------------------------
set ret [catch {wwwpar motor a4} msg]
if {$ret != 0} {
Publish wwwpar Spy
Publish wwwuser Spy
}
#--------------------------------------------------------------------------
proc WWWNum { text } {
set list [split $text =]
return [lindex $list 1]
}
#---------------------------------------------------------------------------
proc wwwpar {type mot} {
append txt $mot ,
#----- get lowerlimit, either from motor or temperature controller
if { [string compare $type motor] == 0} {
set ret [catch {$mot softlowerlim} msg]
} else {
set ret [catch {$mot lowerlimit} msg]
}
if {$ret != 0 } {
append txt UNKNOWN ,
} else {
append txt [WWWNum $msg] ,
}
#------- get value
set ret [catch {$mot} msg]
if {$ret == 0} {
append txt [WWWNum $msg] ,
} else {
append txt UNKNOWN ,
}
#----- get upperlimit, either from motor or temperature controller
if {[string compare $type motor] == 0} {
set ret [catch {$mot softupperlim} msg]
} else {
set ret [catch {$mot upperlimit} msg]
}
if {$ret != 0 } {
append txt UNKNOWN
} else {
append txt [WWWNum $msg]
}
return $txt
}
#------------- wwwuser formats user information into a html table
proc wwwuser {} {
lappend list title sample user email phone adress
append txt "<table>"
foreach e $list {
set ret [catch {$e} msg]
if {$ret == 0} {
set l [split $msg =]
append txt "<tr><th>" [lindex $l 0] "</th><td> \n"
append txt "<INPUT type=text name=[lindex $l 0] value=\"[lindex $l 1]\" "
append txt "\n LENGTH=40 MAXLENGTH=80></td></tr>\n "
}
}
return $txt
}

231
mcstas/dmc/vdmcstatus.tcl Normal file
View File

@ -0,0 +1,231 @@
# Motor omegam
omegam sign 1.000000
omegam SoftZero 0.000000
omegam SoftLowerLim 0.000000
omegam SoftUpperLim 120.000000
omegam Fixed -1.000000
omegam InterruptMode 0.000000
omegam precision 0.010000
omegam ignorefault 0.000000
omegam AccessCode 2.000000
omegam movecount 10.000000
# Motor twothetam
twothetam sign 1.000000
twothetam SoftZero 0.000000
twothetam SoftLowerLim 30.000000
twothetam SoftUpperLim 100.000000
twothetam Fixed -1.000000
twothetam InterruptMode 0.000000
twothetam precision 0.010000
twothetam ignorefault 0.000000
twothetam AccessCode 2.000000
twothetam movecount 10.000000
# Motor monox
monox sign 1.000000
monox SoftZero 0.000000
monox SoftLowerLim -30.000000
monox SoftUpperLim 30.000000
monox Fixed -1.000000
monox InterruptMode 0.000000
monox precision 0.010000
monox ignorefault 0.000000
monox AccessCode 2.000000
monox movecount 10.000000
# Motor monoy
monoy sign 1.000000
monoy SoftZero 0.000000
monoy SoftLowerLim -30.000000
monoy SoftUpperLim 30.000000
monoy Fixed -1.000000
monoy InterruptMode 0.000000
monoy precision 0.010000
monoy ignorefault 0.000000
monoy AccessCode 2.000000
monoy movecount 10.000000
# Motor curvem
curvem sign 1.000000
curvem SoftZero 0.000000
curvem SoftLowerLim 0.000000
curvem SoftUpperLim 20.000000
curvem Fixed -1.000000
curvem InterruptMode 0.000000
curvem precision 0.010000
curvem ignorefault 0.000000
curvem AccessCode 2.000000
curvem movecount 10.000000
# Motor monophi
monophi sign 1.000000
monophi SoftZero 0.000000
monophi SoftLowerLim -30.000000
monophi SoftUpperLim 30.000000
monophi Fixed -1.000000
monophi InterruptMode 0.000000
monophi precision 0.010000
monophi ignorefault 0.000000
monophi AccessCode 2.000000
monophi movecount 10.000000
# Motor monochi
monochi sign 1.000000
monochi SoftZero 0.000000
monochi SoftLowerLim -30.000000
monochi SoftUpperLim 30.000000
monochi Fixed -1.000000
monochi InterruptMode 0.000000
monochi precision 0.010000
monochi ignorefault 0.000000
monochi AccessCode 2.000000
monochi movecount 10.000000
# Motor table
table sign 1.000000
table SoftZero 0.000000
table SoftLowerLim -180.000000
table SoftUpperLim 360.000000
table Fixed -1.000000
table InterruptMode 0.000000
table precision 0.010000
table ignorefault 0.000000
table AccessCode 2.000000
table movecount 10.000000
# Motor twothetad
twothetad sign 1.000000
twothetad SoftZero 0.000000
twothetad SoftLowerLim -10.000000
twothetad SoftUpperLim 120.000000
twothetad Fixed -1.000000
twothetad InterruptMode 0.000000
twothetad precision 0.010000
twothetad ignorefault 0.000000
twothetad AccessCode 2.000000
twothetad movecount 10.000000
# Counter counter
counter SetPreset 60000000.000000
counter SetMode Monitor
banana CountMode monitor
banana preset 60000.000000
# Motor a1
a1 sign 1.000000
a1 SoftZero 0.000000
a1 SoftLowerLim 0.000000
a1 SoftUpperLim 120.000000
a1 Fixed -1.000000
a1 InterruptMode 0.000000
a1 precision 0.010000
a1 ignorefault 0.000000
a1 AccessCode 2.000000
a1 movecount 10.000000
# Motor a2
a2 sign 1.000000
a2 SoftZero 0.000000
a2 SoftLowerLim 30.000000
a2 SoftUpperLim 100.000000
a2 Fixed -1.000000
a2 InterruptMode 0.000000
a2 precision 0.010000
a2 ignorefault 0.000000
a2 AccessCode 2.000000
a2 movecount 10.000000
# Motor a3
a3 sign 1.000000
a3 SoftZero 0.000000
a3 SoftLowerLim -180.000000
a3 SoftUpperLim 360.000000
a3 Fixed -1.000000
a3 InterruptMode 0.000000
a3 precision 0.010000
a3 ignorefault 0.000000
a3 AccessCode 2.000000
a3 movecount 10.000000
# Motor a4
a4 sign 1.000000
a4 SoftZero 0.000000
a4 SoftLowerLim -10.000000
a4 SoftUpperLim 120.000000
a4 Fixed -1.000000
a4 InterruptMode 0.000000
a4 precision 0.010000
a4 ignorefault 0.000000
a4 AccessCode 2.000000
a4 movecount 10.000000
# Motor a5
a5 sign 1.000000
a5 SoftZero 0.000000
a5 SoftLowerLim -30.000000
a5 SoftUpperLim 30.000000
a5 Fixed -1.000000
a5 InterruptMode 0.000000
a5 precision 0.010000
a5 ignorefault 0.000000
a5 AccessCode 2.000000
a5 movecount 10.000000
# Motor a6
a6 sign 1.000000
a6 SoftZero 0.000000
a6 SoftLowerLim -30.000000
a6 SoftUpperLim 30.000000
a6 Fixed -1.000000
a6 InterruptMode 0.000000
a6 precision 0.010000
a6 ignorefault 0.000000
a6 AccessCode 2.000000
a6 movecount 10.000000
# Motor a7
a7 sign 1.000000
a7 SoftZero 0.000000
a7 SoftLowerLim -30.000000
a7 SoftUpperLim 30.000000
a7 Fixed -1.000000
a7 InterruptMode 0.000000
a7 precision 0.010000
a7 ignorefault 0.000000
a7 AccessCode 2.000000
a7 movecount 10.000000
# Motor a8
a8 sign 1.000000
a8 SoftZero 0.000000
a8 SoftLowerLim -30.000000
a8 SoftUpperLim 30.000000
a8 Fixed -1.000000
a8 InterruptMode 0.000000
a8 precision 0.010000
a8 ignorefault 0.000000
a8 AccessCode 2.000000
a8 movecount 10.000000
# Motor a9
a9 sign 1.000000
a9 SoftZero 0.000000
a9 SoftLowerLim 0.000000
a9 SoftUpperLim 20.000000
a9 Fixed -1.000000
a9 InterruptMode 0.000000
a9 precision 0.010000
a9 ignorefault 0.000000
a9 AccessCode 2.000000
a9 movecount 10.000000
title D3C
title setAccess 2
user UNKNOWN
user setAccess 2
collimation UNKNOWN
collimation setAccess 2
sampleintern D3C
sampleintern setAccess 2
comment1 UNKNOWN
comment1 setAccess 2
comment2 UNKNOWN
comment2 setAccess 2
comment3 UNKNOWN
comment3 setAccess 2
starttime 2006-03-10 15:33:04
starttime setAccess 2
adress UNKNOWN
adress setAccess 2
phone UNKNOWN
phone setAccess 2
fax UNKNOWN
fax setAccess 2
email UNKNOWN
email setAccess 2
sample_mur 0.000000
sample_mur setAccess 2
exe batchpath ./
exe syspath ./