[neutron-mc] Re: virtual_output/input

Emmanuel FARHI farhi at ill.fr
Thu Jul 1 20:50:42 CEST 2004


Hello Jiao,

Well, as far as I know, it gave similar results in our tests, and users
did not mention something similar before (which does not mean there is no
error !).

The idea is to really have 2 instruments (using McStas 1.8):

Instr1:
TRACE

... // first part of the instrument

COMPONENT VirPos = Arm()
AT ...

COMPONENT myVirOut = Virtual_output(filename="source.dat")
AT (0,0,0) RELATIVE PREVIOUS

COMPONENT MonTest = Monitor_nD(options="x y vx vy vz, auto")
AT (0,0,0.1) RELATIVE PREVIOUS

END

Instr2:
COMPONENT VirPos = Arm()
AT (0,0,0) ABSOLUTE

COMPONENT myVirIn = Virtual_input(filename="source.dat")
AT (0,0,0) RELATIVE PREVIOUS

COMPONENT MonTest = Monitor_nD(options="x y vx vy vz, auto")
AT (0,0,0.1) RELATIVE PREVIOUS

... // rest of the instrument

END

The virtual source files store/restore events (neutrons) in the local
coordinate system of the component.

Both monitors from MonTest should give same results.
You may try different optional 'type' parameter for the source storage
(text, float, double).

Also, the Vitess_output/input should do the same, but using the Vitess
binary format (bigger files). This is an other test to try out.

If it really fails, you'll have to send me your instrument file, with the
parameters you use (command line) and your log file (from stdout), so that
I can reproduce the error.

Good luck.
Emmanuel.


> Dear Dr. Farhi,
>
> Sorry to bother you. I am a graduate student working on instrument
> simulation using mcstas in Prof. Fultz's group in Caltech. I am trying
> to separate an instrument into two parts and reconnect them using
> virtual_input/output. But the instrument with virtual_input/output does
> not give similar results as the one without them.  Could you please
> kindly give me suggestions on this issue? Or could you refer me to an
> archive in mcstas mailing list? Your help is greatly appreciated. Thank
> you!
>
> Best wishes,
> Jiao.


-- 
FARHI Emmanuel <farhi at ill.fr>
Groupe DS/CS, ILL4/156, Tel 04 76 20 71 35
ILL, Grenoble





More information about the mcstas-users mailing list