<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<!-- Template generated by Exclaimer Mail Disclaimers on 03:25:23 Monday, 16 September 2013 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">P.52638027-1b11-456c-bc71-c97090c1b995 {
MARGIN: 0cm 0cm 0pt
}
LI.52638027-1b11-456c-bc71-c97090c1b995 {
MARGIN: 0cm 0cm 0pt
}
DIV.52638027-1b11-456c-bc71-c97090c1b995 {
MARGIN: 0cm 0cm 0pt
}
TABLE.52638027-1b11-456c-bc71-c97090c1b995Table {
MARGIN: 0cm 0cm 0pt
}
DIV.Section1 {
page: Section1
}
</style>
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1959070367;
mso-list-type:hybrid;
mso-list-template-ids:-1607719522 470351873 470351875 470351877 470351873 470351875 470351877 470351873 470351875 470351877;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-ZA" link="blue" vlink="purple">
<p class="52638027-1b11-456c-bc71-c97090c1b995"></p>
<div class="WordSection1">
<p class="MsoNormal">Good day,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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 (<a href="http://mailman.mcstas.org/pipermail/mcstas-users/2005q2/001509.html">http://mailman.mcstas.org/pipermail/mcstas-users/2005q2/001509.html</a>)
with minor changes for compatibility.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Instrument to create the event file<o:p></o:p></p>
<p class="MsoNormal">//**********************************<o:p></o:p></p>
<p class="MsoNormal">DEFINE INSTRUMENT out()<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">TRACE<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">COMPONENT Origin = Arm()<o:p></o:p></p>
<p class="MsoNormal"> AT (0,0,0) ABSOLUTE<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">COMPONENT source = Source_simple(<o:p></o:p></p>
<p class="MsoNormal"> radius = 0.1, dist = 10, xwidth = 0.1, yheight = 0.1, E0 = 5, dE = 0.5)<o:p></o:p></p>
<p class="MsoNormal"> AT (0, 0, 0) RELATIVE Origin<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">COMPONENT Vout = Virtual_output(<o:p></o:p></p>
<p class="MsoNormal"> filename = "vout.dat", bufsize = 0, type="double")<o:p></o:p></p>
<p class="MsoNormal"> AT (0, 0, 10) RELATIVE Origin<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">COMPONENT PSD = PSD_monitor(<o:p></o:p></p>
<p class="MsoNormal"> nx = 128, ny = 128, filename = "PSD", xmin = -0.1, xmax = 0.1, ymin = -0.1, ymax = 0.1)<o:p></o:p></p>
<p class="MsoNormal"> AT (0, 0, 11) RELATIVE Origin<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">END<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Instrument that reads from the event file<o:p></o:p></p>
<p class="MsoNormal">//**********************************<o:p></o:p></p>
<p class="MsoNormal">DEFINE INSTRUMENT input()<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">TRACE<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">COMPONENT Origin = Arm()<o:p></o:p></p>
<p class="MsoNormal"> AT (0,0,0) ABSOLUTE<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">COMPONENT source = Virtual_input(<o:p></o:p></p>
<p class="MsoNormal"> filename = "vout.dat", type = "double", repeat_count = 10)<o:p></o:p></p>
<p class="MsoNormal"> AT (0, 0, 10) RELATIVE Origin<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">COMPONENT PSD = PSD_monitor(<o:p></o:p></p>
<p class="MsoNormal"> nx = 128, ny = 128, filename = "PSD", xmin = -0.1, xmax = 0.1, ymin = -0.1, ymax = 0.1)<o:p></o:p></p>
<p class="MsoNormal"> AT (0, 0, 11) RELATIVE Origin<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">END<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">//***********************************<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-family:Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]>When running the ‘out’ instrument, everything seems to work fine from the following console output and the attached PSD screenshot(PSD_Out.png):<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-indent:36.0pt">Detector: PSD_I=0.00539967 PSD_ERR=5.39967e-006 PSD_N=1e+006 "PSD.sim"
<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:72.0pt">Virtual_output: Vout: Saved 1000000.000000 events (all) in file vout.dat<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-family:Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]>When running the ‘input’ instrument, I get the following console output and an obviously wrong PSD distribution (PSD_Input.png)<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-indent:36.0pt">Detector: PSD_I=9.17955e-008 PSD_ERR=7.04051e-009 PSD_N=171 "PSD.sim"<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-indent:36.0pt">WARNING: file 'PSD.sim': Low Statistics (171 events in 128x128x1 bins).<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-indent:36.0pt">Warning: 130 events were removed in Component[3] PSD=PSD_monitor()<o:p></o:p></p>
<p class="MsoNormal"> (negative time, miss next components, rounding errors, Nan, Inf).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Does anyone else also experience this or am I doing something wrong? Any suggestions?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Deon<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p></p>
<p class="52638027-1b11-456c-bc71-c97090c1b995"> </p>
<p class="52638027-1b11-456c-bc71-c97090c1b995"><span style="font-family:Century Gothic; font-size:x-small; color: #339999; font-weight: bold; ">Deon Marais</span></p>
<p class="52638027-1b11-456c-bc71-c97090c1b995"><span style="font-family:Century Gothic; font-size:xx-small; color: #339999; font-weight: bold; ">Senior Engineer</span></p>
<p class="52638027-1b11-456c-bc71-c97090c1b995"><strong><font color="#339999" size="1" face="Century Gothic">Tel:
</font></strong><span style="font-family:Century Gothic; font-size:xx-small; color: #339999; font-weight: bold; ">+27 12 305 5645</span></p>
<p class="52638027-1b11-456c-bc71-c97090c1b995"><strong><font color="#339999" size="1" face="Century Gothic">Fax:
</font></strong><span style="font-family:Century Gothic; font-size:xx-small; color: #339999; font-weight: bold; ">+27 12 305 5851</span></p>
<p class="52638027-1b11-456c-bc71-c97090c1b995"><strong><font color="#339999" size="1" face="Century Gothic">Cell:
</font></strong><span style="font-family:Century Gothic; font-size:xx-small; color: #339999; font-weight: bold; ">+27 72 435 1137</span></p>
<p class="52638027-1b11-456c-bc71-c97090c1b995"><strong><font color="#339999"><font size="1" face="Century Gothic">Email:
</font><span style="font-family:Century Gothic; font-size:xx-small; color: Blue; "><span style="font-family:Century Gothic; font-size:xx-small; color: Blue; "><a href="Deon.Marais@necsa.co.za" title="Click to send email to Deon Marais" target=""><span style="font-family:Century Gothic; font-size:xx-small; color: Blue; ">Deon.Marais@necsa.co.za</span></a></span></span></font></strong></p>
<p class="52638027-1b11-456c-bc71-c97090c1b995"><strong><font face="Century Gothic"><font size="1"><font color="#339999">Website:</font>
</font></font></strong><a href="http://www.necsa.co.za"><strong><font size="1" face="Century Gothic">www.necsa.co.za</font></strong></a></p>
<p class="52638027-1b11-456c-bc71-c97090c1b995"> </p>
<p class="52638027-1b11-456c-bc71-c97090c1b995"><img id="IMG1" border="0" src="cid:image37f35b.JPG@3d1a743e.42a6f655" width="166" height="97"></p>
<font color="#339999">
<hr>
</font>
<p class="52638027-1b11-456c-bc71-c97090c1b995"><font color="#339999" size="1" face="Verdana">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. </font></p>
<p class="52638027-1b11-456c-bc71-c97090c1b995"> </p>
<p class="52638027-1b11-456c-bc71-c97090c1b995"></p>
<FONT face=Arial><FONT size=2>
<HR>
<FONT color=#808080><BR>Scanned by</FONT> <FONT
color=#4f1f91><STRONG>MailMarshal</STRONG></FONT> <FONT color=#808080>-
M86 Security's comprehensive email content security solution. Download a free
evaluation of MailMarshal at </FONT></FONT><A
href="http://www.m86security.com"><FONT color=#808080
size=2>www.m86security.com</FONT></A><BR><BR><FONT
color=#400080><STRONG></STRONG></FONT><FONT size=2>
<HR>
</FONT></FONT>
</body>
</html>