rounding errors?

Kristian Nielsen kristian.nielsen at risoe.dk
Tue Feb 23 08:53:20 CET 1999


Hi Georg,

> today I encountered some results I don't understand. I wanted to examine
> deltalambda/lambda at the sample and for tracing reasons I set energy
> detectors right before the monochromator, right after the monochromator
> and at the sample position. If you plot the curves of all energy
> detectors into one diagram the curve for the first detector looks ok. It
> is just an even distribution (without guide). The one at the sample
> gives you a gaussian like peak, looks ok also. For the energy detector
> right after the monochromator I would have expected a gaussian like
> curve with the maximum at the desired wavelength but with higher
> intensity as the oone at the sample. But the maximum is shifted to
> longer wavelengths (about 3%)! I've tried several configurations and it
> is always the same.
> The attached example shows the effect. Q, theta and lambda should match.
> How many decimals do you recommend for these values? Is it a rounding
> error or a stupid error or something else?

Hm, I tried your example, and the results look ok to me.

You set the Q value for the monochromator to 8.88577. At 45 degrees I
calculate this to correspond to 81.8 meV, and both plots are nicely
centered around this value. Did you calculate another energy for this Q?
Then perhaps either the constants for unit conversion in McStas are
wrong, or you made an error?

The spectrum in the energy monitor after the monochromator is not
symmetric, as is to be expected; the monochromator scatters symetrically
in Q space, which is not symmetric in energy space.

I have put a plot of the four detectors on the web page, at

    http://neutron.risoe.dk/mcstas/support/artus/resi-plot.gif

Take a look and see if it looks similar to your results. This also gives
you a preview of what the next version of McStas will provide. This plot
is produced automatically by running an 'mcplot' front-end after the
simulation. Clicking the mouse produces a full-screen version of the
plot under the cursor.

 - Kristian.






More information about the mcstas-users mailing list