Optimizing McStas
Kristian Nielsen
kristian.nielsen at risoe.dk
Wed Sep 22 16:58:09 CEST 1999
> Date: Wed, 22 Sep 1999 15:56:25 +0200
> From: Farhi <farhi at ill.fr>
> I now have a (k,w) detector, that enables to plot 3D views of resolution
> ellisoid and so (not only for 3 axis instruments). I've tested it, and
> it gives the same results as ResTrax. It's really great and output file
> is McStas compliant (same structure). I attach to this mail some files
> showing how that stuff is working...
That's great! I would definately like to include it in McStas (with your
permission ...). I will put in some extensions to the DETECTOR_OUT stuff
so that your component will work a little better. It seems that you are
really getting up to speed on McStas, and it is quite unfortunate that
I am in Oxford just now. I will send you my latest development of McStas
as soon as I can, Monday at the latest.
> I'm now working on McStas optimization. I think about having 2
> Please answer me as soon as possible about this and what you think (did
> you started something equivalent already ?)
Yes indeed, in fact I have a quite stable implementation already! This
is in the form of a special source component Source_adapt; together with
another component it performs adaptive importance sampling, just as you
suggest.
It works by building a 3D stair-case distribution, covering energy,
horizontal position, and horizontal divergence. Initially the
distribution is flat, but bins that result in useful neutrons are given
a boost so that they will be selected more frequently, with lower
weight. It really works quite well, and often results in a 10-fold
decrease in running times. I will send you some code and documentation
as soon as I can.
> I've been talking with Jiri kulda about what does ResTrax do for
> optimisation, but he is very cautious about giving such informations :
> fear of beeing stolen without credits about ideas and sources. Anyway,
> he does not know exactly how it works (Jan Saroun made that part), and
> the method seems only applicable to 3-axis intruments (it starts from
> the sample).
Yes, there seem to be a bit of secrecy and protection surrounding
ResTrax ... but actually I had a very good talk with Jan Sauron in March
at the Ill, and I understand a bit of the optimizations. As you suggest,
much of it is specific to triple-axis (for example it sets the energy at
the monochromator, not at the source).
- Kristian.
More information about the mcstas-users
mailing list