From jean-francois.moulin at hereon.de Mon May 2 16:37:08 2022 From: jean-francois.moulin at hereon.de (Jean-Francois Moulin) Date: Mon, 2 May 2022 16:37:08 +0200 Subject: [mcstas-users] introducing an absorber inside a guide Message-ID: Hello, I am trying to simulate a setup (based on elliptic-guide-gravity) where I need to insert an absorber in the middle of the guide. Is there a conventional method to achieve this or do I need to modify the code at the component level? Any hint appreciated. JF -- Dr. Jean-Fran?ois Moulin German Engineering Materials Science Centre (GEMS) at Heinz Maier-Leibnitz Zentrum (MLZ) Helmholtz-Zentrum Hereon Lichtenbergstr. 1, 85747 Garching bei M?nchen, Germany phone: +49-89-158860-762; email: jean-francois.moulin at hereon.de Bitte beachten Sie: Die Helmholtz-Zentrum Geesthacht - Zentrum f?r Material- und K?stenforschung GmbH hat sich am 31.03.2021 in Helmholtz-Zentrum hereon GmbH umbenannt. Informationen dazu finden Sie unter www.hereon.de/name Please note: Since the 31st of March 2021 the Helmholtz-Zentrum Geesthacht ? Center for Materials and Coastal Research has a new name: Helmholtz-Zentrum hereon GmbH. More information www.hereon.de/rebranding ------------------------------------------------------------------------------ Helmholtz-Zentrum hereon GmbH Max-Planck-Stra?e 1 I 21502 Geesthacht I Deutschland/Germany Gesch?ftsf?hrung I Board of Management: Prof. Dr. Matthias Rehahn, Silke Simon Vorsitzender des Aufsichtsrates I Chairman of the Supervisory Board: Ministerialdirigent Engelbert Beyer Amtsgericht L?beck HRB 285 GE (Register Court) Internet: www.hereon.de From santiago.miguel.gomez at gmail.com Mon May 2 23:24:54 2022 From: santiago.miguel.gomez at gmail.com (=?UTF-8?Q?Santiago_G=C3=B3mez?=) Date: Mon, 2 May 2022 18:24:54 -0300 Subject: [mcstas-users] definition parameters - version 3.1 Message-ID: Hello, I can not longer compile instruments with components that use definition parameters as input variables for the new version 3.1 of mcstas. Are definition parameter still available for this new version? With best regards Santiago -- Santiago Miguel G?mez Si queremos un mundo de paz y de justicia hay que poner decididamente la inteligencia al servicio del amor. Antoine de Saint-Exupery -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkwi at fysik.dtu.dk Tue May 3 09:38:41 2022 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Tue, 3 May 2022 07:38:41 +0000 Subject: [mcstas-users] introducing an absorber inside a guide In-Reply-To: References: Message-ID: <7230400B-5301-488E-BFA6-B1745FDB6394@fysik.dtu.dk> Dear Jean-Francois, Unfortunately there is no easy way of achieving this using the McStas grammar by itself, so some coding on your behalf is required. Since we are in the middle of an elliptical guide, my advice would be to split the guide in 2-3 sections: ? An expanding elliptic section ? A straight part - where we will place the absorber ? A focusing elliptic section The straight part can then either be written as a dedicated component or approximated by putting together ?simpler parts?, i.e. perhaps a GROUP of an absorber and a straight guide or depending on your needs, perhaps a guide section with an EXTEND eating away the central part of the beam. If you try with a GROUP my feeling is that you will get the most mileage from putting the absorber ?first? in the GROUP and ensure that every ?Absorbed? neutron raises a SCATTER. Best and good luck, contact me off-list if you need further tips, Peter > On 2 May 2022, at 16.37, Jean-Francois Moulin wrote: > > Hello, > > > I am trying to simulate a setup (based on elliptic-guide-gravity) where I need to insert an absorber in the middle of the guide. > > Is there a conventional method to achieve this or do I need to modify the code at the component level? > > Any hint appreciated. > > JF > > > -- > Dr. Jean-Fran?ois Moulin > German Engineering Materials Science Centre (GEMS) > at Heinz Maier-Leibnitz Zentrum (MLZ) > Helmholtz-Zentrum Hereon > Lichtenbergstr. 1, 85747 Garching bei M?nchen, Germany > phone: +49-89-158860-762; email: jean-francois.moulin at hereon.de > > > > > Bitte beachten Sie: Die Helmholtz-Zentrum Geesthacht - Zentrum f?r Material- und K?stenforschung GmbH hat sich am 31.03.2021 in Helmholtz-Zentrum hereon GmbH umbenannt. Informationen dazu finden Sie unter www.hereon.de/name > > Please note: Since the 31st of March 2021 the Helmholtz-Zentrum Geesthacht ? Center for Materials and Coastal Research has a new name: Helmholtz-Zentrum hereon GmbH. More information www.hereon.de/rebranding > > ------------------------------------------------------------------------------ > Helmholtz-Zentrum hereon GmbH > Max-Planck-Stra?e 1 I 21502 Geesthacht I Deutschland/Germany > > Gesch?ftsf?hrung I Board of Management: Prof. Dr. Matthias Rehahn, Silke Simon > Vorsitzender des Aufsichtsrates I Chairman of the Supervisory Board: Ministerialdirigent Engelbert Beyer > Amtsgericht L?beck HRB 285 GE (Register Court) > Internet: www.hereon.de > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > https://mailman2.mcstas.org/mailman/listinfo/mcstas-users From pkwi at fysik.dtu.dk Tue May 3 09:47:06 2022 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Tue, 3 May 2022 07:47:06 +0000 Subject: [mcstas-users] definition parameters - version 3.1 In-Reply-To: References: Message-ID: Dear Santiago, Your observation is correct, definition parameters are no longer supported by McStas 3.x components. Most functionality that used definition parameters in the past can however be implemented using other functionality, for instance * string parm=?some_filename? (or initialise by a char[n] variable from your instrument) * vector parm={a,b,c,d} (or initialise by a pointer from your instrument) * Or in the case where you need a ?symbol?, e.g. for measuring a ?flag? in the instrument, use the new USERVAR feature of the instrument and use a component string variable to probe the user variable via particle_getvar() For details in the direction of porting instruments and components from McStas 2.x to 3.x please consult one of HOWTO: Modifying a McStas 2 instrument for use under McStas 3 HOWTO: Modifying a McStas 2 component for use under McStas 3 If you still fail to port your component(s), please send an example instrument + the relevant component and we will find a way together. Best, Peter On 2 May 2022, at 23.24, Santiago G?mez > wrote: Hello, I can not longer compile instruments with components that use definition parameters as input variables for the new version 3.1 of mcstas. Are definition parameter still available for this new version? With best regards Santiago -- Santiago Miguel G?mez Si queremos un mundo de paz y de justicia hay que poner decididamente la inteligencia al servicio del amor. Antoine de Saint-Exupery _______________________________________________ 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 erik.knudsen at copenhagenatomics.com Tue May 3 09:55:02 2022 From: erik.knudsen at copenhagenatomics.com (=?UTF-8?Q?Erik_Bergb=C3=A4ck_Knudsen?=) Date: Tue, 3 May 2022 09:55:02 +0200 Subject: [mcstas-users] definition parameters - version 3.1 In-Reply-To: References: Message-ID: Dear Santiago, No - DEFINITION parameters are no longer available in the 3.x-series, for various technical reasons. Please see https://github.com/McStasMcXtrace/McCode/wiki/HOWTO%3A-Modifying-a-McStas-2-component-for-use-under-McStas-3 and https://github.com/McStasMcXtrace/McCode/wiki/HOWTO%3A-Modifying-a-McStas-2-instrument-for-use-under-McStas-3 for instructions on how to modify your code such that it will work under 3.x Rest assured :-) - it is usually rather easy to convert , but should you run into problems the team is always happy to help. ... and on the bright side - definition parameters tend to be difficult to debug, so removing them will likely help you in the long run. cheers Erik On Mon, May 2, 2022 at 11:25 PM Santiago G?mez < santiago.miguel.gomez at gmail.com> wrote: > Hello, > > I can not longer compile instruments with components that use definition > parameters as input variables for the new version 3.1 of mcstas. > > Are definition parameter still available for this new version? > > > With best regards > Santiago > > -- > Santiago Miguel G?mez > > Si queremos un mundo de paz y de justicia hay que poner decididamente la inteligencia > al servicio del amor. Antoine de Saint-Exupery > _______________________________________________ > 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 santiago.miguel.gomez at gmail.com Tue May 3 19:30:05 2022 From: santiago.miguel.gomez at gmail.com (=?UTF-8?Q?Santiago_G=C3=B3mez?=) Date: Tue, 3 May 2022 14:30:05 -0300 Subject: [mcstas-users] definition parameters - version 3.1 In-Reply-To: References: Message-ID: Dear Peter and Erik, thank your for the detailed answer! I think I can modify my code in the way you explain, at least for the most of the cases. For some other cases, I will have to modify other part of my code becouse I use the definition parameter into senteces like #if/#elif/#endif. I see that i will have to modify the DECLARE section too, as is detailed in the instructions. The more complicated part will be changing the #if/#elif/#endif parts (where I also do new #defines depending on the case). I will let you know how I am going with that, or if I need more help :) Regards Santiago On Tue, May 3, 2022 at 4:53 AM Erik Bergb?ck Knudsen < erik.knudsen at copenhagenatomics.com> wrote: > Dear Santiago, > No - DEFINITION parameters are no longer available in the 3.x-series, for > various technical reasons. > Please see > https://github.com/McStasMcXtrace/McCode/wiki/HOWTO%3A-Modifying-a-McStas-2-component-for-use-under-McStas-3 > and > > https://github.com/McStasMcXtrace/McCode/wiki/HOWTO%3A-Modifying-a-McStas-2-instrument-for-use-under-McStas-3 > for instructions on how to modify your code such that it will work under > 3.x > Rest assured :-) - it is usually rather easy to convert , but should you > run into problems the team is always happy to help. > > ... and on the bright side - definition parameters tend to be difficult > to debug, so removing them will likely help you in the long run. > cheers > Erik > On Mon, May 2, 2022 at 11:25 PM Santiago G?mez < > santiago.miguel.gomez at gmail.com> wrote: > >> Hello, >> >> I can not longer compile instruments with components that use definition >> parameters as input variables for the new version 3.1 of mcstas. >> >> Are definition parameter still available for this new version? >> >> >> With best regards >> Santiago >> >> -- >> Santiago Miguel G?mez >> >> Si queremos un mundo de paz y de justicia hay que poner decididamente la inteligencia >> al servicio del amor. Antoine de Saint-Exupery >> _______________________________________________ >> mcstas-users mailing list >> mcstas-users at mcstas.org >> https://mailman2.mcstas.org/mailman/listinfo/mcstas-users >> > -- Santiago Miguel G?mez Si queremos un mundo de paz y de justicia hay que poner decididamente la inteligencia al servicio del amor. Antoine de Saint-Exupery -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkwi at fysik.dtu.dk Sat May 14 20:39:56 2022 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Sat, 14 May 2022 18:39:56 +0000 Subject: [mcstas-users] Interesting McStas-related Post Doc position at PSI Message-ID: <25475BD3-EBF4-4BA7-A255-4EB50B95695B@fysik.dtu.dk> Dear all, An interesting Post Doc position is available within the Neutron Optics and Scientific Computing Group at PSI: https://www.psi.ch/en/pa/job-opportunities/51272-post-doc-in-neutron-instrumentation A central part of the position is expanding features of the McStas Union by adding support for reflectivity (and potentially refraction). Main tasks are: ? Simulation and code development for neutron optics ? Extend the Monte-Carlo Ray-tracing software McStas ? Design an advanced signal-to-noice enhancing neutron optics ? Conceptualize tutorials for users ? Participate in neutron scattering experiments For more information please refer to the link below or contact Dr. Christine Klauser > Best, 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: