[mcstas-users] Spin random
Петр Коник
104pet104 at gmail.com
Thu Apr 24 15:46:10 CEST 2025
Dear Peter,
Thanks for quick answer!
Can you elaborate a bit more on a situation where this component is useful? I understand what you are saying, but still can’t get why would I want this? For example, if I have an ideal polarizer, normally it would just set P=1 for every trajectory in the unpolarized beam. With spin_random I would lose half of all trajectories after such a polarizer.
My general feeling is that trajectories were never meant to be identified as real neutrons, so I’m struggling to understand the rationale behind this component.
I’m running 3.5.24, I will check the fix, thanks!
Best regards,
PK
> On 2025. Apr 24., at 15:37, Peter Kjær Willendrup <pkwi at dtu.dk> wrote:
>
> Hi Peter,
>
>
>> On 24 Apr 2025, at 13.55, Петр Коник via mcstas-users <mcstas-users at mcstas.org> wrote:
>>
>> Can you explain me the intended use of Spin_random component? What are the benefits of assigning polarization to trajectories before the polarizer?
>
> The component was mainly added to allow defining an “unpolarised beam” at the “full beam level” (i.e. with a set polarisation pr. ray but a net 0 polarisation) to allow comparing with all rays having sx=sy=sz=0 (i.e. with each ray unpolarised).
>
>> Moreover, when used in combination with Pol_Vmirror component it results in polarization over 1 if two components are rotated 90 degrees relative to each other.
>
> We have recently made a fix to that component (i.e. ~ 1 month ago) that I would think rectifies this problem - see https://github.com/mccode-dev/McCode/commit/55e3989eb05150a7671523749f30dd462e19b266.
> The logic is that a given polariser / analyser defines a definition of “up/down”, meaning post to “measurement” the other components should be put to zero.
>
> How recent a version are you running? Chances are that 3.5.25 (which is only on conda-forge at the moment) would fix this.
>
> Otherwise stay tuned for 3.5.26 that I can promote to become a “full” release including .deb packages, Windows installer etc.
>
>
> Best,
> Peter W
>
>
>
> Peter Kjær Willendrup
> Forskningsingeniør, Specialkonsulent
>
> DTU Physics
>
> <image001.gif>
>
>
> Technical University of Denmark
>
>
> <image002.gif>
>
>
> Department of Physics
> Fysikvej
> Building 307
> DK-2800 Kongens Lyngby
>
> Main office at
> ESS DMSC
> Building 305
> 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: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20250424/219dd784/attachment.htm>
More information about the mcstas-users
mailing list