From adrien.perrichon at stfc.ac.uk Mon Jan 14 10:17:23 2019 From: adrien.perrichon at stfc.ac.uk (adrien.perrichon at stfc.ac.uk) Date: Mon, 14 Jan 2019 09:17:23 +0000 Subject: [mcstas-users] guide simulation Message-ID: <7df2abf22b9446e79037495a6134cefd@stfc.ac.uk> Dear all, I'm trying to optimize the number of segments and m-values of a simple guide (elliptic defocusing, curved guide, elliptic focusing). So far I have been using the "Elliptic_guide_gravity" and "Guide_curved" components to get the right shape, and the "Guide_tapering" component to estimate the segment length effect (via the "segno" parameter). To get a more detailed layout, I have been thinking of defining my own function for the "Guide_tapering" option parameter, but I believe there is a simpler alternative with the "seglength" and "mvaluesright"/"...left"/"...top"/"...bottom" of the "Elliptic_guide_gravity" component. However, I couldn't figure out what was the right input format so far. Could you provide me with a working example? Kind regards, Adrien Perrichon Post doc at Uppsala U./ISIS From pkwi at fysik.dtu.dk Fri Jan 18 10:56:05 2019 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Fri, 18 Jan 2019 09:56:05 +0000 Subject: [mcstas-users] McStas user survey 2018 In-Reply-To: References: Message-ID: Dear all, The results from the 2018 McStas user survey are now online at http://survey2018.mcstas.org. The main conclusions are that * Q1: McStas users tend to upgrade to the latest release. * Q2: Linux is by a large margin the most used platform, followed by Windows 10 and macOS. * Q3: McStas are generally happy about the installation and use of the package. Very few people have issues with installation. * Q4: The most used tool set is the default Python version, default since v. 2.1. * Q5: McStas users seem very satisfied with the user support. * Q6: McStas users tend to trust McStas to large extent. But please don't trust it blindly!! * Q7: McStas users mostly compare with experimental data or analytic / back of envelope calculations. * Q8: McStas users have widespread knowledge of all documentation resources - but we should probably disseminate the wiki further. * Q9: The individual suggestions/questions/comments/... will be answered through individual GitHub issues. * Q10: McStas is used on all continents that have / are planning neutron scattering infrastructure. Users are mostly based at these facilities, but also at other research labs or universities. Thank you very much for the (generally) very positive review - also, you are more than welcome to participate in continuing debate on user suggestions that will take place in the individual GitHub survey issues. Best regards, Peter Willendrup Peter Kj?r Willendrup Forskningsingeni?r, Specialkonsulent N?stformand for DTU Fysik LSU DTU Physics [cid:b6339554-7f28-441d-9f31-5944f811397c at win.dtu.dk] Technical University of Denmark [cid:e108e480-fcab-46e2-9531-b38165079572 at win.dtu.dk] 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 ls8vm at virginia.edu Tue Feb 5 07:17:26 2019 From: ls8vm at virginia.edu (Lingnan Shen) Date: Tue, 5 Feb 2019 01:17:26 -0500 Subject: [mcstas-users] Guide_gravity Problem Message-ID: Hi all, I was trying to learn how to use the guide_gravity component. I tried to define the reflectivity curve but I get zero neutrons at the wavelength monitor in the end of guide. I have attached my .instr and .rfl file. I also found that even if the neutron beam just go through the guide. The detector at the end still see nothing. Also another question about transmission of certain setup. To calculate the ratio of neutron_in / neutron_out. I want to know how much neutron remained after passing through that setup. Should I use the flux or the events count? Sincerely, Lingnan Shen -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pencilbeam.instr Type: application/octet-stream Size: 1451 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: constant.rfl Type: application/octet-stream Size: 636 bytes Desc: not available URL: From farhi at ill.fr Tue Feb 5 10:01:07 2019 From: farhi at ill.fr (Emmanuel FARHI) Date: Tue, 5 Feb 2019 10:01:07 +0100 Subject: [mcstas-users] Guide_gravity Problem In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From pkwi at fysik.dtu.dk Tue Feb 5 10:12:35 2019 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Tue, 5 Feb 2019 09:12:35 +0000 Subject: [mcstas-users] Guide_gravity Problem In-Reply-To: References: Message-ID: Hello Lingnan, Agree with Emmanuel. Further, the combination of a pencil-beam, i.e. almost non-divergent source and using 500 channels in a rotated Guide_gravity means that transport through the guide becomes close to impossible. With regard to your second question you should always consider the transported intensity I. The event count is simply a measure of statistics (of "neutron rays", not ?neutrons?). Best, Peter Willendrup On 5 Feb 2019, at 10.01, Emmanuel FARHI > wrote: Hello Lingnan, Your reflectivity file is given for k=0 to 0.14 Angs-1. This is very small and covers neutrons around lambda=60 Angs, which are not even created by your source. Change either the lambda setting at the source, or better the k values in the reflectivity file to be around e.g. 1.0 Angs-1. Cheers, Emmanuel. On 2/5/19 7:17 AM, Lingnan Shen wrote: Hi all, I was trying to learn how to use the guide_gravity component. I tried to define the reflectivity curve but I get zero neutrons at the wavelength monitor in the end of guide. I have attached my .instr and .rfl file. I also found that even if the neutron beam just go through the guide. The detector at the end still see nothing. Also another question about transmission of certain setup. To calculate the ratio of neutron_in / neutron_out. I want to know how much neutron remained after passing through that setup. Should I use the flux or the events count? Sincerely, Lingnan Shen _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users -- Emmanuel FARHI, \|/ ____ \|/ Spectroscopy Group Institut Laue-Langevin (ILL) Grenoble ~@-/ oO \-@~ 71 av des Martyrs,CS 20156,38042 Grenoble Cedex 9,France /_( \__/ )_\ Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 48 39 06 \__U_/ _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users Peter Kj?r Willendrup Forskningsingeni?r, Specialkonsulent N?stformand for DTU Fysik LSU DTU Physics [cid:b6339554-7f28-441d-9f31-5944f811397c at win.dtu.dk] Technical University of Denmark [cid:e108e480-fcab-46e2-9531-b38165079572 at win.dtu.dk] 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 ls8vm at virginia.edu Thu Feb 7 16:53:08 2019 From: ls8vm at virginia.edu (ls8vm at virginia.edu) Date: Thu, 7 Feb 2019 10:53:08 -0500 Subject: [mcstas-users] Guide_gravity Problem In-Reply-To: <89A25A5F-8984-488B-A4F0-DEF1E9C0245D@fysik.dtu.dk> References: <89A25A5F-8984-488B-A4F0-DEF1E9C0245D@fysik.dtu.dk> Message-ID: <5c5c5465.1c69fb81.704b6.efd3@mx.google.com> Hi all, I checked the supermirror_m3.rfl file and it ranges from 0 to 0.09 [Angs-1] so I?m really confused with the k value in the first column of reflectivity file. I thought it represent the total momentum transferred. Can you explain more on ?better the k values in the reflectivity file to be around e.g. 1.0 Angs-1.? Does the guide_gravity component have a different definition on reflectivity file? My actual source wavelength ranges from 0 to 10 [Angs]. And also for Peter, my actual problem is to optimize a polarizer which is built by stack of supermirror. I?m trying to find a way to get the most transmission through that setup. So I want to calculate the ratio neutron_out/neutron_in. Now it seems that I should just divide the intensity instead of event numbers? Happy Lunar New Year, Lingnan Shen From: Peter Kj?r Willendrup Sent: Tuesday, February 5, 2019 4:20 AM To: Lingnan Shen Cc: Emmanuel Farhi Subject: Re: [mcstas-users] Guide_gravity Problem Hello again, A better starting point for understanding Guide_gravity and reflectivity files may be the instrument file Test_Guides which is included with your McStas installation, in combination with one of the example reflectivity files from the data folder - e.g. supermirror_m3.rdl. Also, for a pencil beam with controllable divergence, an option is to use Source_div. Hope this helps - otherwise you are welcome to write again, preferably with a good description of what exact problem you are trying to solve. :-) Best, Peter On 5 Feb 2019, at 10.12, Peter Kj?r Willendrup wrote: Hello Lingnan, Agree with Emmanuel.? Further, the combination of a pencil-beam, i.e. almost non-divergent source and using 500 channels in a rotated Guide_gravity means that transport through the guide becomes close to impossible.? With regard to your second question you should always consider the transported intensity I. The event count is simply a measure of statistics (of "neutron rays", not ?neutrons?). Best, Peter Willendrup On 5 Feb 2019, at 10.01, Emmanuel FARHI wrote: Hello Lingnan, Your reflectivity file is given for k=0 to 0.14 Angs-1. This is very small and covers neutrons around lambda=60 Angs, which are not even created by your source. Change either the lambda setting at the source, or better the k values in the reflectivity file to be around e.g. 1.0 Angs-1. Cheers, Emmanuel. On 2/5/19 7:17 AM, Lingnan Shen wrote: Hi all, ? ? ? ? I was trying to learn how to use the guide_gravity component. I tried to define the reflectivity curve but I get zero neutrons at the wavelength monitor in the end of guide. I have attached my .instr and .rfl file. I also found that even if the neutron beam just go through the guide. The detector at the end still see nothing. ? ? ? ? Also another question about transmission of certain setup. To calculate the ratio of neutron_in / neutron_out. I want to know how much neutron remained after passing through that setup. Should I use the flux or the events count? Sincerely, Lingnan Shen _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users -- Emmanuel FARHI, \|/ ____ \|/ Spectroscopy Group Institut Laue-Langevin (ILL) Grenoble ~@-/ oO \-@~ 71 av des Martyrs,CS 20156,38042 Grenoble Cedex 9,France /_( \__/ )_\ Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 48 39 06 \__U_/ _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users Peter Kj?r Willendrup Forskningsingeni?r, Specialkonsulent N?stformand for DTU Fysik LSU 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 Peter Kj?r Willendrup Forskningsingeni?r, Specialkonsulent N?stformand for DTU Fysik LSU 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: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 1055 bytes Desc: not available URL: From lefmann at nbi.ku.dk Sat Feb 9 08:34:44 2019 From: lefmann at nbi.ku.dk (Kim Lefmann) Date: Sat, 9 Feb 2019 08:34:44 +0100 Subject: [mcstas-users] Guide_gravity Problem In-Reply-To: <5c5c5465.1c69fb81.704b6.efd3@mx.google.com> References: <89A25A5F-8984-488B-A4F0-DEF1E9C0245D@fysik.dtu.dk> <5c5c5465.1c69fb81.704b6.efd3@mx.google.com> Message-ID: Hi Shen, It is also my understanding that the k value is the momentum transfer. Sorry, I do not have the time to look into you problem now. best, Kim On 2/7/19 4:53 PM, ls8vm at virginia.edu wrote: > > Hi all, > > ??????????? I checked the supermirror_m3.rfl file and it ranges from 0 > to 0.09 [Angs-1] so I?m really confused with the k value in the first > column of reflectivity file. I thought it represent the total momentum > transferred. Can you explain more on ?better the k values in the > reflectivity file to be around e.g. 1.0 Angs-1.? Does the > guide_gravity component have a different definition on reflectivity > file? My actual source wavelength ranges from 0 to 10 [Angs]. > > And also for Peter, my actual problem is to optimize a polarizer which > is built by stack of supermirror. I?m trying to find a way to get the > most transmission through that setup. So I want to calculate the ratio > neutron_out/neutron_in. Now it seems that I should just divide the > intensity instead of event numbers? > > Happy Lunar New Year, > > Lingnan Shen > > *From: *Peter Kj?r Willendrup > *Sent: *Tuesday, February 5, 2019 4:20 AM > *To: *Lingnan Shen > *Cc: *Emmanuel Farhi > *Subject: *Re: [mcstas-users] Guide_gravity Problem > > Hello again, > > A better starting point for understanding Guide_gravity and > reflectivity files may be the instrument file Test_Guides which is > included with your McStas installation, in combination with one of the > example reflectivity files from the data folder - e.g. supermirror_m3.rdl. > > Also, for a pencil beam with controllable divergence, an option is to > use Source_div. > > Hope this helps - otherwise you are welcome to write again, preferably > with a good description of what exact problem you are trying to solve. :-) > > Best, > > Peter > > > > On 5 Feb 2019, at 10.12, Peter Kj?r Willendrup > wrote: > > Hello Lingnan, > > Agree with Emmanuel. > > Further, the combination of a pencil-beam, i.e. almost > non-divergent source and using 500 channels in a rotated > Guide_gravity means that transport through the guide becomes close > to impossible. > > With regard to your second question you should always consider the > transported intensity I. The event count is simply a measure of > statistics (of "neutron rays", not ?neutrons?). > > Best, > > Peter Willendrup > > On 5 Feb 2019, at 10.01, Emmanuel FARHI > wrote: > > Hello Lingnan, > > Your reflectivity file is given for k=0 to 0.14 Angs-1. This > is very small and covers neutrons around lambda=60 Angs, which > are not even created by your source. Change either the lambda > setting at the source, or better the k values in the > reflectivity file to be around e.g. 1.0 Angs-1. > > Cheers, Emmanuel. > > On 2/5/19 7:17 AM, Lingnan Shen wrote: > > Hi all, > > ? ? ? ? I was trying to learn how to use the guide_gravity > component. I tried to define the reflectivity curve but I > get zero neutrons at the wavelength monitor in the end of > guide. I have attached my .instr and .rfl file. I also > found that even if the neutron beam just go through the > guide. The detector at the end still see nothing. > > ? ? ? ? Also another question about transmission of > certain setup. To calculate the ratio of neutron_in / > neutron_out. I want to know how much neutron remained > after passing through that setup. Should I use the flux or > the events count? > > Sincerely, > > Lingnan Shen > > > > _______________________________________________ > > mcstas-users mailing list > > mcstas-users at mcstas.org > > https://mailman2.mcstas.org/mailman/listinfo/mcstas-users > > -- > > Emmanuel FARHI,?????????????????????????????????????????? \|/ ____ \|/ > > Spectroscopy Group Institut Laue-Langevin (ILL) Grenoble? ~@-/ oO \-@~ > > 71 av des Martyrs,CS 20156,38042 Grenoble Cedex 9,France? /_( \__/ )_\ > > Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 48 39 06???? \__U_/ > > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > https://mailman2.mcstas.org/mailman/listinfo/mcstas-users > > > Peter Kj?r Willendrup > Forskningsingeni?r, Specialkonsulent > N?stformand for DTU Fysik LSU > > 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 > > > Peter Kj?r Willendrup > Forskningsingeni?r, Specialkonsulent > N?stformand for DTU Fysik LSU > > DTU Physics > > > cid:b6339554-7f28-441d-9f31-5944f811397c at win.dtu.dk > > > Technical University of Denmark > > > cid:e108e480-fcab-46e2-9531-b38165079572 at win.dtu.dk > > > > 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 > > > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > https://mailman2.mcstas.org/mailman/listinfo/mcstas-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ls8vm at virginia.edu Sat Feb 9 22:56:36 2019 From: ls8vm at virginia.edu (Lingnan Shen) Date: Sat, 9 Feb 2019 16:56:36 -0500 Subject: [mcstas-users] Guide_gravity Problem In-Reply-To: References: <89A25A5F-8984-488B-A4F0-DEF1E9C0245D@fysik.dtu.dk> <5c5c5465.1c69fb81.704b6.efd3@mx.google.com> Message-ID: Hi all, I now have my reflectivity file working and I'm trying to understand how many reflections happened in the guide. I followed the example in the component manual in the end of section 9.8.7. It didn't work. I attached the .instr and .rfl file to this email. Thanks for all the great help. Sincerely, Lingnan Shen On Sat, Feb 9, 2019 at 2:42 AM Kim Lefmann wrote: > Hi Shen, > > It is also my understanding that the k value is the momentum transfer. > > Sorry, I do not have the time to look into you problem now. > > best, Kim > > > On 2/7/19 4:53 PM, ls8vm at virginia.edu wrote: > > Hi all, > > > > I checked the supermirror_m3.rfl file and it ranges from 0 to > 0.09 [Angs-1] so I?m really confused with the k value in the first column > of reflectivity file. I thought it represent the total momentum > transferred. Can you explain more on ?better the k values in the > reflectivity file to be around e.g. 1.0 Angs-1.? Does the guide_gravity > component have a different definition on reflectivity file? My actual > source wavelength ranges from 0 to 10 [Angs]. > > > > And also for Peter, my actual problem is to optimize a polarizer which is > built by stack of supermirror. I?m trying to find a way to get the most > transmission through that setup. So I want to calculate the ratio > neutron_out/neutron_in. Now it seems that I should just divide the > intensity instead of event numbers? > > > > > > Happy Lunar New Year, > > Lingnan Shen > > > > *From: *Peter Kj?r Willendrup > *Sent: *Tuesday, February 5, 2019 4:20 AM > *To: *Lingnan Shen > *Cc: *Emmanuel Farhi > *Subject: *Re: [mcstas-users] Guide_gravity Problem > > > > Hello again, > > > > > > A better starting point for understanding Guide_gravity and reflectivity > files may be the instrument file Test_Guides which is included with your > McStas installation, in combination with one of the example reflectivity > files from the data folder - e.g. supermirror_m3.rdl. > > > > Also, for a pencil beam with controllable divergence, an option is to use > Source_div. > > > > Hope this helps - otherwise you are welcome to write again, preferably > with a good description of what exact problem you are trying to solve. :-) > > > > Best, > > > > Peter > > > > On 5 Feb 2019, at 10.12, Peter Kj?r Willendrup wrote: > > > > Hello Lingnan, > > > > > > Agree with Emmanuel. > > > > Further, the combination of a pencil-beam, i.e. almost non-divergent > source and using 500 channels in a rotated Guide_gravity means that > transport through the guide becomes close to impossible. > > > > With regard to your second question you should always consider the > transported intensity I. The event count is simply a measure of statistics > (of "neutron rays", not ?neutrons?). > > > > > > Best, > > > > Peter Willendrup > > > > > > On 5 Feb 2019, at 10.01, Emmanuel FARHI wrote: > > > > Hello Lingnan, > > Your reflectivity file is given for k=0 to 0.14 Angs-1. This is very small > and covers neutrons around lambda=60 Angs, which are not even created by > your source. Change either the lambda setting at the source, or better the > k values in the reflectivity file to be around e.g. 1.0 Angs-1. > > Cheers, Emmanuel. > > > > On 2/5/19 7:17 AM, Lingnan Shen wrote: > > Hi all, > > > > I was trying to learn how to use the guide_gravity component. I > tried to define the reflectivity curve but I get zero neutrons at the > wavelength monitor in the end of guide. I have attached my .instr and .rfl > file. I also found that even if the neutron beam just go through the guide. > The detector at the end still see nothing. > > Also another question about transmission of certain setup. To > calculate the ratio of neutron_in / neutron_out. I want to know how much > neutron remained after passing through that setup. Should I use the flux or > the events count? > > > > Sincerely, > > Lingnan Shen > > > > _______________________________________________ > > mcstas-users mailing list > > mcstas-users at mcstas.org > > https://mailman2.mcstas.org/mailman/listinfo/mcstas-users > > -- > > Emmanuel FARHI, \|/ ____ \|/ > > Spectroscopy Group Institut Laue-Langevin (ILL) Grenoble ~@-/ oO \-@~ > > 71 av des Martyrs,CS 20156,38042 Grenoble Cedex 9,France /_( \__/ )_\ > > Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 48 39 06 \__U_/ > > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > https://mailman2.mcstas.org/mailman/listinfo/mcstas-users > > > > > Peter Kj?r Willendrup > Forskningsingeni?r, Specialkonsulent > N?stformand for DTU Fysik LSU > > 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 > > > > > > > Peter Kj?r Willendrup > Forskningsingeni?r, Specialkonsulent > N?stformand for DTU Fysik LSU > > DTU Physics > > > [image: cid:b6339554-7f28-441d-9f31-5944f811397c at win.dtu.dk] > > > Technical University of Denmark > > > [image: cid:e108e480-fcab-46e2-9531-b38165079572 at win.dtu.dk] > > > > 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 > > > > > > _______________________________________________ > mcstas-users mailing listmcstas-users at mcstas.orghttps://mailman2.mcstas.org/mailman/listinfo/mcstas-users > > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > https://mailman2.mcstas.org/mailman/listinfo/mcstas-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pencilbeam.instr Type: application/octet-stream Size: 1426 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Rplus_Sapphire.rfl Type: application/octet-stream Size: 906 bytes Desc: not available URL: From masolomaster3000 at googlemail.com Sat Feb 9 23:44:42 2019 From: masolomaster3000 at googlemail.com (Markus Appel) Date: Sat, 9 Feb 2019 23:44:42 +0100 Subject: [mcstas-users] Guide_gravity Problem In-Reply-To: References: <89A25A5F-8984-488B-A4F0-DEF1E9C0245D@fysik.dtu.dk> <5c5c5465.1c69fb81.704b6.efd3@mx.google.com> Message-ID: <3720ea9b-7269-0a8b-9822-7af870f93b36@googlemail.com> Hi, "it didn't work" is kind of a vague error to work with, but on first glance your problem might be that the nbounces variable is not reset in the TRACE section, it will just keep counting up through the simulation. Check again the example in the manual, there is an Arm component before the guide with an EXTEND that sets nbounces=0 for each iteration. Best, Markus On 09/02/2019 22:56, Lingnan Shen wrote: > Hi all, > > ? ? ? ? I now have my reflectivity file working and I'm trying to > understand how many reflections happened in the guide. I followed the > example in the component manual in the end of section 9.8.7. It didn't > work. I attached the .instr and .rfl file to?this email. > ? ? ? ? Thanks for all the great help. > > Sincerely, > Lingnan Shen > > On Sat, Feb 9, 2019 at 2:42 AM Kim Lefmann > wrote: > > Hi Shen, > > It is also my understanding that the k value is the momentum transfer. > > Sorry, I do not have the time to look into you problem now. > > best, Kim > > > On 2/7/19 4:53 PM, ls8vm at virginia.edu wrote: >> >> Hi all,____ >> >> __?__ >> >> ??????????? I checked the supermirror_m3.rfl file and it ranges >> from 0 to 0.09 [Angs-1] so I?m really confused with the k value in >> the first column of reflectivity file. I thought it represent the >> total momentum transferred. Can you explain more on ?better the k >> values in the reflectivity file to be around e.g. 1.0 Angs-1.? >> Does the guide_gravity component have a different definition on >> reflectivity file? My actual source wavelength ranges from 0 to 10 >> [Angs].____ >> >> __?__ >> >> And also for Peter, my actual problem is to optimize a polarizer >> which is built by stack of supermirror. I?m trying to find a way >> to get the most transmission through that setup. So I want to >> calculate the ratio neutron_out/neutron_in. Now it seems that I >> should just divide the intensity instead of event numbers?____ >> >> __?__ >> >> __?__ >> >> Happy Lunar New Year,____ >> >> Lingnan Shen____ >> >> __?__ >> >> *From: *Peter Kj?r Willendrup >> *Sent: *Tuesday, February 5, 2019 4:20 AM >> *To: *Lingnan Shen >> *Cc: *Emmanuel Farhi >> *Subject: *Re: [mcstas-users] Guide_gravity Problem >> >> __?__ >> >> Hello again, ____ >> >> __?__ >> >> __?__ >> >> A better starting point for understanding Guide_gravity and >> reflectivity files may be the instrument file Test_Guides which is >> included with your McStas installation, in combination with one of >> the example reflectivity files from the data folder - e.g. >> supermirror_m3.rdl.____ >> >> __?__ >> >> Also, for a pencil beam with controllable divergence, an option is >> to use Source_div.____ >> >> __?__ >> >> Hope this helps - otherwise you are welcome to write again, >> preferably with a good description of what exact problem you are >> trying to solve. :-)____ >> >> __?__ >> >> Best,____ >> >> __?__ >> >> Peter____ >> >> >> >> ____ >> >> On 5 Feb 2019, at 10.12, Peter Kj?r Willendrup >> > wrote:____ >> >> __?__ >> >> Hello Lingnan, ____ >> >> __?__ >> >> __?__ >> >> Agree with Emmanuel.?____ >> >> __?__ >> >> Further, the combination of a pencil-beam, i.e. almost >> non-divergent source and using 500 channels in a rotated >> Guide_gravity means that transport through the guide becomes >> close to impossible.?____ >> >> __?__ >> >> With regard to your second question you should always consider >> the transported intensity I. The event count is simply a >> measure of statistics (of "neutron rays", not ?neutrons?).____ >> >> __?__ >> >> __?__ >> >> Best,____ >> >> __?__ >> >> Peter Willendrup____ >> >> __?__ >> >> __?__ >> >> On 5 Feb 2019, at 10.01, Emmanuel FARHI > > wrote:____ >> >> __?__ >> >> Hello Lingnan, >> >> Your reflectivity file is given for k=0 to 0.14 Angs-1. >> This is very small and covers neutrons around lambda=60 >> Angs, which are not even created by your source. Change >> either the lambda setting at the source, or better the k >> values in the reflectivity file to be around e.g. 1.0 Angs-1. >> >> Cheers, Emmanuel. >> >> __?__ >> >> On 2/5/19 7:17 AM, Lingnan Shen wrote:____ >> >> Hi all, ____ >> >> __?__ >> >> ? ? ? ? I was trying to learn how to use the >> guide_gravity component. I tried to define the >> reflectivity curve but I get zero neutrons at the >> wavelength monitor in the end of guide. I have >> attached my .instr and .rfl file. I also found that >> even if the neutron beam just go through the guide. >> The detector at the end still see nothing.____ >> >> ? ? ? ? Also another question about transmission of >> certain setup. To calculate the ratio of neutron_in / >> neutron_out. I want to know how much neutron remained >> after passing through that setup. Should I use the >> flux or the events count?____ >> >> __?__ >> >> Sincerely,____ >> >> Lingnan Shen____ >> >> >> >> ____ >> >> _______________________________________________ >> >> mcstas-users mailing list >> >> mcstas-users at mcstas.org >> >> https://mailman2.mcstas.org/mailman/listinfo/mcstas-users >> >> -- >> >> Emmanuel FARHI,?????????????????????????????????????????? \|/ ____ \|/ >> >> Spectroscopy Group Institut Laue-Langevin (ILL) Grenoble? ~@-/ oO \-@~ >> >> 71 av des Martyrs,CS 20156,38042 Grenoble Cedex 9,France? /_( \__/ )_\ >> >> Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 48 39 06???? \__U_/ >> >> _______________________________________________ >> mcstas-users mailing list >> mcstas-users at mcstas.org >> https://mailman2.mcstas.org/mailman/listinfo/mcstas-users____ >> >> __?__ >> >> >> Peter Kj?r Willendrup >> Forskningsingeni?r, Specialkonsulent >> N?stformand for DTU Fysik LSU >> >> 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 ____ >> >> __?__ >> >> __?__ >> >> >> Peter Kj?r Willendrup >> Forskningsingeni?r, Specialkonsulent >> N?stformand for DTU Fysik LSU >> >> DTU Physics____ >> >> >> cid:b6339554-7f28-441d-9f31-5944f811397c at win.dtu.dk >> >> >> Technical University of Denmark >> >> >> cid:e108e480-fcab-46e2-9531-b38165079572 at win.dtu.dk >> >> >> >> 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 ____ >> >> __?__ >> >> __?__ >> >> >> _______________________________________________ >> mcstas-users mailing list >> mcstas-users at mcstas.org >> https://mailman2.mcstas.org/mailman/listinfo/mcstas-users > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > https://mailman2.mcstas.org/mailman/listinfo/mcstas-users > > > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > https://mailman2.mcstas.org/mailman/listinfo/mcstas-users > From farhi at ill.fr Tue Feb 12 12:10:18 2019 From: farhi at ill.fr (Emmanuel FARHI) Date: Tue, 12 Feb 2019 12:10:18 +0100 Subject: [mcstas-users] McStas/MPI OFF file problem. iFit execution/scans. In-Reply-To: References: Message-ID: <3c14730c-430b-e63e-0c10-45e05e6c2d2c@ill.fr> An HTML attachment was scrubbed... URL: From 104pet104 at gmail.com Tue Feb 12 12:12:57 2019 From: 104pet104 at gmail.com (=?UTF-8?B?0J/QtdGC0YAg0JrQvtC90LjQug==?=) Date: Tue, 12 Feb 2019 14:12:57 +0300 Subject: [mcstas-users] McStas/MPI OFF file problem. iFit execution/scans. In-Reply-To: <3c14730c-430b-e63e-0c10-45e05e6c2d2c@ill.fr> References: <3c14730c-430b-e63e-0c10-45e05e6c2d2c@ill.fr> Message-ID: Thank you very much for such a rapid help! I will test it in a couple of days and provide feedback. For the last question - yes of course you may freely use it (one note - PIK is usually written with I) Best regards, Peter Konik ??, 12 ????. 2019 ?. ? 14:05, Emmanuel FARHI : > > Hi Peter, > > I had a look at the 'stack smashing detected' error you reported (below) when using: > > instrument screw_n > Guide_anyshape component with large OFF (nice twisted guide made of triangles) > mpi with 24 cores > > I can reproduce the bug. I find that wether it is controlled from iFit or from the command line with mcrun does not make any difference. The bug occurs in both usages, even with very few neutron counts (1e4), in the middle of the TRACE (not at final data merge). > > The reported error is: > > *** stack smashing detected ***: terminated > > and it mostly takes place at the 'screw' component which is the Guide_anyshape(OFF). It triggers a SIGTERM or SIGABRT which usually saves results but stops further neutron events (partial computation). But it also involves the Octo_sm monitor (Monitor_nD). > > McStas 2.5 test (Ubuntu 18.04) > > When executed from iFit, the error also shows as: > > # Fatal : unrecoverable loop ! Suicide (naughty boy). > [warn] Epoll ADD(4) on fd 37 failed. Old events were 0; read change was 0 (none); write change was 1 (add): Bad file descriptor > [farhimacpro:05429] pmix_usock_msg_send_bytes: write failed: Broken pipe (32) [sd = 112] > > This is clearly related to openMPI, and more specifically to libevent. > > I have executed the same with a serial computation, and it all goes OK, even when compiled with MPI, and executed with --mpi=1. > > I have no idea why this happens, as Guide_anyshape has no I/O routine except at the start (read the OFF), but the issue comes in the middle of the TRACE, in connection with Octo_sm... > > Conclusion > > I have no idea what the error is, as of today. > > Fallback solutions > > In all cases, make sure the 'L' value is larger than the Guide_anyshape length (OFF 'width'). > > Solution 1: Removing the Octo_sm component seems to solve the issue. So this is a possibility. > > Solution 2: (recommended) You can as well replace it with e.g.: > > COMPONENT Octo_sm = Divergence_monitor(xwidth = h, yheight = w, > nh=100, nv=100, maxdiv_h=10, maxdiv_v=0.1, filename="Octo_sm.dat") > AT (0, 0, L+0.04) RELATIVE arm_geks > > Solution 3: An other solution is serial execution which works, as far as I have seen. You can force iFit/mccode to work in serial with: > > m=mccode('screw_n.instr','mpi=1'); % at creation > > or > > m=mccode('screw_n.instr'); > m.UserData.options.mpi=1; % after creation > > Then you can run parameter scans and optimisations. It is just longer. > > Final question > > Would you accept if I add one of your OFF twisted guides into McStas/Data, as well as the PYK reactor source parameters in Source_gen doc ? > > Emmanuel. > > On 2/11/19 6:53 PM, farhi wrote: > > Hello Peter, > > Would you be so kind to send me your H3 McStas model, as well as the 15.off file so that I can nail down the error ? > > Emmanuel. > > Le 2019-02-11 17:29, ???? ????? a ?crit : > > Dear all! > > We currently try to use a quiet large .off file to finely represent a > complex geometry guide. While mcstas itself works well (if executed > from the mcgui), ifit script, which we use to scan parameters, > irregularly crash. Here is the error - it looks like it is some > trouble with the array allocated sizes. Any ideas how to fix that? > > Sorry for large text - we really don't know which part is important. > > Best regards, > Peter Konik > > mpirun -n 8 /tmp/tp538a3bb9_21a0_4166_b4ea_597a15889e55/screw_n.out > --ncount=1000000 --dir=/tmp/tp538a3bb9_21a0_4166_b4ea_597a15889e55/sim > L=15 guide_m=6 lambda=2 > mpirun -n 8 /tmp/tp538a3bb9_21a0_4166_b4ea_597a15889e55/screw_n.out > --ncount=1000000 --dir=/tmp/tp538a3bb9_21a0_4166_b4ea_597a15889e55/sim > L=15 guide_m=6 lambda=2: Quit > Simulation 'H3' > (/tmp/tp538a3bb9_21a0_4166_b4ea_597a15889e55/screw_n.instr): running > on 8 nodes (master is 'konik-N46JV', MPI version 3.1). > [H3] Initialize > [H3] Initialize > [H3] Initialize > [H3] Initialize > Loading geometry file (OFF/PLY): data/length/extra_fine/15.off > Number of vertices: 5694 > [H3] Initialize > [H3] Initialize > [H3] Initialize > [H3] Initialize > Number of polygons: 11366 > Warning: Neither xwidth, yheight or zdepth are defined. > The file-defined (non-scaled) geometry the OFF geometry > data/length/extra_fine/15.off will be applied! > Bounding box dimensions for geometry data/length/extra_fine/15.off: > Length=0.150000 (100.000%) > Width= 15.000000 (100.000%) > Depth= 0.150000 (100.000%) > *** stack smashing detected ***: terminated > > # McStas 2.5 - Dec. 12, 2018: [pid 13264] Signal 6 detected [proc 7] > SIGABRT (Abort) > # Simulation: H3 (/tmp/tp538a3bb9_21a0_4166_b4ea_597a15889e55/screw_n.instr) > # Breakpoint: Octo_sm (Trace) 6.47 % ( 8089.0/ 125000.0) > # Date: Mon Feb 11 19:13:44 2019 > # Started: Mon Feb 11 19:13:43 2019 > # Last I/O Error: Function not implemented > # McStas 2.5 - Dec. 12, 2018: Simulation stop (abort). > > # McStas 2.5 - Dec. 12, 2018: [pid 13258] Signal 15 detected [proc 6] > SIGTERM (Termination) > # Simulation: H3 (/tmp/tp538a3bb9_21a0_4166_b4ea_597a15889e55/screw_n.instr) > # Breakpoint: screw (Trace) 20.96 % ( 26205.0/ 125000.0) > # Date: Mon Feb 11 19:13:45 2019 > # Started: Mon Feb 11 19:13:43 2019 > # McStas 2.5 - Dec. 12, 2018: Finishing simulation (save results and exit) > > # McStas 2.5 - Dec. 12, 2018: [pid 13255] Signal 15 detected [proc 5] > SIGTERM (Termination) > # Simulation: H3 (/tmp/tp538a3bb9_21a0_4166_b4ea_597a15889e55/screw_n.instr) > # Breakpoint: screw (Trace) 19.39 % ( 24240.0/ 125000.0) > # Date: Mon Feb 11 19:13:45 2019 > # Started: Mon Feb 11 19:13:43 2019 > # McStas 2.5 - Dec. 12, 2018: Finishing simulation (save results and exit) > > Finally [H3: /tmp/tp538a3bb9_21a0_4166_b4ea_597a15889e55/sim]. Time: 2 [s] > > # McStas 2.5 - Dec. 12, 2018: [pid 13248] Signal 15 detected [proc 2] > SIGTERM (Termination) > # Simulation: H3 (/tmp/tp538a3bb9_21a0_4166_b4ea_597a15889e55/screw_n.instr) > # Breakpoint: screw (Trace) 19.55 % ( 24443.0/ 125000.0) > # Date: Mon Feb 11 19:13:45 2019 > # Started: Mon Feb 11 19:13:43 2019 > # McStas 2.5 - Dec. 12, 2018: Finishing simulation (save results and exit) > > Finally [H3: /tmp/tp538a3bb9_21a0_4166_b4ea_597a15889e55/sim]. Time: 2 [s] > > # McStas 2.5 - Dec. 12, 2018: [pid 13247] Signal 15 detected [proc 1] > SIGTERM (Termination) > # Simulation: H3 (/tmp/tp538a3bb9_21a0_4166_b4ea_597a15889e55/screw_n.instr) > # Breakpoint: screw (Trace) 20.48 % ( 25600.0/ 125000.0) > # Date: Mon Feb 11 19:13:45 2019 > # Started: Mon Feb 11 19:13:43 2019 > # McStas 2.5 - Dec. 12, 2018: Finishing simulation (save results and exit) > > Finally [H3: /tmp/tp538a3bb9_21a0_4166_b4ea_597a15889e55/sim]. Time: 2 [s] > > # McStas 2.5 - Dec. 12, 2018: [pid 13250] Signal 15 detected [proc 4] > SIGTERM (Termination) > # Simulation: H3 (/tmp/tp538a3bb9_21a0_4166_b4ea_597a15889e55/screw_n.instr) > # Breakpoint: screw (Trace) 20.61 % ( 25768.0/ 125000.0) > # Date: Mon Feb 11 19:13:45 2019 > # Started: Mon Feb 11 19:13:43 2019 > # McStas 2.5 - Dec. 12, 2018: Finishing simulation (save results and exit) > > # McStas 2.5 - Dec. 12, 2018: [pid 13249] Signal 15 detected [proc 3] > SIGTERM (Termination) > # Simulation: H3 (/tmp/tp538a3bb9_21a0_4166_b4ea_597a15889e55/screw_n.instr) > # Breakpoint: screw (Trace) 26.14 % ( 32672.0/ 125000.0) > # Date: Mon Feb 11 19:13:45 2019 > # Started: Mon Feb 11 19:13:43 2019 > # McStas 2.5 - Dec. 12, 2018: Finishing simulation (save results and exit) > > Finally [H3: /tmp/tp538a3bb9_21a0_4166_b4ea_597a15889e55/sim]. Time: 2 [s] > > # McStas 2.5 - Dec. 12, 2018: [pid 13246] Signal 15 detected [proc 0] > SIGTERM (Termination) > # Simulation: H3 (/tmp/tp538a3bb9_21a0_4166_b4ea_597a15889e55/screw_n.instr) > # Breakpoint: screw (Trace) 20.70 % ( 25879.0/ 125000.0) > # Date: Mon Feb 11 19:13:45 2019 > # Started: Mon Feb 11 19:13:43 2019 > # McStas 2.5 - Dec. 12, 2018: Finishing simulation (save results and exit) > > Save [H3] > [warn] Epoll ADD(4) on fd 49 failed. Old events were 0; read change > was 0 (none); write change was 1 (add): Bad file descriptor > [warn] Epoll ADD(4) on fd 43 failed. Old events were 0; read change > was 0 (none); write change was 1 (add): Bad file descriptor > -------------------------------------------------------------------------- > mpirun noticed that process rank 7 with PID 0 on node konik-N46JV > exited on signal 3 (Quit). > -------------------------------------------------------------------------- > > Error: Could not evaluate Expression in model screw_n.instr McCode > [mccode] iF495774 > self = iFunc_McCode (methods,doc,plot,code) 1D model: "screw_n.instr > McCode [mccode]" > Expression: UD = this.UserData; options=UD.options;if > ~isempty(options.dir) && ... > Description: McCode virtual experiment screw_n.instr > Set UserData.options.monitor to specify a given monitor file pattern, > or [] to get the last. > Monitors are stored in UserData.monitors > Available monitors: > * Octo_large > * Octo_med > * Octo_sm > iData iD500632=load(iData,... [100 1] Intensity [n/s/bin](x) > "mccode.sim McCode sim file I=1.02353e+09 I_err=1.02353e+09 N=1 > X0=0.0131313 dX=0;" > > Axis 1 "x" label is "Vert. Divergence [deg]", range [-0.1:0.1] > Tag: 'iF495774' > Date: '11-Feb-2019 19:12:49' > Name: 'screw_n.instr McCode [mccode]' > Parameters: {3?1 cell} > Guess: [10 6 5] > Constraint: [1?1 struct] > Dimension: 1 > ParameterValues: [3?1 double] > UserData: [1?1 struct] > Duration: 0.7051 > class: 'iFunc_McCode' > > Parameters (3): > p( 1)= L=15 > p( 2)= guide_m=6 > p( 3)= lambda=2 > Other Parameters: > '' > 'UD = this.UserData; options=UD.options;' > 'if ~isempty(options.dir) && isempty(dir(options.dir));' > 'try; mkdir(options.dir); end;' > 'end;' > 'if isempty(options.dir) || isempty(dir(options.dir));' > 'options.dir=tempname;' > 'mkdir(options.dir);' > 'options.use_tmpdir = true;' > 'else options.use_tmpdir = false;' > > ... > 'ax='x,y,z,t';' > 'nd=exist('t')+exist('z')+exist('y')+exist('x');' > 'if min(nd,this.Dimension)>0, ax=eval([ '{' > ax(1:(2*min(nd,this.Dimension))) '}']); else ax={}; end;' > 'if ~isempty(ax) && exist('x') && ~isempty(x) && > ~all(isnan(x(:))), signal = interp(signal, ax{:});' > 'else x=getaxis(signal,1); y=getaxis(signal,2); > z=getaxis(signal,3); t=getaxis(signal,4); end;' > 'end;' > > Name Size Bytes Class Attributes > > ME 1x1 3878 MException > UD 1x1 1029966 struct > cmd 1x163 326 char > duration 1x1 8 double > f 0x1 0 cell > iFunc_ax 1x14 28 char > iFunc_dim 1x1 8 double > iFunc_t0 1x6 48 double > iFunc_this 1x1 1070328 iFunc_McCode > index 0x0 0 double > options 1x1 2461 struct > p 1x3 24 double > result 1x4667 9334 char > signal 0x0 0 double > status 1x1 8 double > struct_p 1x1 552 struct > this 1x1 1070328 iFunc_McCode > varargin 1x0 0 cell > x 51x1 408 double > > Error using iFunc/feval>iFunc_feval_expr (line 414) > Model screw_n.instr McCode [mccode] iF495774 failed to execute mpirun > -n 8 /tmp/tp538a3bb9_21a0_4166_b4ea_597a15889e55/screw_n.out > --ncount=1000000 --dir=/tmp/tp538a3bb9_21a0_4166_b4ea_597a15889e55/sim > L=15 guide_m=6 lambda=2 > iFunc:feval: Saved state in > /media/konik/a09e43d5-7f1d-47d7-b0ae-2df53071d43b/JOB/Octagon-guide/Octagon-guide/simulation/iFunc_feval_error > Error using iFunc/feval>iFunc_feval_expr (line 432) > Failed model evaluation. Saved state in > /media/konik/a09e43d5-7f1d-47d7-b0ae-2df53071d43b/JOB/Octagon-guide/Octagon-guide/simulation/iFunc_feval_error > > Error in iFunc/feval (line 344) > [signal,ax,p,model,duration] = iFunc_feval_expr(model, varargin{:}); > > Error in iFunc_McCode/feval (line 139) > [signal, self, ax, name] = feval at iFunc(self, varargin{:}); > > Error in iData>iData_iFunc2iData (line 268) > [signals, this_in, axs, names] = feval(this_in, varargin{:}); > > Error in iData (line 189) > [this_out, this_in] = iData_iFunc2iData(this_in, axes_in, > varargin{2:end}); > > Error in screw_length_scan (line 42) > results = iData(model,parameters); > _______________________________________________ > ifit-users mailing list > ifit-users at mccode.org > https://mailman2.mccode.org/mailman/listinfo/ifit-users > > > -- > Emmanuel FARHI, \|/ ____ \|/ > Spectroscopy Group Institut Laue-Langevin (ILL) Grenoble ~@-/ oO \-@~ > 71 av des Martyrs,CS 20156,38042 Grenoble Cedex 9,France /_( \__/ )_\ > Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 48 39 06 \__U_/ From ls8vm at virginia.edu Wed Feb 13 02:57:37 2019 From: ls8vm at virginia.edu (Lingnan Shen) Date: Tue, 12 Feb 2019 20:57:37 -0500 Subject: [mcstas-users] Guide_gravity Problem In-Reply-To: <3720ea9b-7269-0a8b-9822-7af870f93b36@googlemail.com> References: <89A25A5F-8984-488B-A4F0-DEF1E9C0245D@fysik.dtu.dk> <5c5c5465.1c69fb81.704b6.efd3@mx.google.com> <3720ea9b-7269-0a8b-9822-7af870f93b36@googlemail.com> Message-ID: Hi all, I am interested in how many reflection happened with one guide_gravity component. I am able to printf() the number of bounces ( *nbounces*) in the EXTEND section after the guide_gravity. But the monitor_nD component is not giving any data. It outputs only zeros. And on the "variables" line in the output file it shows "I I_err N" * COMPONENT UserMonitor = Monitor_nD(* * user1 = nbounces,* * username1 = "Number of bounces",* * options = "auto user1")* * AT(......)* How should I use the Monitor_nD component for displaying the number of bounces in the guide? Sincerely, Lingnan Shen On Sat, Feb 9, 2019 at 5:44 PM Markus Appel wrote: > Hi, > "it didn't work" is kind of a vague error to work with, but on first > glance your problem might be that the nbounces variable is not reset in > the TRACE section, it will just keep counting up through the simulation. > > Check again the example in the manual, there is an Arm component before > the guide with an EXTEND that sets nbounces=0 for each iteration. > > Best, > Markus > > On 09/02/2019 22:56, Lingnan Shen wrote: > > Hi all, > > > > I now have my reflectivity file working and I'm trying to > > understand how many reflections happened in the guide. I followed the > > example in the component manual in the end of section 9.8.7. It didn't > > work. I attached the .instr and .rfl file to this email. > > Thanks for all the great help. > > > > Sincerely, > > Lingnan Shen > > > > On Sat, Feb 9, 2019 at 2:42 AM Kim Lefmann > > wrote: > > > > Hi Shen, > > > > It is also my understanding that the k value is the momentum > transfer. > > > > Sorry, I do not have the time to look into you problem now. > > > > best, Kim > > > > > > On 2/7/19 4:53 PM, ls8vm at virginia.edu > wrote: > >> > >> Hi all,____ > >> > >> __ __ > >> > >> I checked the supermirror_m3.rfl file and it ranges > >> from 0 to 0.09 [Angs-1] so I?m really confused with the k value in > >> the first column of reflectivity file. I thought it represent the > >> total momentum transferred. Can you explain more on ?better the k > >> values in the reflectivity file to be around e.g. 1.0 Angs-1.? > >> Does the guide_gravity component have a different definition on > >> reflectivity file? My actual source wavelength ranges from 0 to 10 > >> [Angs].____ > >> > >> __ __ > >> > >> And also for Peter, my actual problem is to optimize a polarizer > >> which is built by stack of supermirror. I?m trying to find a way > >> to get the most transmission through that setup. So I want to > >> calculate the ratio neutron_out/neutron_in. Now it seems that I > >> should just divide the intensity instead of event numbers?____ > >> > >> __ __ > >> > >> __ __ > >> > >> Happy Lunar New Year,____ > >> > >> Lingnan Shen____ > >> > >> __ __ > >> > >> *From: *Peter Kj?r Willendrup > >> *Sent: *Tuesday, February 5, 2019 4:20 AM > >> *To: *Lingnan Shen > >> *Cc: *Emmanuel Farhi > >> *Subject: *Re: [mcstas-users] Guide_gravity Problem > >> > >> __ __ > >> > >> Hello again, ____ > >> > >> __ __ > >> > >> __ __ > >> > >> A better starting point for understanding Guide_gravity and > >> reflectivity files may be the instrument file Test_Guides which is > >> included with your McStas installation, in combination with one of > >> the example reflectivity files from the data folder - e.g. > >> supermirror_m3.rdl.____ > >> > >> __ __ > >> > >> Also, for a pencil beam with controllable divergence, an option is > >> to use Source_div.____ > >> > >> __ __ > >> > >> Hope this helps - otherwise you are welcome to write again, > >> preferably with a good description of what exact problem you are > >> trying to solve. :-)____ > >> > >> __ __ > >> > >> Best,____ > >> > >> __ __ > >> > >> Peter____ > >> > >> > >> > >> ____ > >> > >> On 5 Feb 2019, at 10.12, Peter Kj?r Willendrup > >> > wrote:____ > >> > >> __ __ > >> > >> Hello Lingnan, ____ > >> > >> __ __ > >> > >> __ __ > >> > >> Agree with Emmanuel. ____ > >> > >> __ __ > >> > >> Further, the combination of a pencil-beam, i.e. almost > >> non-divergent source and using 500 channels in a rotated > >> Guide_gravity means that transport through the guide becomes > >> close to impossible. ____ > >> > >> __ __ > >> > >> With regard to your second question you should always consider > >> the transported intensity I. The event count is simply a > >> measure of statistics (of "neutron rays", not ?neutrons?).____ > >> > >> __ __ > >> > >> __ __ > >> > >> Best,____ > >> > >> __ __ > >> > >> Peter Willendrup____ > >> > >> __ __ > >> > >> __ __ > >> > >> On 5 Feb 2019, at 10.01, Emmanuel FARHI >> > wrote:____ > >> > >> __ __ > >> > >> Hello Lingnan, > >> > >> Your reflectivity file is given for k=0 to 0.14 Angs-1. > >> This is very small and covers neutrons around lambda=60 > >> Angs, which are not even created by your source. Change > >> either the lambda setting at the source, or better the k > >> values in the reflectivity file to be around e.g. 1.0 > Angs-1. > >> > >> Cheers, Emmanuel. > >> > >> __ __ > >> > >> On 2/5/19 7:17 AM, Lingnan Shen wrote:____ > >> > >> Hi all, ____ > >> > >> __ __ > >> > >> I was trying to learn how to use the > >> guide_gravity component. I tried to define the > >> reflectivity curve but I get zero neutrons at the > >> wavelength monitor in the end of guide. I have > >> attached my .instr and .rfl file. I also found that > >> even if the neutron beam just go through the guide. > >> The detector at the end still see nothing.____ > >> > >> Also another question about transmission of > >> certain setup. To calculate the ratio of neutron_in / > >> neutron_out. I want to know how much neutron remained > >> after passing through that setup. Should I use the > >> flux or the events count?____ > >> > >> __ __ > >> > >> Sincerely,____ > >> > >> Lingnan Shen____ > >> > >> > >> > >> ____ > >> > >> _______________________________________________ > >> > >> mcstas-users mailing list > >> > >> mcstas-users at mcstas.org > > >> > >> > https://mailman2.mcstas.org/mailman/listinfo/mcstas-users > >> > >> -- > >> > >> Emmanuel FARHI, > \|/ ____ \|/ > >> > >> Spectroscopy Group Institut Laue-Langevin (ILL) Grenoble > ~@-/ oO \-@~ > >> > >> 71 av des Martyrs,CS 20156,38042 Grenoble Cedex 9,France > /_( \__/ )_\ > >> > >> Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 48 39 > 06 \__U_/ > >> > >> _______________________________________________ > >> mcstas-users mailing list > >> mcstas-users at mcstas.org > >> > https://mailman2.mcstas.org/mailman/listinfo/mcstas-users____ > >> > >> __ __ > >> > >> > >> Peter Kj?r Willendrup > >> Forskningsingeni?r, Specialkonsulent > >> N?stformand for DTU Fysik LSU > >> > >> 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 ____ > >> > >> __ __ > >> > >> __ __ > >> > >> > >> Peter Kj?r Willendrup > >> Forskningsingeni?r, Specialkonsulent > >> N?stformand for DTU Fysik LSU > >> > >> DTU Physics____ > >> > >> > >> cid:b6339554-7f28-441d-9f31-5944f811397c at win.dtu.dk > >> > >> > >> Technical University of Denmark > >> > >> > >> cid:e108e480-fcab-46e2-9531-b38165079572 at win.dtu.dk > >> > >> > >> > >> 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 ____ > >> > >> __ __ > >> > >> __ __ > >> > >> > >> _______________________________________________ > >> mcstas-users mailing list > >> mcstas-users at mcstas.org > >> https://mailman2.mcstas.org/mailman/listinfo/mcstas-users > > _______________________________________________ > > mcstas-users mailing list > > mcstas-users at mcstas.org > > https://mailman2.mcstas.org/mailman/listinfo/mcstas-users > > > > > > _______________________________________________ > > mcstas-users mailing list > > mcstas-users at mcstas.org > > https://mailman2.mcstas.org/mailman/listinfo/mcstas-users > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pencilbeam.instr Type: application/octet-stream Size: 1501 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Rplus_Sapphire.rfl Type: application/octet-stream Size: 906 bytes Desc: not available URL: From farhi at ill.fr Wed Feb 13 08:56:10 2019 From: farhi at ill.fr (Emmanuel FARHI) Date: Wed, 13 Feb 2019 08:56:10 +0100 Subject: [mcstas-users] Guide_gravity Problem In-Reply-To: References: <89A25A5F-8984-488B-A4F0-DEF1E9C0245D@fysik.dtu.dk> <5c5c5465.1c69fb81.704b6.efd3@mx.google.com> <3720ea9b-7269-0a8b-9822-7af870f93b36@googlemail.com> Message-ID: <79e75074-17d2-9d00-d874-7b8615a44874@ill.fr> An HTML attachment was scrubbed... URL: From 104pet104 at gmail.com Mon Mar 11 23:19:21 2019 From: 104pet104 at gmail.com (=?UTF-8?B?0J/QtdGC0YAg0JrQvtC90LjQug==?=) Date: Tue, 12 Mar 2019 01:19:21 +0300 Subject: [mcstas-users] Off file Strange behavior Message-ID: Dear all! We try to simulate a guide-transformer consisting of three parts: high and narrow rectangular guide gradually transforms into octagonal one, then there is central part of constant cross section and finally the third part identical to the first one but rotated 90 degrees. We try to change different parameters and create corresponding off files. In most cases it works fine but when we change the side of octagon from a=0.033 to a=0.034 the flux and divergence profile changes dramatically. This strange value of a does not change for different wavelength or for different length of the guide. There is a similar strange behavior around a=0.013-0.014. Obviously, something odd is happening. Your help will be mostly helpful! Find attached related files. P.S. It is my pleasure to invite you all to ECNS2019 conference held in Saint Petersburg! Note that the final call for abstracts is ongoing and the deadline is this Friday March 15th. Please visit our web site http://ecns2019.com/ . Best regards, Peter Konik -------------- next part -------------- A non-text attachment was scrubbed... Name: data_octagon.zip Type: application/zip Size: 146890 bytes Desc: not available URL: