rounding errors?

Dr. Georg Artus Georg_Artus at Physik.TU-Muenchen.DE
Wed Feb 24 11:46:23 CET 1999


Hello,

> Ah, now I see the problem. Your numbers are all integers, and look like
> the values of N (neutron events) in the monitors with 5e7 simulated
> neutrons. That will not work; because of neutron weights, the N values
> are not very meaningful in McStas. You need to use the I values instead
> (the 3rd column in the file).

Bingo! Stupid, but probably I was confused because all other monitors
have only one column (the correct one) in the output and energy monitors
have three. It was rather naive to use the first column without
thinking. Unfortunately the patterns of two detectors looked ok that
way!

> Hm, I wonder if a better file format would have helped to avoid this
> problem for you. I am in the process of designing a proper output file
> format for McStas. Do you have any suggestions resulting from your
> experience with McStas? I am considering NeXus, of course. There will
> also be an ASCII format, the challenge of which is to remain compatible
> with many different programs (excel, matlab, perldl, gnuplot, ...) while
> getting as much information in as possible.

A general solution fitting all needs will not be easy. Thousand
programs, thousand formats, in practice conversion impossible. So the
best thing would be to give the user as much choices as possible instead
of fixing anything to one format. 
May be it would be useful if Mcstas would title any column in output
files. So confusion like above might be avoided. Otherwise this might
disturb any automated graphical display with other programs afterwards.
Comfortable would be to let this be controlled by a user defined option
or variable, do it or leave it. 

I don't know the nexus format and how it can be used by all common
programs for graphical display. Which common programs read nexus or
which graphic packages do you need for it?

May be it would be a good idea for the ascii output, if the user could
select the output format. For me it would be very helpful it I could
chose '.' or ',' for the decimal separation and blank or tab for
separating columns. I'm using Excel under the windows3.11 emulation wabi
for display. Unfortunately we only have the german version and I cannot
switch to . instead of ,! It's not comfortable but the best I can do. I
also have tried Applixware 4.4.1 but there are a lot of flaws in it and
this packages still is too uncommon. I'm no fan of Microsoft but Excel
and Word are spoken nearly everywhere. :-{ 


Here some forther suggestion for McStas:

Any output files produced by e.g. psd monitors are always overwritten!!!
This is a heavy loss of calculated data! It would be advantageous to
keep them by version numbers or user defined names or anything like
this.

For some instruments one needs many conponents of the same type, think
of focussing monochromators. It would be nice to have something like a
loop construction for such setups in the *.instr files. 

At the Risoe meeting last November discussion also turned on how to
estimate the background. I know this leads very far but I think you
could 'easily  invert' the simulation if you calculate the neutrons
leaving the instrument with weight 1-p. The user may define the hitted
material surrounding the instrument (Fe, B4C, PE would be enough) and
with some principle interactions (e.g. for three neutron energy reanges)
one might get an estimate for background sources around the instrument.

Georg

-- 
*********************************************

Dr. Georg Artus
Technische Universitaet Muenchen
Neue Forschungsneutronenquelle Garching
D-85747 Garching

Tel: +49 (0)89/289-14675
Fax: +49 (0)89/289-14666 or 12112
E-mail: gartus at ph.tum.de





More information about the mcstas-users mailing list