<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="">
Dear Peter & Erik,
<div class=""><br class="">
</div>
<div class="">Thanks so much for the confirmation that it can be done and the ‘how to’.</div>
<div class="">I am determined to try it at some point I am taking your implicit</div>
<div class="">warnings serious :-)</div>
<div class="">I also have to look into how my fully loaded mpi-cluster would deal with </div>
<div class="">reading the intermediary neutron source simultaneously from</div>
<div class="">many processors… maybe a RAM disk on each node would work…</div>
<div class=""><br class="">
</div>
<div class="">Thanks again, </div>
<div class="">
<div class=""><br class="">
</div>
<div class="">Uli</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">[I sent that again because I didn’t to mcstas-user!]</div>
<div class=""><br class="">
</div>
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 11 Jul 2019, at 03:17, Peter Kjær Willendrup <<a href="mailto:pkwi@fysik.dtu.dk" class="">pkwi@fysik.dtu.dk</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Uli,
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Erik managed to beat me to it! :-)</div>
<div class=""><br class="">
</div>
<div class="">I would do more or less the same:</div>
<div class=""><br class="">
</div>
<div class="">1) SPLIT by a bigger amounts, e.g. samples * 10 (samples already allow SPLITS, and now you have a N of these)</div>
<div class=""><br class="">
</div>
<div class="">2) partition the interval [0 1] corresponding to the number of samples and then rand01() in an EXTEND to randomly choose between them using a WHEN on each</div>
<div class=""><br class="">
</div>
<div class="">3) One thing to remember: </div>
<div class=""><span class="Apple-tab-span" style="white-space:pre"></span>If getting the intensity “right” i.e. the same as what you would get running each sample alone, I would then do a p *= nsamples; in an EXTEND.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Cheers,</div>
<div class=""><br class="">
</div>
<div class="">Peter</div>
<div class=""><br class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 11 Jul 2019, at 08.58, Erik B Knudsen <<a href="mailto:erkn@fysik.dtu.dk" class="">erkn@fysik.dtu.dk</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Dear Uli,<br class="">
<br class="">
It can be done if that is what you _really_ want to do, but I would not<br class="">
recommend it. The solution would be more complicated and likely error<br class="">
prone than using an intermediary MCPL-file. Also - you would have<br class="">
rewrite less of the instrument file that way.<br class="">
<br class="">
If you really want to do this here's a pseudocode solution for two<br class="">
samples that you could easily extend to more:<br class="">
You'd have to also set parameters for samples and decalre the variable<br class="">
samplec - but you knew that :-).<br class="">
<br class="">
<snip><br class="">
COMPONENT a0 = Arm()<br class="">
AT(0,0,0) RELATIVE something<br class="">
EXTEND<br class="">
%{<br class="">
samplec==0<br class="">
<br class="">
%}<br class="">
<br class="">
SPLIT 2 COMPONENT a1 = Arm()<br class="">
AT(0,0,0) RELATIVE a0<br class="">
EXTEND<br class="">
%{<br class="">
samplec++;<br class="">
%}<br class="">
<br class="">
<br class="">
COMPONENT sans1 = Sans_SAMPLE(x=X,...)<br class="">
WHEN (samplec==1) AT(0,0,0) RELATIVE a1<br class="">
<br class="">
COMPONENT sans2 = Sans_SAMPLE(y=Y,...)<br class="">
WHEN sample==2) AT(0,0,0) RELATIVE a1<br class="">
<br class="">
<br class="">
COMPONENT det1 = PSD_monitor(filename="file1")<br class="">
WHEN(samplec==1) AT(0,0,L) RELATIVE a1<br class="">
<br class="">
COMPONENT det2 = COPY(det1)(filename="file2")<br class="">
WHEN(samplec==2) AT(0,0,L) RELATIVE a2<br class="">
<snip><br class="">
<br class="">
<br class="">
cheers<br class="">
Erik<br class="">
<br class="">
On 10/07/2019 21:33, Wildgruber, Christoph U. wrote:<br class="">
<blockquote type="cite" class="">Hi, <br class="">
<br class="">
I read the manual and somehow I think it could be done but I could not <br class="">
figure out how…<br class="">
<br class="">
So here is what I want to do:<br class="">
<br class="">
I have SANS instrument and want to compare it’s neutron optical performance<br class="">
for several pairs of sample models. To avoid using virtual sources and minimize the
<br class="">
overall runtime I thought it might be possible to have a loop or something equivalent which<br class="">
runs the sample & detector part of the instrument multiple times for the same neutrons<br class="">
arriving at the sample position with a different scattering model.<br class="">
All other parameters in the sample are the same.<br class="">
<br class="">
Any suggestions?<br class="">
<br class="">
Thanks,<br class="">
<br class="">
Uli<br class="">
<br class="">
_______________________________________________<br class="">
mcstas-users mailing list<br class="">
<a href="mailto:mcstas-users@mcstas.org" class="">mcstas-users@mcstas.org</a><br class="">
<a href="https://mailman2.mcstas.org/mailman/listinfo/mcstas-users" class="">https://mailman2.mcstas.org/mailman/listinfo/mcstas-users</a><br class="">
<br class="">
</blockquote>
<br class="">
-- <br class="">
Erik Bergbäck Knudsen, Research Engineer | DTU | morituri<br class="">
NEXMAP, DTU Fysik, DK-2800 Kgs. Lyngby, Denmark |<>-<>| te<br class="">
phone: (+45) 2132 6655 |<>-<>| salutant<br class="">
_______________________________________________<br class="">
mcstas-users mailing list<br class="">
<a href="mailto:mcstas-users@mcstas.org" class="">mcstas-users@mcstas.org</a><br class="">
<a href="https://mailman2.mcstas.org/mailman/listinfo/mcstas-users" class="">https://mailman2.mcstas.org/mailman/listinfo/mcstas-users</a><br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
<div class="">
<div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<br class="">
Peter Kjær Willendrup<br class="">
Forskningsingeniør, Specialkonsulent<br class="">
Næstformand for DTU Fysik LSU<br class="">
<br class="">
DTU Physics<br class="">
<br class="">
</div>
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class="Apple-interchange-newline">
<span class=""><span id="cid:b6339554-7f28-441d-9f31-5944f811397c@win.dtu.dk"><image001.gif></span></span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Technical
University of Denmark</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span class=""><span id="cid:e108e480-fcab-46e2-9531-b38165079572@win.dtu.dk"><image002.gif></span></span><br class="Apple-interchange-newline">
<br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Department
of Physics</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Fysikvej</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Building
307</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">DK-2800
Kongens Lyngby</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Direct
+45 2125 4612</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Mobil
+45 2125 4612</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Fax
+45 4593 2399</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""><a href="mailto:pkwi@fysik.dtu.dk" class="">pkwi@fysik.dtu.dk</a></span>
</span></span></div>
<br class="">
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</body>
</html>