<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Richard,
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Thank you for the instrument and MCPL files, I have now had a look at things.</div>
<div class=""><br class="">
</div>
<div class="">Not surprisingly, I do reproduce your finding, the neutrons are NOT propagated backward when gravity is on. I reproduce the issue both with McStas 2.7 and 3.0, on macOS and on Linux.</div>
<div class=""><br class="">
</div>
<div class="">At this moment I can still only speculate about the underlying issue that causes this… Will be back with more information later. :)</div>
<div class=""><br class="">
</div>
<div class="">Best</div>
<div class="">Peter</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 9 Aug 2021, at 18.24, Richard Wagner <<a href="mailto:wagnerrichard@ill.fr" class="">wagnerrichard@ill.fr</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">
<p class="">Hi Peter,</p>
<p class="">find enclosed my example of an instrument where the back-propagation fails.</p>
<p class="">The source is an MCPL_input component and I added a small mcpl-input file, too.<br class="">
The particles in the MCPL file all start at z=1.84m<br class="">
</p>
<p class="">Without gravitation back-propagation works, with gravitation it fails.
<br class="">
</p>
<p class="">Any ideas, what could cause such a behavior?<br class="">
</p>
<p class="">Best, <br class="">
</p>
<p class="">Richard<br class="">
</p>
<p class="">PS: The PSI_source instrument you enclosed works for me (== back-propagation with gravity turned on)<br class="">
</p>
<p class=""><br class="">
</p>
<div class="moz-cite-prefix">On 26/07/2021 16:58, Peter Kjær Willendrup wrote:<br class="">
</div>
<blockquote type="cite" cite="mid:1E57F302-67AA-4797-8FFE-D194AC9E0D68@fysik.dtu.dk" class="">
<div class="" style="word-wrap:break-word;
line-break:after-white-space">
Hi Richard,
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">I just came back from vacation and had a look at the issue you report. ALLOW_BACKPROP ought to work irrespective of the gravity setting in fact.</div>
<div class=""><br class="">
</div>
<div class="">I tried putting your snippet of code into the PSI_source instrument “behind” the source (see attached) - and I don’t seem to reproduce your finding? </div>
<div class=""><br class="">
</div>
<div class="">Could the issue potentially be specific to the instrument you are using it in? If you send me a copy (plus need inputfiles etc.) I will have a closer look.</div>
<div class=""><br class="">
</div>
<div class="">(Feel free to do this outside the mailinglist if you prefer. :) )</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Peter</div>
<div class=""><br class="">
</div>
</div>
<div class="" style="word-wrap:break-word;
line-break:after-white-space">
<div class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 18 Jul 2021, at 00.14, Richard Wagner <<a href="mailto:wagnerrichard@ill.fr" class="" moz-do-not-send="true">wagnerrichard@ill.fr</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class=""><span class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none; float:none;
display:inline!important">Dear
All,</span><br class="" style="font-family:Helvetica; font-size:12px;
font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<br class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<span class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none; float:none;
display:inline!important">I
have the following issue with a Shape Component in a simulation. It is used to filter neutrons that have not are not originating from the moderator window.</span><br class="" style="font-family:Helvetica; font-size:12px;
font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<font class="" style="font-size:12px; font-style:normal;
font-weight:normal; letter-spacing:normal;
text-align:start; text-indent:0px;
text-transform:none; white-space:normal;
word-spacing:0px; text-decoration:none" face="monospace"><br class="">
COMPONENT Mod_Face = Shape(xwidth=.30,yheight=.24)<br class="">
AT (0,0,0.16) RELATIVE ABSOLUTE<br class="">
EXTEND %{<br class="">
/* Propagate back to a small rectangle in front of moderator */<br class="">
printf("(before) x=%g y=%g z=%g\n", x, y, z);<br class="">
<span class="x_Apple-converted-space"> </span><br class="">
ALLOW_BACKPROP;<br class="">
PROP_Z0;<br class="">
SCATTER;<br class="">
<span class="x_Apple-converted-space"> </span><br class="">
printf("(after) x=%g y=%g z=%g\n", x, y, z); <span class="x_Apple-converted-space"> </span><br class="">
printf("(if) %d\n", (fabs(x)> xwidth/2 || fabs(y)> yheight/2));<br class="">
/* Remove neutrons that are not from around the moderators */<br class="">
if (fabs(x)> xwidth/2 || fabs(y)> yheight/2)<span class="x_Apple-converted-space"> </span><br class="">
{<br class="">
printf("(absorbed) x=%g y=%g z=%g\n", x, y, z); <span class="x_Apple-converted-space"> </span><br class="">
ABSORB; <span class="x_Apple-converted-space"> </span><br class="">
}<br class="">
%}</font><br class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<br class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<br class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<span class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none; float:none;
display:inline!important">If
I run the McStas simulation with the --gravitation flag the back propagation is not working.</span><br class="" style="font-family:Helvetica; font-size:12px;
font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<br class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<span class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none; float:none;
display:inline!important">Log
entries will exemplaryly read:</span><br class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<div class="" style="white-space:pre-wrap; font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; word-spacing:0px; text-decoration:none; margin:0px">
<span class="" style="color:rgb(0,128,0)">(if) 0</span></div>
<div class="" style="white-space:pre-wrap; font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; word-spacing:0px; text-decoration:none; margin:0px">
<span class="" style="color:rgb(0,128,0)">(before) x=0.131648 y=0.00568935 z=1.84</span></div>
<div class="" style="white-space:pre-wrap; font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; word-spacing:0px; text-decoration:none; margin:0px">
<span class="" style="color:rgb(0,128,0)">(after) x=0.131648 y=0.00568935 z=1.84</span></div>
<p class="" style="white-space:pre-wrap; font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; word-spacing:0px; text-decoration:none; margin:0px">
<span class="" style="color:rgb(0,128,0)"></span></p>
<span class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none; float:none;
display:inline!important">And
no neutrons will be filtered out</span><br class="" style="font-family:Helvetica; font-size:12px;
font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<br class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<span class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none; float:none;
display:inline!important">With
gravity set to 'off' I get:</span><br class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<br class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<div class="" style="white-space:pre-wrap; font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; word-spacing:0px; text-decoration:none; margin:0px">
<span class="" style="color:rgb(0,128,0)">(before) x=0.110096 y=0.118489 z=1.84</span></div>
<div class="" style="white-space:pre-wrap; font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; word-spacing:0px; text-decoration:none; margin:0px">
<span class="" style="color:rgb(0,128,0)">(after) x=-0.118996 y=-0.00294855 z=0</span></div>
<div class="" style="white-space:pre-wrap; font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; word-spacing:0px; text-decoration:none; margin:0px">
<span class="" style="color:rgb(0,128,0)">(if) 0</span></div>
<div class="" style="white-space:pre-wrap; font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; word-spacing:0px; text-decoration:none; margin:0px">
<span class="" style="color:rgb(0,128,0)">(before) x=-0.0518426 y=-0.0952835 z=1.84</span></div>
<div class="" style="white-space:pre-wrap; font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; word-spacing:0px; text-decoration:none; margin:0px">
<span class="" style="color:rgb(0,128,0)">(after) x=0.519784 y=-0.514964 z=0</span></div>
<div class="" style="white-space:pre-wrap; font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; word-spacing:0px; text-decoration:none; margin:0px">
<span class="" style="color:rgb(0,128,0)">(if) 1</span></div>
<div class="" style="white-space:pre-wrap; font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; word-spacing:0px; text-decoration:none; margin:0px">
<span class="" style="color:rgb(0,128,0)">(absorbed) x=0.519784 y=-0.514964 z=0</span></div>
<br class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<span class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none; float:none;
display:inline!important">So
it works as intended.</span><br class="" style="font-family:Helvetica; font-size:12px;
font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<br class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<span class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none; float:none;
display:inline!important">Is
this behavior as expected? Or differently is backprop not working with gravity turned on?</span><br class="" style="font-family:Helvetica; font-size:12px;
font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<span class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none; float:none;
display:inline!important">I
use McStas 2.7 and need to make the simulation with gravity.</span><br class="" style="font-family:Helvetica; font-size:12px;
font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<br class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<span class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none; float:none;
display:inline!important">Any
ideas?</span><br class="" style="font-family:Helvetica; font-size:12px;
font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<br class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<span class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none; float:none;
display:inline!important">Best,</span><br class="" style="font-family:Helvetica; font-size:12px;
font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<br class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<span class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none; float:none;
display:inline!important">Richard</span><br class="" style="font-family:Helvetica; font-size:12px;
font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<br class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<div class="x_moz-signature" style="font-family:Helvetica; font-size:12px;
font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
--<span class="x_Apple-converted-space"> </span><br class="">
<b class="">Richard Wagner</b><br class="">
Research Engineer<br class="">
Nuclear and Particle Physics Group<br class="">
Institut Laue-Langevin - ILL<br class="">
71, avenue des Martyrs<br class="">
CS 20156<br class="">
38042 Grenoble Cedex 9<br class="">
France<span class="x_Apple-converted-space"> </span><br class="">
<br class="">
<a href="" class="" moz-do-not-send="true"><font class="" color="#3984c6">www.ill.eu</font></a>
<div class="" style="white-space:pre-wrap"></div>
</div>
<span class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none; float:none;
display:inline!important">_______________________________________________</span><br class="" style="font-family:Helvetica; font-size:12px;
font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<span class="" style="font-family:Helvetica;
font-size:12px; font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none; float:none;
display:inline!important">mcstas-users
mailing list</span><br class="" style="font-family:Helvetica; font-size:12px;
font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<a href="mailto:mcstas-users@mcstas.org" class="" style="font-family:Helvetica; font-size:12px;
font-style:normal; font-weight:normal;
letter-spacing:normal; orphans:auto; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; widows:auto; word-spacing:0px" moz-do-not-send="true">mcstas-users@mcstas.org</a><br class="" style="font-family:Helvetica; font-size:12px;
font-style:normal; font-weight:normal;
letter-spacing:normal; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; word-spacing:0px;
text-decoration:none">
<a href="https://mailman2.mcstas.org/mailman/listinfo/mcstas-users" class="" style="font-family:Helvetica; font-size:12px;
font-style:normal; font-weight:normal;
letter-spacing:normal; orphans:auto; text-align:start;
text-indent:0px; text-transform:none;
white-space:normal; widows:auto; word-spacing:0px" moz-do-not-send="true">https://mailman2.mcstas.org/mailman/listinfo/mcstas-users</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</blockquote>
<div class="moz-signature">-- <br class="">
<b class="">Richard Wagner</b><br class="">
Research Engineer<br class="">
Nuclear and Particle Physics Group<br class="">
Institut Laue-Langevin - ILL<br class="">
71, avenue des Martyrs<br class="">
CS 20156<br class="">
38042 Grenoble Cedex 9<br class="">
France <br class="">
<br class="">
<a href="x-msg://8/www.ill.eu" class=""><font color="#3984c6" class="">www.ill.eu</font></a>
<p class=""><br class="">
</p>
</div>
</div>
<span id="cid:6CB1F130-6ED3-4A06-8A5A-452C2F301E18"><Test_MCPL_input_testbackprop.instr></span><span id="cid:AC85D87D-F0C2-4F36-B64D-218AB1412046"><out_first_1000.mcpl.gz></span></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>