From granrothge at ornl.gov Mon Apr 27 20:43:13 2015 From: granrothge at ornl.gov (Granroth, Garrett E.) Date: Mon, 27 Apr 2015 18:43:13 +0000 Subject: [mcstas-users] isotropic sqw and focusing? Message-ID: <10D3A4F8-6333-428A-890D-33365A502FFD@ornl.gov> Hi All, Does isotropicsqw have the ability to focus onto a detector like several of the other components do? I tried the target_x,target_y,target_z parameters and that is not the correct syntax. I?m running mcstas2.1-5414 Thanks, Garrett Garrett E. Granroth Scientific Data Analysis Group Leader Neutron Data Analysis and Visualization Division Oak Ridge National Laboratory P.O. Box 2008 MS 6475 Oak Ridge TN 37831 Tel: 865-805-0631 Fax: 865-574-6080 email:granrothge at ornl.gov From pkwi at fysik.dtu.dk Mon Apr 27 20:50:05 2015 From: pkwi at fysik.dtu.dk (=?Windows-1252?Q?Peter_Kj=E6r_Willendrup?=) Date: Mon, 27 Apr 2015 18:50:05 +0000 Subject: [mcstas-users] isotropic sqw and focusing? In-Reply-To: <10D3A4F8-6333-428A-890D-33365A502FFD@ornl.gov> References: <10D3A4F8-6333-428A-890D-33365A502FFD@ornl.gov> Message-ID: Hi Garrett, On 27 Apr 2015, at 20:43 , Granroth, Garrett E. > wrote: Does isotropicsqw have the ability to focus onto a detector like several of the other components do? I tried the target_x,target_y,target_z parameters and that is not the correct syntax. I?m running mcstas2.1-5414 The only focusing option available with Isotropic_Sqw (and btw. also PowderN) is the d_phi which limits scattering to an angular band around the scattering plane. - And this only works in a meaningful way if combined with order=1, i.e. with single scattering only. Best, Peter Peter Kj?r Willendrup Senior Research Engineer, Special Advisor DTU Physics Technical University of Denmark [cid:image002.gif at 01CCCAF1.5E6331F0] Department of Physics Fysikvej Building 307 DK-2800 Kongens Lyngby Direct +45 2125 4612 Mobil +45 2125 4612 Fax +45 4593 2399 pkwi at fysik.dtu.dk -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 58 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 1055 bytes Desc: image002.gif URL: From wokaoyan1981 at 126.com Wed May 20 10:31:30 2015 From: wokaoyan1981 at 126.com (=?GBK?B?s8LR5dbb?=) Date: Wed, 20 May 2015 16:31:30 +0800 (CST) Subject: [mcstas-users] PowderN nesting issue Message-ID: Hi all, There are five materials A, B, C, D and E to be nested together. A, B, C and D are hollow cylinders while E is solid cylinder inside. To model the combination, I write the following simulation code. COMPONENT A = PowderN (?, concentric=1); COMPONENT B = PowderN (?, concentric=1); COMPONENT C = PowderN (?, concentric=1); COMPONENT D = PowderN (?, concentric=1); COMPONENT E = PowderN (?, concentric=1); COMPONENT A2=COPY(A) (concentric=0); Is the code correct? If not, would you please point out? Best wishes, Tom. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkwi at fysik.dtu.dk Fri May 22 08:22:28 2015 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Fri, 22 May 2015 06:22:28 +0000 Subject: [mcstas-users] PowderN nesting issue In-Reply-To: References: Message-ID: Dear Tom, Assuming that the component ?shells? geometrically fit inside each other, what you write starts to look OK, however: a) The innermost solid cylinder of material E should have concentric=0 b) You should have copies of D, C, B and A in the opposite order of the ?incoming? side, all with concentric=0, that is COMPONENT A = PowderN (?, concentric=1); COMPONENT B = PowderN (?, concentric=1); COMPONENT C = PowderN (?, concentric=1); COMPONENT D = PowderN (?, concentric=1); COMPONENT E = PowderN (?, concentric=0); COMPONENT D2 = COPY(D)(?, concentric=0); COMPONENT C2 = COPY(C)(?, concentric=0); COMPONENT B2 = COPY(B)(?, concentric=0); COMPONENT A2 = COPY(A)(?, concentric=0); Further, to ensure that you have statistics to scatter on the inner ?shells?, p_transmit needs to be "sufficiently high? - you will have to experiement a little there? Note that I am currently on a 3 month paternity leave, so you will have to get further input from others? :-) Best, Peter On 20 May 2015, at 10:31 , ??? > wrote: Hi all, There are five materials A, B, C, D and E to be nested together. A, B, C and D are hollow cylinders while E is solid cylinder inside. To model the combination, I write the following simulation code. COMPONENT A = PowderN (?, concentric=1); COMPONENT B = PowderN (?, concentric=1); COMPONENT C = PowderN (?, concentric=1); COMPONENT D = PowderN (?, concentric=1); COMPONENT E = PowderN (?, concentric=1); COMPONENT A2=COPY(A) (concentric=0); Is the code correct? If not, would you please point out? Best wishes, Tom. _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkwi at fysik.dtu.dk Wed May 27 17:06:18 2015 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Wed, 27 May 2015 15:06:18 +0000 Subject: [mcstas-users] McStas 2.2 released! Message-ID: <4430E27B-8D9A-4E29-B2D3-FF50B090F13D@fysik.dtu.dk> Dear all, McStas 2.2 has been released and is ready for download via http://downloads.mcstas.org/mcstas-2.2 Selected, important highligts from the release are: ? General: ? The new component/instrument keyword DEPENDENCY allows to automatically compile instruments with external libraries. ? The Mantid-IDF generation through our Perl mcdisplay tool has been optimized. ? Bugfix: The use of WHEN with EXTEND code only considered the first statement (report by M. Appel) ? Infrastructure: ? McStas (and its X-ray counterpart McXtrace) are now on GitHub, see https://github.com/McStasMcXtrace/McCode ? We will continually provide various bits of "missing information" on the related Wiki at https://github.com/McStasMcXtrace/McCode/wiki ? Components: ? A new model for the ESS butterfly moderator - see documentation for the ESS_moderator.comp. Developed by Peter Willendrup in close collaboration with Troels Schoenfeldt DTU Nutech/ESS. ** A separate document with recommended settings for this component will be released later, also a version backported to McStas 1.12c. ** ? The Isotropic_Sqw component was broken in McStas 2.1. The expected behaviour has been restored. Users of this component should upgrade to McStas 2.2 asap. Sorry for the inconvenience. ? Instruments: ? ILL_IN13 backscattering instrument contributed by Emmanuel Farhi ? ILL_IN4 tof instrument contributed by Emmanuel Farhi ? Datafiles: ? Improved water Sqw data files contributed by Emmanuel Farhi (- see also JNST 52 (2015) 844 ) ? Added CaF2 crystal, improved Al2O3 sapphire transmission ? Tools: ? McStas 2.2 is the first release to include a first version of our new mcgui-py tool, based on Python, QT and Scintilla. We think it is a very nice start at this long-awaited replacement of mcgui (Perl) and want you to try it out even though a few edges may still be rough here and there. For installation instructions, see the README's included with the installation packages. ? McStas 2.2 further includes a simple mcplot plotter for Unix platforms (Linux, OS X) based solely on shell-script + Matlab/iFit/Octave, no need for Perl or Python with this plotter, called mcplot-matlab Greetings from the McStas team - hope you will enjoy this new release! :-) Peter Willendrup Peter Kj?r Willendrup Senior Research Engineer, Special Advisor DTU Physics Technical University of Denmark [cid:image002.gif at 01CCCAF1.5E6331F0] Department of Physics Fysikvej Building 307 DK-2800 Kongens Lyngby Direct +45 2125 4612 Mobil +45 2125 4612 Fax +45 4593 2399 pkwi at fysik.dtu.dk -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 58 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 1055 bytes Desc: image002.gif URL: From pkwi at fysik.dtu.dk Fri May 29 08:27:45 2015 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Fri, 29 May 2015 06:27:45 +0000 Subject: [mcstas-users] McStas 2.2 released! In-Reply-To: <4430E27B-8D9A-4E29-B2D3-FF50B090F13D@fysik.dtu.dk> References: <4430E27B-8D9A-4E29-B2D3-FF50B090F13D@fysik.dtu.dk> Message-ID: <2797D3F7-9524-4ED2-B996-914E08076BAC@fysik.dtu.dk> Dear all, We have unfortunately discovered a serious bug in random number generation in the newly released McStas 2.2. A patched replacement-release will be released either today or early next week. Sorry for the inconvenience this may have caused you. Best regards, Peter Willendrup Peter Kj?r Willendrup Senior Research Engineer, Special Advisor DTU Physics Technical University of Denmark [cid:image002.gif at 01CCCAF1.5E6331F0] Department of Physics Fysikvej Building 307 DK-2800 Kongens Lyngby Direct +45 2125 4612 Mobil +45 2125 4612 Fax +45 4593 2399 pkwi at fysik.dtu.dk On 27 May 2015, at 17:06 , Peter Kj?r Willendrup > wrote: Dear all, McStas 2.2 has been released and is ready for download via http://downloads.mcstas.org/mcstas-2.2 Selected, important highligts from the release are: ? General: ? The new component/instrument keyword DEPENDENCY allows to automatically compile instruments with external libraries. ? The Mantid-IDF generation through our Perl mcdisplay tool has been optimized. ? Bugfix: The use of WHEN with EXTEND code only considered the first statement (report by M. Appel) ? Infrastructure: ? McStas (and its X-ray counterpart McXtrace) are now on GitHub, see https://github.com/McStasMcXtrace/McCode ? We will continually provide various bits of "missing information" on the related Wiki at https://github.com/McStasMcXtrace/McCode/wiki ? Components: ? A new model for the ESS butterfly moderator - see documentation for the ESS_moderator.comp. Developed by Peter Willendrup in close collaboration with Troels Schoenfeldt DTU Nutech/ESS. ** A separate document with recommended settings for this component will be released later, also a version backported to McStas 1.12c. ** ? The Isotropic_Sqw component was broken in McStas 2.1. The expected behaviour has been restored. Users of this component should upgrade to McStas 2.2 asap. Sorry for the inconvenience. ? Instruments: ? ILL_IN13 backscattering instrument contributed by Emmanuel Farhi ? ILL_IN4 tof instrument contributed by Emmanuel Farhi ? Datafiles: ? Improved water Sqw data files contributed by Emmanuel Farhi (- see also JNST 52 (2015) 844 ) ? Added CaF2 crystal, improved Al2O3 sapphire transmission ? Tools: ? McStas 2.2 is the first release to include a first version of our new mcgui-py tool, based on Python, QT and Scintilla. We think it is a very nice start at this long-awaited replacement of mcgui (Perl) and want you to try it out even though a few edges may still be rough here and there. For installation instructions, see the README's included with the installation packages. ? McStas 2.2 further includes a simple mcplot plotter for Unix platforms (Linux, OS X) based solely on shell-script + Matlab/iFit/Octave, no need for Perl or Python with this plotter, called mcplot-matlab Greetings from the McStas team - hope you will enjoy this new release! :-) Peter Willendrup Peter Kj?r Willendrup Senior Research Engineer, Special Advisor DTU Physics Technical University of Denmark Department of Physics Fysikvej Building 307 DK-2800 Kongens Lyngby Direct +45 2125 4612 Mobil +45 2125 4612 Fax +45 4593 2399 pkwi at fysik.dtu.dk -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 58 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 1055 bytes Desc: image002.gif URL: From robert.dalgliesh at stfc.ac.uk Fri May 29 10:17:55 2015 From: robert.dalgliesh at stfc.ac.uk (robert.dalgliesh at stfc.ac.uk) Date: Fri, 29 May 2015 08:17:55 +0000 Subject: [mcstas-users] Mcstas-Mantid interaction Message-ID: <9FD256ED3764AA40BD335311A4123FA0458D1AC5@EXCHMBX03.fed.cclrc.ac.uk> As a test, I've just used mcstas to simulate a very simple reflectometer with these components and created mantid nexus output ISIS Source Slit Slit monitor Sample Detector On reading into mantid the wavelength calculation seems to work fine but the calculation of momentum transfer seems to go wrong. I've checked that the q overlaps from the sample do what I expect by doing the conversion by hand so the simulation appears to be correct. That leaves and error in the instrument definition and how theta and l2 are calculated. Who is looking after this part of the interaction? Do I need to talk to someone from the Mantid team or McStas. Thanks Rob -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkwi at fysik.dtu.dk Fri May 29 14:16:35 2015 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Fri, 29 May 2015 12:16:35 +0000 Subject: [mcstas-users] Freshly built McStas 2.2a released Message-ID: Dear all, The bug reported earlier today related to the initialization of our random number generator was in fact not as severe as first anticipated: Using a seed of 0 - which is the default in McStas and means using the clock as random number seed, instead implicitly indeed set the seed to 0 always. This meant that to generate two simulations with statistically different output, one would have had to set the seed explicitly to two different values in the two cases. In any case, the bug has now been fixed in the newly released McStas 2.2a, which is available for all platforms at http://downloads.mcstas.org/mcstas-2.2 It further seems we have an issue with our "umbrella"-metapackage (called mcstas-suite) for both Debian and RPM systems. The solution is to explicitly install the mcstas-suite-perl and/or mcstas-suite-python packages. Best regards, Peter Willendrup Peter Kj?r Willendrup Senior Research Engineer, Special Advisor DTU Physics Technical University of Denmark [cid:image002.gif at 01CCCAF1.5E6331F0] Department of Physics Fysikvej Building 307 DK-2800 Kongens Lyngby Direct +45 2125 4612 Mobil +45 2125 4612 Fax +45 4593 2399 pkwi at fysik.dtu.dk -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 58 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 1055 bytes Desc: image002.gif URL: From 104pet104 at gmail.com Sun Jun 7 10:42:05 2015 From: 104pet104 at gmail.com (=?UTF-8?B?0J/QtdGC0YAg0JrQvtC90LjQug==?=) Date: Sun, 7 Jun 2015 12:42:05 +0400 Subject: [mcstas-users] Twisted guide simulations Message-ID: Dear McStas colleagues, I try to simulate twisted neutron guide (as RefSANS at FRM-II). I've made it of number of straight section rotated relative common axis, but that gives me significantly lower flux than expected. Is there any natural route to model that guide in McStas? Best regards, Peter Konik From lefmann at nbi.ku.dk Sun Jun 7 17:20:27 2015 From: lefmann at nbi.ku.dk (Kim Lefmann) Date: Sun, 7 Jun 2015 17:20:27 +0200 Subject: [mcstas-users] Twisted guide simulations In-Reply-To: References: Message-ID: <5574613B.7040209@nbi.ku.dk> Dear Peter, I simulated a very long curved guide recently, using piecewise straight segments. I realized that I had propagating uncertainties that blew up divergence and hence reduced intensity down the guide. While I believe this is a correct physical effect (after some thought), I found that to emulate a continuously curved guide I had to go to ridiculously short guide pieces, like 2-5 cm. Then, intensity was conserved... Perhaps this works for you? best, Kim On 06/07/2015 10:42 AM, ???? ????? wrote: > Dear McStas colleagues, > > I try to simulate twisted neutron guide (as RefSANS at FRM-II). I've made > it of number of straight section rotated relative common axis, but > that gives me significantly lower flux than expected. Is there any > natural route to model that guide in McStas? > > Best regards, > Peter Konik > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From Peter.Link at frm2.tum.de Mon Jun 8 09:25:58 2015 From: Peter.Link at frm2.tum.de (Peter Link) Date: Mon, 08 Jun 2015 09:25:58 +0200 Subject: [mcstas-users] Twisted guide simulations In-Reply-To: <5574613B.7040209@nbi.ku.dk> References: <5574613B.7040209@nbi.ku.dk> Message-ID: <55754386.5050801@frm2.tum.de> Dear Peter and Kim, since REFSANS at FRMII falls under my regime I had several times thought of this problem. To my opinion and tests a segmentation into piecewise straight elements with whatever Guide_xx component does not give the correct result. One way could be to use Guide_anyshape from Emmanuel. I have not tested this, but I think its worth a try. Best regards, Peter Am 07.06.2015 um 17:20 schrieb Kim Lefmann: > Dear Peter, > > I simulated a very long curved guide recently, using piecewise straight > segments. I realized that I had propagating uncertainties that blew up > divergence and hence reduced intensity down the guide. While I believe > this is a correct physical effect (after some thought), I found that to > emulate a continuously curved guide I had to go to ridiculously short > guide pieces, like 2-5 cm. Then, intensity was conserved... Perhaps this > works for you? > > best, Kim > > > On 06/07/2015 10:42 AM, ???? ????? wrote: >> Dear McStas colleagues, >> >> I try to simulate twisted neutron guide (as RefSANS at FRM-II). I've made >> it of number of straight section rotated relative common axis, but >> that gives me significantly lower flux than expected. Is there any >> natural route to model that guide in McStas? >> >> Best regards, >> Peter Konik >> _______________________________________________ >> mcstas-users mailing list >> mcstas-users at mcstas.org >> http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users > > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users -- Dr. Peter Link Leiter Neutronenoptik Forschungs-Neutronenquelle Heinz Maier-Leibnitz Technische Universit?t M?nchen Lichtenbergstr. 1 85747 Garching From Jean-Francois.Moulin at hzg.de Mon Jun 8 11:11:36 2015 From: Jean-Francois.Moulin at hzg.de (Jean-Francois.Moulin at hzg.de) Date: Mon, 8 Jun 2015 11:11:36 +0200 Subject: [mcstas-users] Antwort: Re: Twisted guide simulations In-Reply-To: <55754386.5050801@frm2.tum.de> References: <55754386.5050801@frm2.tum.de>, <5574613B.7040209@nbi.ku.dk> Message-ID: Dear Peter, Peter, Kim and all others, I discussed the problem a long time ago with Emmanuel, he even helped me starting to write a special component which would describe our twisted guide (at refsans a full 90 degree twist of the guide is used to go from vertical to horizontal beam) taking gravity into account. The prototype code did not work -yet- however. I also looked into writing the exact solution for the problem but that required very intensive numerical calculation and was clearly not a viable option. Using guide anyshape and the description of the surface with *many* polygons proved also non trivial (I do not remember exactly what the problem was, I think the full 90 degrees rotation brought some funky effects in the description of the normal). Moreover if I remember correctly gravity might be a problem with this component. So, this project unfortunately never came to completion... it stays on my todo list though and I would be happy to read about your opinion/ideas. I'll dig into archives to find the code for the component (which I remember we called twist_again, a sure sign of Emmanuel's touch ;0) Best JF - Helmholtz Zentrum Geesthacht Institut f?r Werkstoffforschung Abteilung WPN, Instrument REFSANS Lichtenbergstr. 1 85747 Garching FRM II Tel.: +49 (0)89 289 10762 Internet: http://www.frm2.tum.de -----"mcstas-users" schrieb: ----- An: mcstas-users at mcstas.org Von: Peter Link Gesendet von: "mcstas-users" Datum: 08.06.2015 09:26 Betreff: Re: [mcstas-users] Twisted guide simulations Dear Peter and Kim, since REFSANS at FRMII falls under my regime I had several times thought of this problem. To my opinion and tests a segmentation into piecewise straight elements with whatever Guide_xx component does not give the correct result. One way could be to use Guide_anyshape from Emmanuel. I have not tested this, but I think its worth a try. Best regards, Peter Am 07.06.2015 um 17:20 schrieb Kim Lefmann: > Dear Peter, > > I simulated a very long curved guide recently, using piecewise straight > segments. I realized that I had propagating uncertainties that blew up > divergence and hence reduced intensity down the guide. While I believe > this is a correct physical effect (after some thought), I found that to > emulate a continuously curved guide I had to go to ridiculously short > guide pieces, like 2-5 cm. Then, intensity was conserved... Perhaps this > works for you? > > best, Kim > > > ?On 06/07/2015 10:42 AM, Петр Коник wrote: >> Dear McStas colleagues, >> >> I try to simulate twisted neutron guide (as RefSANS at FRM-II). I've made >> it of number of straight section rotated relative common axis, but >> that gives me significantly lower flux than expected. Is there any >> natural route to model that guide in McStas? >> >> Best regards, >> Peter Konik >> _______________________________________________ >> mcstas-users mailing list >> mcstas-users at mcstas.org >> http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users > > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users -- Dr. Peter Link Leiter Neutronenoptik Forschungs-Neutronenquelle Heinz Maier-Leibnitz Technische Universit?t M?nchen Lichtenbergstr. 1 85747 Garching _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users Helmholtz-Zentrum Geesthacht Zentrum f?r Material- und K?stenforschung GmbH Max-Planck-Stra?e 1 I 21502 Geesthacht I Deutschland/Germany Gesch?ftsf?hrer/Board of Management: Prof. Dr. Wolfgang Kaysser, Dipl.-Ing. Michael Gan? Vorsitzender des Aufsichtsrates/Chairman of the Supervisory Board: MinDirig Wilfried Kraus Amtsgericht L?beck HRB 285 GE (Register Court) Internet: http://www.hzg.de From jesuspedrodevicente at gmail.com Thu Jun 11 19:29:23 2015 From: jesuspedrodevicente at gmail.com (=?UTF-8?Q?Jes=C3=BAs_P=2E_de_Vicente?=) Date: Thu, 11 Jun 2015 19:29:23 +0200 Subject: [mcstas-users] WHEN and EXTEND card Message-ID: Dear McStas team, I would like to ask you if the EXTEND card is executed independently if the WHEN card is true or false. Thank you very much. Kind regards *Jes?s P. de Vicente.-* -------------- next part -------------- An HTML attachment was scrubbed... URL: From masolomaster3000 at googlemail.com Thu Jun 11 19:43:11 2015 From: masolomaster3000 at googlemail.com (Markus Appel) Date: Thu, 11 Jun 2015 19:43:11 +0200 Subject: [mcstas-users] WHEN and EXTEND card In-Reply-To: References: Message-ID: <5579C8AF.6020508@googlemail.com> Hi Jes?s, the EXTEND block should only be executed if WHEN is true, but there was a bug in Mcstas <= 2.1 which only applied the WHEN condition to the first line of the EXTEND block and always executed the remaining lines. You can either upgrade to Mcstas 2.2a, or use an additional set of braces in the EXTEND block as work-around in older versions, like this: COMPONENT something = ...() WHEN (...) AT ... EXTEND %{ { do_something(); do_something_else(); ... ; } } Cheers, Markus On 06/11/2015 07:29 PM, Jes?s P. de Vicente wrote: > Dear McStas team, > > I would like to ask you if the EXTEND card is executed > independently if the WHEN card is true or false. > > Thank you very much. Kind regards > > *Jes?s P. de Vicente.-* > > > _______________________________________________ mcstas-users > mailing list mcstas-users at mcstas.org > http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users > From pascale.deen at esss.se Thu Jun 11 15:27:11 2015 From: pascale.deen at esss.se (Pascale Deen) Date: Thu, 11 Jun 2015 13:27:11 +0000 Subject: [mcstas-users] McStas component ESS_moderator Message-ID: <9338BDFE-B81A-42D5-A2E5-26775BC3BDD3@esss.se> Hello, I am trying to run the moderator component COMPONENT ESS_Source = ESS_moderator( isleft = 0.9, Lmin = 0.5, Lmax = 10, cold_frac = 0.5, dist = 2, focus_xw = 0.2, focus_yh = 0.2, yheight_c = 0.03, yheight_t = 0.03, n_pulses = 1, beamport_angle = 5, sourcedef = "2015", extraction_opening = 120) AT (0, 0, -0.1) RELATIVE Origin but I get the following warnings: /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:409:1: warning: control reaches end of non-void function [-Wreturn-type] } /* end of ESS_Mezei_cold_2012 */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:517:1: warning: control reaches end of non-void function [-Wreturn-type] } /* end of ESS_Mezei_cold */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:622:1: warning: control reaches end of non-void function [-Wreturn-type] } /* end of ESS_Mezei_thermal */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:639:1: warning: control reaches end of non-void function [-Wreturn-type] } /* end of ESS_2012_Lieutenant_cold */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:693:1: warning: control may reach end of non-void function [-Wreturn-type] } /* end of ESS_2013_Schoenfeldt_cold */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:719:1: warning: control may reach end of non-void function [-Wreturn-type] } /* end of ESS_2014_Schoenfeldt_cold */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:851:1: warning: control may reach end of non-void function [-Wreturn-type] } /* end of ESS_2013_Schoenfeldt_thermal */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:871:1: warning: control may reach end of non-void function [-Wreturn-type] } /* end of ESS_2014_Schoenfeldt_thermal */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:894:1: warning: control may reach end of non-void function [-Wreturn-type] } /* end of ESS_2015_Schoenfeldt_thermal */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:922:1: warning: control may reach end of non-void function [-Wreturn-type] } /* end of ESS_2015_Schoenfeldt_cold */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:959:17: warning: expression result unused [-Wunused-value] if(i==0)par3-14.27; ~~~~^~~~~~ 11 warnings generated. ---------------------------------------------------- Pascale Deen Instrument Scientist - Chopper Spectrometry European Spallation Source ESS AB P.O Box 176, SE-221 00 Lund, Sweden Visiting address: Tunav?gen 24 Lund Adjunct Associate Professor Niels Bohr Institute University of Copenhagen Mobile: +46 721 792 079 Phone: +46 46 888 3079 E-mail: pascale.deen at esss.se www.esss.se The European Spallation Source is a Partnership of 16 European Nations committed to the goal of collectively building and operating the world's leading facility for research using neutrons by the second quarter of the 21st Century -------------- next part -------------- An HTML attachment was scrubbed... URL: From jesuspedrodevicente at gmail.com Fri Jun 12 11:00:38 2015 From: jesuspedrodevicente at gmail.com (=?UTF-8?Q?Jes=C3=BAs_P=2E_de_Vicente?=) Date: Fri, 12 Jun 2015 11:00:38 +0200 Subject: [mcstas-users] mcstas-users Digest, Vol 40, Issue 3 In-Reply-To: References: Message-ID: Thank you very much Markus, I will use your solution. Regards *Jes?s P. de Vicente.-* 2015-06-12 10:01 GMT+02:00 : > Send mcstas-users mailing list submissions to > mcstas-users at mcstas.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users > or, via email, send a message with subject or body 'help' to > mcstas-users-request at mcstas.org > > You can reach the person managing the list at > mcstas-users-owner at mcstas.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of mcstas-users digest..." > > > Today's Topics: > > 1. WHEN and EXTEND card (Jes?s P. de Vicente) > 2. Re: WHEN and EXTEND card (Markus Appel) > 3. McStas component ESS_moderator (Pascale Deen) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 11 Jun 2015 19:29:23 +0200 > From: Jes?s P. de Vicente > To: "mcstas-users at mcstas.org" > Subject: [mcstas-users] WHEN and EXTEND card > Message-ID: > ntQYm0qLya5_wHMZNf7pSqJ_72gKJ4spkg at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Dear McStas team, > > I would like to ask you if the EXTEND card is executed independently if the > WHEN card is true or false. > > Thank you very much. > Kind regards > > *Jes?s P. de Vicente.-* > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.mcstas.org/pipermail/mcstas-users/attachments/20150611/f0fa915b/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Thu, 11 Jun 2015 19:43:11 +0200 > From: Markus Appel > To: mcstas-users at mcstas.org > Subject: Re: [mcstas-users] WHEN and EXTEND card > Message-ID: <5579C8AF.6020508 at googlemail.com> > Content-Type: text/plain; charset=windows-1252 > > Hi Jes?s, > > the EXTEND block should only be executed if WHEN is true, but there > was a bug in Mcstas <= 2.1 which only applied the WHEN condition to > the first line of the EXTEND block and always executed the remaining > lines. > > You can either upgrade to Mcstas 2.2a, or use an additional set of > braces in the EXTEND block as work-around in older versions, like this: > > COMPONENT something = ...() WHEN (...) > AT ... > EXTEND > %{ > { > do_something(); > do_something_else(); > ... ; > } > } > > Cheers, > Markus > > On 06/11/2015 07:29 PM, Jes?s P. de Vicente wrote: > > Dear McStas team, > > > > I would like to ask you if the EXTEND card is executed > > independently if the WHEN card is true or false. > > > > Thank you very much. Kind regards > > > > *Jes?s P. de Vicente.-* > > > > > > _______________________________________________ mcstas-users > > mailing list mcstas-users at mcstas.org > > http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users > > > > > > ------------------------------ > > Message: 3 > Date: Thu, 11 Jun 2015 13:27:11 +0000 > From: Pascale Deen > To: "mcstas-users at mcstas.org" > Subject: [mcstas-users] McStas component ESS_moderator > Message-ID: <9338BDFE-B81A-42D5-A2E5-26775BC3BDD3 at esss.se> > Content-Type: text/plain; charset="utf-8" > > Hello, > I am trying to run the moderator component > > COMPONENT ESS_Source = ESS_moderator( > isleft = 0.9, Lmin = 0.5, Lmax = 10, cold_frac = 0.5, > dist = 2, focus_xw = 0.2, focus_yh = 0.2, yheight_c = 0.03, > yheight_t = 0.03, n_pulses = 1, beamport_angle = 5, > sourcedef = "2015", extraction_opening = 120) > AT (0, 0, -0.1) RELATIVE Origin > > but I get the following warnings: > /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:409:1: > warning: control reaches end of non-void function [-Wreturn-type] > } /* end of ESS_Mezei_cold_2012 */ > ^ > /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:517:1: > warning: control reaches end of non-void function [-Wreturn-type] > } /* end of ESS_Mezei_cold */ > ^ > /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:622:1: > warning: control reaches end of non-void function [-Wreturn-type] > } /* end of ESS_Mezei_thermal */ > ^ > /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:639:1: > warning: control reaches end of non-void function [-Wreturn-type] > } /* end of ESS_2012_Lieutenant_cold */ > ^ > /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:693:1: > warning: control may reach end of non-void function [-Wreturn-type] > } /* end of ESS_2013_Schoenfeldt_cold */ > ^ > /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:719:1: > warning: control may reach end of non-void function [-Wreturn-type] > } /* end of ESS_2014_Schoenfeldt_cold */ > ^ > /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:851:1: > warning: control may reach end of non-void function [-Wreturn-type] > } /* end of ESS_2013_Schoenfeldt_thermal */ > ^ > /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:871:1: > warning: control may reach end of non-void function [-Wreturn-type] > } /* end of ESS_2014_Schoenfeldt_thermal */ > ^ > /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:894:1: > warning: control may reach end of non-void function [-Wreturn-type] > } /* end of ESS_2015_Schoenfeldt_thermal */ > ^ > /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:922:1: > warning: control may reach end of non-void function [-Wreturn-type] > } /* end of ESS_2015_Schoenfeldt_cold */ > ^ > /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:959:17: > warning: expression result unused [-Wunused-value] > if(i==0)par3-14.27; > ~~~~^~~~~~ > 11 warnings generated. > ---------------------------------------------------- > Pascale Deen > Instrument Scientist - Chopper Spectrometry > European Spallation Source ESS AB > P.O Box 176, SE-221 00 Lund, Sweden > Visiting address: Tunav?gen 24 Lund > > Adjunct Associate Professor > Niels Bohr Institute > University of Copenhagen > > Mobile: +46 721 792 079 > Phone: +46 46 888 3079 > E-mail: pascale.deen at esss.se > > www.esss.se > > The European Spallation Source is a Partnership of 16 European Nations > committed to the goal of collectively building and operating the world's > leading facility for research using neutrons by the second quarter of the > 21st Century > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.mcstas.org/pipermail/mcstas-users/attachments/20150611/649da88c/attachment.html > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users > > > ------------------------------ > > End of mcstas-users Digest, Vol 40, Issue 3 > ******************************************* > -------------- next part -------------- An HTML attachment was scrubbed... URL: From farhi at ill.fr Fri Jun 12 11:26:54 2015 From: farhi at ill.fr (Emmanuel FARHI) Date: Fri, 12 Jun 2015 11:26:54 +0200 Subject: [mcstas-users] Question about Monitor_nD In-Reply-To: References: Message-ID: <557AA5DE.1090103@ill.fr> An HTML attachment was scrubbed... URL: From jesuspedrodevicente at gmail.com Fri Jun 12 11:39:20 2015 From: jesuspedrodevicente at gmail.com (=?UTF-8?Q?Jes=C3=BAs_P=2E_de_Vicente?=) Date: Fri, 12 Jun 2015 11:39:20 +0200 Subject: [mcstas-users] Question about Monitor_nD In-Reply-To: <557AA5DE.1090103@ill.fr> References: <557AA5DE.1090103@ill.fr> Message-ID: Thanks Emmanuel, I understand. What I did was to use the PROP_DT() macro in the EXTEND card but your solution is better because I don't need to set up the TOF inside the component outside. I will use it. Thanks. Regards *Jes?s P. de Vicente.-* 2015-06-12 11:26 GMT+02:00 Emmanuel FARHI : > Hello Jesus, > > I think what you report is related to the fact that the setting of > component parameters, including the time copied into Monitor_nD 'uers1', > takes place before the propagation to the actual component geometry. Indeed > the propagation is implemented within the TRACE section, which requires all > component parameters to be set previously. Then the time you record is the > one from the previous component. > > The solution to what you wish to compute is to position a Monitor just > before the actual Monitor_nD using user1=t. > > Emmanuel. > > > On 06/12/2015 11:08 AM, Jes?s P. de Vicente wrote: > > I am sorry Peter and Emmanuel, > I realize that the mailing list is the best channel to ask questions about > McStas in order that all users can see it. > Can I ask this question about Monitor_nD there? > > Thanks > Kind regards > > *Jes?s P. de Vicente.-* > > 2015-05-29 17:36 GMT+02:00 Jes?s P. de Vicente < > jesuspedrodevicente at gmail.com>: > >> Dear Peter and Emmanuel, >> >> Could I ask you a simple question about the* Monitor_nD* component >> (McStas 2.1)? >> >> Why I get different results with the following two syntax? >> >> a) *option="time"* >> or >> b) *user1 = t, option="user1"* >> >> I need to used the variable 't' in the user1 function in order to >> determine the TOF2E. >> Nevertheless I can get the same result if I use the *PROP_DT()* macro in >> the EXTEND section of the previous component. >> >> Is there a way to avoid this trick? >> >> Thanks. >> Regards >> >> >> >> *Jes?s P. de Vicente.-* >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkwi at fysik.dtu.dk Fri Jun 12 13:57:13 2015 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Fri, 12 Jun 2015 11:57:13 +0000 Subject: [mcstas-users] McStas component ESS_moderator In-Reply-To: <9338BDFE-B81A-42D5-A2E5-26775BC3BDD3@esss.se> References: <9338BDFE-B81A-42D5-A2E5-26775BC3BDD3@esss.se> Message-ID: Dear Pascale, Most of these can be safely ignored (those relating to -Wreturn-type), but I admit it looks a bit nasty? And unfortunately hid a slightly more important warning for my eyes: The warning about -Wunused-value at the line if(i==0)par3-14.27; indicates that there should have been an assignment inside - I am guessing it should have read if(i==0)par3-=14.27; - What do you think Troels? As far as I can see, this bug only affects the i==0 setting corresponding the 5 degree beamport_angle setting? (Which I am guessing you are after for your instrument Pascale? :-( ) All of the above has (now) been fixed in our GitHub repository - the two affected files are also attached here? - Should be put either your working directory or in the share/ directory of your McStas 2.2a. At some non-decided point I will release a source bundle with these fixes, also including a version that runs with the legacy McStas 1.12c... Best and sorry for the inconvenience, Peter - On paternity leave until August :-) On 11 Jun 2015, at 15:27 , Pascale Deen > wrote: Hello, I am trying to run the moderator component COMPONENT ESS_Source = ESS_moderator( isleft = 0.9, Lmin = 0.5, Lmax = 10, cold_frac = 0.5, dist = 2, focus_xw = 0.2, focus_yh = 0.2, yheight_c = 0.03, yheight_t = 0.03, n_pulses = 1, beamport_angle = 5, sourcedef = "2015", extraction_opening = 120) AT (0, 0, -0.1) RELATIVE Origin but I get the following warnings: /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:409:1: warning: control reaches end of non-void function [-Wreturn-type] } /* end of ESS_Mezei_cold_2012 */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:517:1: warning: control reaches end of non-void function [-Wreturn-type] } /* end of ESS_Mezei_cold */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:622:1: warning: control reaches end of non-void function [-Wreturn-type] } /* end of ESS_Mezei_thermal */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:639:1: warning: control reaches end of non-void function [-Wreturn-type] } /* end of ESS_2012_Lieutenant_cold */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:693:1: warning: control may reach end of non-void function [-Wreturn-type] } /* end of ESS_2013_Schoenfeldt_cold */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:719:1: warning: control may reach end of non-void function [-Wreturn-type] } /* end of ESS_2014_Schoenfeldt_cold */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:851:1: warning: control may reach end of non-void function [-Wreturn-type] } /* end of ESS_2013_Schoenfeldt_thermal */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:871:1: warning: control may reach end of non-void function [-Wreturn-type] } /* end of ESS_2014_Schoenfeldt_thermal */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:894:1: warning: control may reach end of non-void function [-Wreturn-type] } /* end of ESS_2015_Schoenfeldt_thermal */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:922:1: warning: control may reach end of non-void function [-Wreturn-type] } /* end of ESS_2015_Schoenfeldt_cold */ ^ /Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:959:17: warning: expression result unused [-Wunused-value] if(i==0)par3-14.27; ~~~~^~~~~~ 11 warnings generated. ---------------------------------------------------- Pascale Deen Instrument Scientist - Chopper Spectrometry European Spallation Source ESS AB P.O Box 176, SE-221 00 Lund, Sweden Visiting address: Tunav?gen 24 Lund Adjunct Associate Professor Niels Bohr Institute University of Copenhagen Mobile: +46 721 792 079 Phone: +46 46 888 3079 E-mail: pascale.deen at esss.se www.esss.se The European Spallation Source is a Partnership of 16 European Nations committed to the goal of collectively building and operating the world's leading facility for research using neutrons by the second quarter of the 21st Century _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ess_source-lib.h Type: application/octet-stream Size: 5698 bytes Desc: ess_source-lib.h URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ess_source-lib.c Type: application/octet-stream Size: 40861 bytes Desc: ess_source-lib.c URL: From artur.glavic at psi.ch Wed Jun 17 08:58:06 2015 From: artur.glavic at psi.ch (Artur Glavic) Date: Wed, 17 Jun 2015 08:58:06 +0200 Subject: [mcstas-users] McStas debian repository Message-ID: <6493807.Hu6Iz7yVVa@11615> Hi, just wanted to let you know that your debian repository lacks authentication. Therefore the 'apt-cache search mcstas' command returns nothing and when installing the packages anyway you need to confirm the installation of unauthenticated packages. Cheers, Artur -- Paul Scherrer Institut Artur Glavic WHGA/110 5232 Villigen PSI From wokaoyan1981 at 126.com Thu Jun 25 05:04:09 2015 From: wokaoyan1981 at 126.com (=?GBK?B?s8LR5dbb?=) Date: Thu, 25 Jun 2015 11:04:09 +0800 (CST) Subject: [mcstas-users] abnormal result of virtual experiment Message-ID: <367f6844.5651.14e28ac2e59.Coremail.wokaoyan1981@126.com> Hi all? I?ve conducted a virtual experiment of residual stress neutron diffractometer by McStas 1.12c. The sample is shell-like: the outermost material is Al with 6mm thickness , the middle is Fe with 3mm thickness, and the innermost is solid cylinder of Al. In order to save simulation time for different sample sets, the code has been split into two parts. Ncount for part 1 is 10E9 and nrepeat for part 2 is 10E4.The simulation result, however, seems abnormal. The intensity detected by final PSD is about 22205.9 n/s with no beam spot found(see figure below)! In the case of ignoring the outermost Al shell, the intensity is around several hundreds with normal beam spot. So I doubt whether McStas could deal with more than 2 shells samples. I have already attached the two parts of code in enclosure, and will anybody kindly take a few minutes to review them and give a solution to this problem? I am looking forward to your reply. Thank you! Sincerely yours, Tom Tom ???126???????? Mysource.dat (34.94M, 2015?7?25? 10:59 ??) ?? part1.instr (4.65K, 2015?7?25? 11:00 ??) ?? part2.instr (5.28K, 2015?7?25? 11:00 ??) ?? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ???.bmp Type: image/bmp Size: 1996542 bytes Desc: not available URL: From jon.james at open.ac.uk Thu Jun 25 10:00:19 2015 From: jon.james at open.ac.uk (Jon.James) Date: Thu, 25 Jun 2015 08:00:19 +0000 Subject: [mcstas-users] 2.0 installation Message-ID: Dear all, I am trying to install McStas version 2.0 on a windows laptop. I have downloaded the file mcstas-2.0-src-win.zip and run the executables within this file. If I try running a simulation from the shell 'McStas-shell-2.0' using, for example, mcrun test.instr where 'test.instr' is an instrument file that I know to be okay I get the message; "File "C:\mcstas-2.0\bin\mcrun.pl", line 26 use config; SyntaxError: invalid syntax Could someone please advise? I have run McStas successfully in the past and really need to get this going as quickly as possible. Thanks in advance Jon -- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302). The Open University is authorised and regulated by the Financial Conduct Authority. -------------- next part -------------- An HTML attachment was scrubbed... URL: From erkn at fysik.dtu.dk Thu Jun 25 10:49:08 2015 From: erkn at fysik.dtu.dk (Erik B Knudsen) Date: Thu, 25 Jun 2015 10:49:08 +0200 Subject: [mcstas-users] 2.0 installation In-Reply-To: References: Message-ID: <558BC084.9060605@fysik.dtu.dk> Dear Jon, First of all - you might consider upgrading to McStas 2.2a, but I assume you have some reason for staying with 2.0 so let's work with that. I'd be happy to help you. - I'll try to reproduce your problem - can you tell me which windows version you have, and can you send me your instrument file, so we're certain not to comparew apples to pears? cheers Erik On 25/06/15 10:00, Jon.James wrote: > Dear all, > > I am trying to install McStas version 2.0 on a windows laptop. > > I have downloaded the file mcstas-2.0-src-win.zip > > and run the executables within this file. > > If I try running a simulation from the shell ?McStas-shell-2.0? using, > for example, mcrun test.instr where ?test.instr? is an instrument file > that I know to be okay I get the message; > > ?File ?C:\mcstas-2.0\bin\mcrun.pl?, line 26 use config; SyntaxError: > invalid syntax > > Could someone please advise? I have run McStas successfully in the past > and really need to get this going as quickly as possible. > > Thanks in advance > > Jon > > -- The Open University is incorporated by Royal Charter (RC 000391), an > exempt charity in England & Wales and a charity registered in Scotland > (SC 038302). The Open University is authorised and regulated by the > Financial Conduct Authority. > > > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users > -- Erik Bergb?ck Knudsen, Research Engineer | DTU | morituri NEXMAP, DTU Fysik, DK-2800 Kgs. Lyngby, Denmark |<>-<>| te phone: (+45) 2132 6655 |<>-<>| salutant From pkwi at fysik.dtu.dk Tue Jun 30 10:18:31 2015 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Tue, 30 Jun 2015 08:18:31 +0000 Subject: [mcstas-users] abnormal result of virtual experiment In-Reply-To: <367f6844.5651.14e28ac2e59.Coremail.wokaoyan1981@126.com> References: <367f6844.5651.14e28ac2e59.Coremail.wokaoyan1981@126.com> Message-ID: <68BDBCA2-B784-4E36-8BB8-A104528F9E26@fysik.dtu.dk> Dear Tom, I am currently on paternity leave - i.e. not at work until mid-august. Hence I only have very little time to devote to your issue. I hope other users or someone else from the McStas team may pick up on this later. I have no ready-made solution for you, but having had a short look at your instrument files, I am puzzled by a number of things: 1) I see no reason to split the simulation in two. More statistics will not help a lot if you are ?asking the wrong question? from your simulation. Especially using nrepeat this way will bias your results a lot - and may lead your simulation to give unphysical results! 2) To effectively use a ?concentric? arrangement, the components on the ?incoming? side must have a reasonable value of the ?tfrac? parameter (called p_transmit in later versions of McStas) - this controls the fraction of the incoming statistics to describe an ?attenuated direct beam?, i.e. what statistics will reach the ?inner? components. Your simulation leaves this parameter at the default, i.e. 10% only of the incoming beam - which is then multiplied further down as you enter further into the ?assembly?. 3) Your ?sample? is VERY big - probably you are trying to describe some big mechanical device being mounted on your stress-rig? This is clearly not what ?concentric components? was designed for, even though it could maybe work? ?Concentric components? is much more aimed at investigating effects of multiple scattering back and forth between a more classically-sized sample and its container, i.e. a compact geometry. I would therefore suggest that you instead try something like what you see below - but with thin slabs of material at the front and slab at the back. PowderN distributes scattering evenly over the cross-section of the beam with the sample geometry. DECLARE %{ double samplechoice; %} COMPONENT SampleChoice = Arm( AT (somewhere) EXTEND %{ // Sample A or B? samplechoice = rand01(); %} COMPONENT SampleA = PowderN(some parameterset) WHEN (samplechoice<0.5) AT (somewhere) COMPONENT SampleB = PowderN(some other parameterset) WHEN (samplechoice>=0.5) AT (somewhere else) Hope this helps a little - and that someone else may have other suggestions for you also. Best, Peter Peter Kj?r Willendrup Senior Research Engineer, Special Advisor DTU Physics Technical University of Denmark [cid:image002.gif at 01CCCAF1.5E6331F0] Department of Physics Fysikvej Building 307 DK-2800 Kongens Lyngby Direct +45 2125 4612 Mobil +45 2125 4612 Fax +45 4593 2399 pkwi at fysik.dtu.dk On 25 Jun 2015, at 05:04 , ??? > wrote: Hi all? I?ve conducted a virtual experiment of residual stress neutron diffractometer by McStas 1.12c. The sample is shell-like: the outermost material is Al with 6mm thickness , the middle is Fe with 3mm thickness, and the innermost is solid cylinder of Al. In order to save simulation time for different sample sets, the code has been split into two parts. Ncount for part 1 is 10E9 and nrepeat for part 2 is 10E4.The simulation result, however, seems abnormal. The intensity detected by final PSD is about 22205.9 n/s with no beam spot found(see figure below)! In the case of ignoring the outermost Al shell, the intensity is around several hundreds with normal beam spot. So I doubt whether McStas could deal with more than 2 shells samples. I have already attached the two parts of code in enclosure, and will anybody kindly take a few minutes to review them and give a solution to this problem? I am looking forward to your reply. Thank you! Sincerely yours, Tom Tom ???126???????? [http://mimg.127.net/xm/all/fj/ico-bfile-28.gif] Mysource.dat (34.94M, 2015?7?25? 10:59 ??) ?? [http://mimg.127.net/xm/all/fj/ico-bfile-1.gif] part1.instr (4.65K, 2015?7?25? 11:00 ??) ?? [http://mimg.127.net/xm/all/fj/ico-bfile-1.gif] part2.instr (5.28K, 2015?7?25? 11:00 ??) ?? _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 58 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 1055 bytes Desc: image002.gif URL: