Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximum number of rays fixed at init #2

Open
shervin86 opened this issue Sep 20, 2021 · 0 comments
Open

Maximum number of rays fixed at init #2

shervin86 opened this issue Sep 20, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@shervin86
Copy link
Collaborator

There is one common way in McStas to increase the number of rays during the simulation, which is called SPLIT, it just divides the weight of one ray into a number of rays with identical state but smaller weight. This is usually used late in the instrument, so most rays won't reach a SPLIT statement. It means that for example changing the wavelength simulated, the number of neutrons reaching the SPLIT statement can change wildly, and so can the number of rays reaching the component that saves to openPMD. Even to more rays than originally simulated. So my bet is that it will happen, the question is how to handle it well.

If starting a new file is too much work (completely fair) I think throwing an error would be best, as taking a subset of the simulated rays would provide a wrong overall intensity, which is one of the more important aspects of the simulation.

Originally posted by @mads-bertelsen in #1 (comment)

@shervin86 shervin86 changed the title There is one common way in McStas to increase the number of rays during the simulation, which is called SPLIT, it just divides the weight of one ray into a number of rays with identical state but smaller weight. This is usually used late in the instrument, so most rays won't reach a SPLIT statement. It means that for example changing the wavelength simulated, the number of neutrons reaching the SPLIT statement can change wildly, and so can the number of rays reaching the component that saves to openPMD. Even to more rays than originally simulated. So my bet is that it will happen, the question is how to handle it well. Maximum number of rays fixed at init Sep 20, 2021
@shervin86 shervin86 self-assigned this Sep 20, 2021
@shervin86 shervin86 added the bug Something isn't working label Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant