[neutron-mc] scilab line length limit

Dalgliesh, RM (Robert) R.M.Dalgliesh at rl.ac.uk
Tue May 4 10:20:08 CEST 2004


Has anyone else run into a problem with the length of the data line that
scilab appears to be able to read in?
I find that if you run with 1000 channels in a linear detector and gather
enough counts that scilab issues this error when you try to run the
mcstas.sci file.
(1000 channels may seem a bit greedy but I am investigating a few instrument
specific things that require fine wavelength resultion over a wide range.)

 !--error     6 
inconsistent row/column dimensions
at line      34 of function get_lmon1_dat            called by :  
mc_lmon1_dat=get_lmon1_dat();
line    67 of exec file called by :    

line     6 of function mcload_inline            called by :  
line     3 of function mcplot_inline            called by :  
line    60 of function get_mcstas               called by :  
mc_mcstas=get_mcstas();
line    97 of exec file called by :    
exec('mcstas.sci',-1);s=get_mcstas();
 
if I run fewer neutrons through the simulation everthing is ok beacuse 0 is
put into the file as 0 not 0.00000e0.
running the same instrument and reading into matlab is not a problem.

The simple test instrument below illustrates the problem. if you run 1e4
neutrons through scilab is happy but 1e5 and it won't like it.
I'm going to have a look through the scilab documentation to see if there is
a limit to the length of line it can read in but just wondered if anyone
else had experienced the same problem.

DEFINE INSTRUMENT test()
DECLARE
%{
%}
INITIALIZE
%{
%}
TRACE
COMPONENT Origin = Arm()
  AT (0,0,0) ABSOLUTE

COMPONENT source1 = Source_flat(
    radius = 0.1, dist = 2.0, xw = 0.1, yh = 0.1, E0 = 100.0,
    dE = 90.0)
  AT (0.0, 0.0, 0.00001) RELATIVE Origin

COMPONENT lmon1 = L_monitor(
    nchan = 1000, filename = "lmon1.dat", xmin = -0.1,
    xmax = 0.1, ymin = -0.1, ymax = 0.1, Lmin = 0.0, Lmax = 10.0)
  AT (0.0, 0.0, 10.1) RELATIVE Origin
FINALLY
%{
%}
/* The END token marks the instrument definition end */
END




More information about the mcstas-users mailing list