[neutron-mc] scilab line length limit

Emmanuel Farhi farhi at ill.fr
Tue May 4 11:22:47 CEST 2004


Hy Robert and neutron-mc users,

that's right, I think the buffer line in Scilab is limited, as well as the
'sack' for user variables. This stack is automatically inreased by McStas, but
there is indeed an intrinsic limit in Scilab for the size of the data and length
of lines in files.

The only solution to this 'known bug' is to limit the size of monitors
toreasonable values.

Emmanuel.

"Dalgliesh, RM (Robert)" wrote:

> 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
>
> _______________________________________________
> neutron-mc mailing list
> neutron-mc at risoe.dk
> http://neutron.risoe.dk/mailman/listinfo/neutron-mc

--
What's up Doc ?
--------------------------------------------
Emmanuel FARHI, http://www.ill.fr/Computing/people/Farhi  \|/ ____ \|/
CS-Group ILL4/156, Institut Laue-Langevin (ILL) Grenoble  ~@-/ oO \-@~
6 rue J. Horowitz, BP 156, 38042 Grenoble Cedex 9,France  /_( \__/ )_\
Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 20 76 48     \__U_/


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20040504/494cbbd5/attachment.html>


More information about the mcstas-users mailing list