From Peter.Link at frm2.tum.de Tue Feb 14 09:44:29 2017 From: Peter.Link at frm2.tum.de (Peter Link) Date: Tue, 14 Feb 2017 09:44:29 +0100 Subject: [mcstas-users] Guide_anyshape question Message-ID: <284df780-e592-ac13-9688-0beb0bf71081@frm2.tum.de> Dear McStas friends, I successfully used the Guide_anyshape component to simulate an unusually shaped neutron guide. After many attemps to simulate this guide this appears to be the first real solution. Finally I run into the problem, that this component allows only for one unique mirror property description (generic or table) valid for all faces. I looked at the code of the component, but my c programming skills seam insufficient to solve the problem adding a kind of table of mirror props to the list of faces. If anybody out there is interested to help me, I would very grateful! Any hint how to do that in a clever way is welcome. Best regards, Peter -- Dr. Peter Link Leiter Neutronenoptik Technische Universit?t M?nchen Heinz Maier-Leibnitz Zentrum (MLZ) Lichtenbergstr. 1 85747 Garching Tel.: +49 (0)89 289 14622 Fax: +49 (0) 89 289 11694 From pkwi at fysik.dtu.dk Mon Feb 20 09:43:40 2017 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Mon, 20 Feb 2017 08:43:40 +0000 Subject: [mcstas-users] Guide_anyshape question In-Reply-To: <284df780-e592-ac13-9688-0beb0bf71081@frm2.tum.de> References: <284df780-e592-ac13-9688-0beb0bf71081@frm2.tum.de> Message-ID: Dear Peter, Sorry for the delay in responding, I was on vacation until this morning. On 14 Feb 2017, at 09:44 , Peter Link > wrote: I successfully used the Guide_anyshape component to simulate an unusually shaped neutron guide. After many attemps to simulate this guide this appears to be the first real solution. This sounds good - what is the unusual guide shape you want to simulate? Finally I run into the problem, that this component allows only for one unique mirror property description (generic or table) valid for all faces. I looked at the code of the component, but my c programming skills seam insufficient to solve the problem adding a kind of table of mirror props to the list of faces. It is true that the component until now only allows a single coating quality, but as I remember the OFF file format allows to specify a face ?colour?, which could perhaps be utilised to define an ?m? value pr. face? (I would then propose that we use the empirical parametrisation from Henrik Jacobsen based on Swiss Neutronics data, where the alpha and W parameters are derived from ?m? above m=2) If anybody out there is interested to help me, I would very grateful! Any hint how to do that in a clever way is welcome. The above is my first thoughts about an entrypoint for the problem - let?s discuss this in more detail off-list maybe? Best, Peter Peter Kj?r Willendrup Senior Research Engineer, Special Advisor DTU Physics [cid:image001.gif at 01CCCAF1.5E6331F0] 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 federicobertalot at cnea.gov.ar Mon Feb 20 17:59:04 2017 From: federicobertalot at cnea.gov.ar (Federico M. Bertalot) Date: Mon, 20 Feb 2017 13:59:04 -0300 Subject: [mcstas-users] NeXus format problem. Message-ID: <19e05389-26c2-1727-fd92-8d2a744f8b43@cnea.gov.ar> Hello, I am using NeXus format for my output files in mcstas, and it works fine. But now i have added some divergence monitors to my instrument and found this warning: /Warning: could not open DataSet data 'Divergence monitor' (NeXus)// //Warning: could not open DataSet errors 'Divergence monitor' (NeXus)// //Warning: could not open DataSet ncount 'Divergence monitor' (NeXus)/ / /In fact, the resulting file has only the fields "acquisition_mode" and "distance" fields for the divergence monitor. Do you know why? Is there some way to solve it? Thank you very much. Federico. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkwi at fysik.dtu.dk Mon Feb 20 20:51:22 2017 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Mon, 20 Feb 2017 19:51:22 +0000 Subject: [mcstas-users] NeXus format problem. In-Reply-To: <19e05389-26c2-1727-fd92-8d2a744f8b43@cnea.gov.ar> References: <19e05389-26c2-1727-fd92-8d2a744f8b43@cnea.gov.ar> Message-ID: <4CA3AA0F-EF8B-488E-B1B9-9DDC99ECF2AE@fysik.dtu.dk> Dear Federico, On 20 Feb 2017, at 17:59 , Federico M. Bertalot > wrote: I am using NeXus format for my output files in mcstas, and it works fine. But now i have added some divergence monitors to my instrument and found this warning: Warning: could not open DataSet data 'Divergence monitor' (NeXus) Warning: could not open DataSet errors 'Divergence monitor' (NeXus) Warning: could not open DataSet ncount 'Divergence monitor' (NeXus) In fact, the resulting file has only the fields "acquisition_mode" and "distance" fields for the divergence monitor. Do you know why? Is there some way to solve it? My guess is that you are using Divergence_monitor.comp with filename=?Divergence monitor? - i.e. including a space. My guess is that all should work properly if you use a filename without spaces. BUT: To give you better advice I will need an archive (zip/tar.gz or equivalent) including: * Your instrment file * The generated c-code * The output dataset which including the failure It would also help to know which version of McStas you are running on which operating system - and what version of NeXus and HDF you are using. - Then I have a chance of reproducing the issue. :-) Best, Peter Willendrup Peter Kj?r Willendrup Senior Research Engineer, Special Advisor DTU Physics [cid:image001.gif at 01CCCAF1.5E6331F0] 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 federicobertalot at cnea.gov.ar Mon Mar 20 15:11:28 2017 From: federicobertalot at cnea.gov.ar (Federico M. Bertalot) Date: Mon, 20 Mar 2017 11:11:28 -0300 Subject: [mcstas-users] Effective region of the source Message-ID: <46df378f-2bf2-57b7-c49e-1e72d390e721@cnea.gov.ar> Hello, i am trying to know the effective region of the source. In other words, each time a neutron reachs the detector i want to know, which region of the source it came from. I think that one possible solution is to create a source component that stores the starting position of each neutron in a new variable. Then, the detector reads this new variable. Maybe this can be done using store_neutron() also, but i dont know how to read the trace-history. if you know a better solution, please tell me. Thank you very much. Federico. From lefmann at nbi.ku.dk Mon Mar 20 15:59:59 2017 From: lefmann at nbi.ku.dk (Kim Lefmann) Date: Mon, 20 Mar 2017 15:59:59 +0100 Subject: [mcstas-users] Effective region of the source In-Reply-To: <46df378f-2bf2-57b7-c49e-1e72d390e721@cnea.gov.ar> References: <46df378f-2bf2-57b7-c49e-1e72d390e721@cnea.gov.ar> Message-ID: <58CFEE6F.7050800@nbi.ku.dk> Dear Federico, This was something we studied a while ago, also in relation to ESS. The initial studies were performed using an EXTEND at the source that just stored the x and y coordinates. Then, we placed the "Come From" monitor last in the instrument, extremely close to the PSD predecing it. The "Come From" monitor is also a PSD, but between the two monitors, another EXTEND restores the neutron x and y coordinates to be the stored ones. Hope this makes sense. I give you here a link to the thesis of Kaspar Klen? with many of the initial results http://xns.nbi.ku.dk/student_theses/Kaspar_klenoe_phd.pdf The effect of moderator sizes were studied very carefully by another student of mine, Mads Bertelsen (c.c.), but in a more systematic way, in order to determine the optimal moderator geometry. Possibly, Mads has the time contribute briefly to this discussion - but otherwise he is very busy writing up his thesis text right now... best, Kim On 03/20/2017 03:11 PM, Federico M. Bertalot wrote: > Hello, > > i am trying to know the effective region of the source. In other > words, each time a neutron reachs the detector i want to know, which > region of the source it came from. > > I think that one possible solution is to create a source component > that stores the starting position of each neutron in a new variable. > Then, the detector reads this new variable. Maybe this can be done > using store_neutron() also, but i dont know how to read the > trace-history. > > if you know a better solution, please tell me. > > Thank you very much. > > Federico. > > > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From farhi at ill.fr Tue Mar 21 10:12:30 2017 From: farhi at ill.fr (Emmanuel FARHI) Date: Tue, 21 Mar 2017 10:12:30 +0100 Subject: [mcstas-users] Effective region of the source In-Reply-To: <58CFEE6F.7050800@nbi.ku.dk> References: <46df378f-2bf2-57b7-c49e-1e72d390e721@cnea.gov.ar> <58CFEE6F.7050800@nbi.ku.dk> Message-ID: Hi Federico, an other, simple, way is to make use of the PreMonitor_nD which allow to look at the status of a neutron at a location 1, for neutrons that reach an other, further, location 2. As this is a Monitor_nD, you may monitor any neutron variable, and more. Emmanuel. On 03/20/2017 03:59 PM, Kim Lefmann wrote: > Dear Federico, > > This was something we studied a while ago, also in relation to ESS. > The initial studies were performed using an EXTEND at the source that > just stored the x and y coordinates. Then, we placed the "Come From" > monitor last in the instrument, extremely close to the PSD predecing > it. The "Come From" monitor is also a PSD, but between the two > monitors, another EXTEND restores the neutron x and y coordinates to > be the stored ones. Hope this makes sense. > > I give you here a link to the thesis of Kaspar Klen? with many of the > initial results > > http://xns.nbi.ku.dk/student_theses/Kaspar_klenoe_phd.pdf > > The effect of moderator sizes were studied very carefully by another > student of mine, Mads Bertelsen (c.c.), but in a more systematic way, > in order to determine the optimal moderator geometry. Possibly, Mads > has the time contribute briefly to this discussion - but otherwise he > is very busy writing up his thesis text right now... > > best, Kim > > > On 03/20/2017 03:11 PM, Federico M. Bertalot wrote: >> Hello, >> >> i am trying to know the effective region of the source. In other >> words, each time a neutron reachs the detector i want to know, which >> region of the source it came from. >> >> I think that one possible solution is to create a source component >> that stores the starting position of each neutron in a new variable. >> Then, the detector reads this new variable. Maybe this can be done >> using store_neutron() also, but i dont know how to read the >> trace-history. >> >> if you know a better solution, please tell me. >> >> Thank you very much. >> >> Federico. >> >> >> _______________________________________________ >> 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 -- Emmanuel FARHI,www.ill.eu/computing/people/emmanuel-farhi \|/ ____ \|/ CS-Group ILL4/221, 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 federicobertalot at cnea.gov.ar Tue Mar 21 14:37:31 2017 From: federicobertalot at cnea.gov.ar (Federico M. Bertalot) Date: Tue, 21 Mar 2017 10:37:31 -0300 Subject: [mcstas-users] Effective region of the source In-Reply-To: <46df378f-2bf2-57b7-c49e-1e72d390e721@cnea.gov.ar> References: <46df378f-2bf2-57b7-c49e-1e72d390e721@cnea.gov.ar> Message-ID: Kim, J?rg and Emmanuel, I will try with PreMonitor_nD. Thank you very much for your help. On 20/03/17 11:15, "Voigt, J?rg" wrote: > Hi, > You may use also a pre_monitor_ND component just downstream the sample, which you use then in combination with a Monitor_ND at the sample position. > Hope, that this is useful. > > Cheers > J?rg >> On 20 Mar 2017, at 15:11, Federico M. Bertalot wrote: >> >> Hello, >> >> i am trying to know the effective region of the source. In other words, each time a neutron reachs the detector i want to know, which region of the source it came from. >> >> I think that one possible solution is to create a source component that stores the starting position of each neutron in a new variable. Then, the detector reads this new variable. Maybe this can be done using store_neutron() also, but i dont know how to read the trace-history. >> >> if you know a better solution, please tell me. >> >> Thank you very much. >> >> Federico. >> >> >> _______________________________________________ >> mcstas-users mailing list >> mcstas-users at mcstas.org >> http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users