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

McStas: single_crystal(powder=1) is not functional. McXtrace is OK #1732

Closed
farhi opened this issue Oct 10, 2024 · 3 comments
Closed

McStas: single_crystal(powder=1) is not functional. McXtrace is OK #1732

farhi opened this issue Oct 10, 2024 · 3 comments

Comments

@farhi
Copy link
Contributor

farhi commented Oct 10, 2024

The single_crystal(powder=1) component does not provide the proper results. The equivalent McXtrace implementation works nicely.
I recommend comparing the two components, and fix the neutron side...

@farhi
Copy link
Contributor Author

farhi commented Oct 10, 2024

It seems to be related to line ~1348 in the McStas version:

        component_vx = vx;
        component_vy = vy;
        component_vz = vz;

which then overrides any powder mode rotation at line ~1543:

        vx = component_vx;
        vy = component_vy;
        vz = component_vz;

these lines are not present in the X-ray version.

@farhi
Copy link
Contributor Author

farhi commented Oct 11, 2024

The commit responsible for this change is:

@farhi
Copy link
Contributor Author

farhi commented Oct 11, 2024

I recommend a revert...

willend added a commit that referenced this issue Oct 11, 2024
McStas: Fix #1732: Single_crystal powder mode was broken by #1521
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant