[mcstas-users] Problem: Virtual_input and Virtual_output components in McStas 2.0
Deon Marais
Deon.Marais at necsa.co.za
Mon Sep 16 15:25:22 CEST 2013
Good day,
I am having a bit of a problem using the Virtual_input and Virtual_output components in McStas 2.0. I have set up the following small example derived from a previous post (http://mailman.mcstas.org/pipermail/mcstas-users/2005q2/001509.html) with minor changes for compatibility.
Instrument to create the event file
//**********************************
DEFINE INSTRUMENT out()
TRACE
COMPONENT Origin = Arm()
AT (0,0,0) ABSOLUTE
COMPONENT source = Source_simple(
radius = 0.1, dist = 10, xwidth = 0.1, yheight = 0.1, E0 = 5, dE = 0.5)
AT (0, 0, 0) RELATIVE Origin
COMPONENT Vout = Virtual_output(
filename = "vout.dat", bufsize = 0, type="double")
AT (0, 0, 10) RELATIVE Origin
COMPONENT PSD = PSD_monitor(
nx = 128, ny = 128, filename = "PSD", xmin = -0.1, xmax = 0.1, ymin = -0.1, ymax = 0.1)
AT (0, 0, 11) RELATIVE Origin
END
Instrument that reads from the event file
//**********************************
DEFINE INSTRUMENT input()
TRACE
COMPONENT Origin = Arm()
AT (0,0,0) ABSOLUTE
COMPONENT source = Virtual_input(
filename = "vout.dat", type = "double", repeat_count = 10)
AT (0, 0, 10) RELATIVE Origin
COMPONENT PSD = PSD_monitor(
nx = 128, ny = 128, filename = "PSD", xmin = -0.1, xmax = 0.1, ymin = -0.1, ymax = 0.1)
AT (0, 0, 11) RELATIVE Origin
END
//***********************************
· When running the ‘out’ instrument, everything seems to work fine from the following console output and the attached PSD screenshot(PSD_Out.png):
Detector: PSD_I=0.00539967 PSD_ERR=5.39967e-006 PSD_N=1e+006 "PSD.sim"
Virtual_output: Vout: Saved 1000000.000000 events (all) in file vout.dat
· When running the ‘input’ instrument, I get the following console output and an obviously wrong PSD distribution (PSD_Input.png)
Detector: PSD_I=9.17955e-008 PSD_ERR=7.04051e-009 PSD_N=171 "PSD.sim"
WARNING: file 'PSD.sim': Low Statistics (171 events in 128x128x1 bins).
Warning: 130 events were removed in Component[3] PSD=PSD_monitor()
(negative time, miss next components, rounding errors, Nan, Inf).
I tried using type=’text’, and ‘float’, but the same problem persist. This was run on Windows7 x64, as well as on the Ubuntu live version available on the website and both gave the same results. Was also running on single CPU to rule out MPI problems.
Does anyone else also experience this or am I doing something wrong? Any suggestions?
Regards,
Deon
Deon Marais
Senior Engineer
Tel: +27 12 305 5645
Fax: +27 12 305 5851
Cell: +27 72 435 1137
Email: Deon.Marais at necsa.co.za
Website: www.necsa.co.za<http://www.necsa.co.za>
[cid:image37f35b.JPG at 3d1a743e.42a6f655]
________________________________
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version from NECSA.
#####################################################################################
Scanned by MailMarshal - M86 Security's comprehensive email content security solution.
Download a free evaluation of MailMarshal at www.m86security.com
#####################################################################################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20130916/9ba85e87/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image37f35b.JPG
Type: image/jpeg
Size: 3632 bytes
Desc: image37f35b.JPG
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20130916/9ba85e87/attachment.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PSD_Input.png
Type: image/png
Size: 26022 bytes
Desc: PSD_Input.png
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20130916/9ba85e87/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PSD_Out.png
Type: image/png
Size: 55200 bytes
Desc: PSD_Out.png
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20130916/9ba85e87/attachment-0001.png>
More information about the mcstas-users
mailing list