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

Theta offset fix #116

Merged
merged 4 commits into from
Apr 14, 2021
Merged

Theta offset fix #116

merged 4 commits into from
Apr 14, 2021

Conversation

bmaranville
Copy link
Member

This fix should address the Q-range for PolarizedNeutronProbe not matching the Q-range for the cross-sections in the Probe, when a non-zero theta_offset is present in one of the cross-sections (#114)

Uses a the cached self.calc_Qo if the theta_offset values in the cross-sections do not change.
If all the theta_offset values are the same, it does a minimal calculation to update Q (this is a common situation)
If all the theta_offset values are not all the same, and they change, a full calculation of the probe Q the (measurement_union(xs)) is called.

@bmaranville
Copy link
Member Author

Tested, seems to show 10% slowdown in fits in worst case (single layer with microstepping disabled to emphasize model stepping overhead)

@bmaranville bmaranville merged commit 7ef7e4b into master Apr 14, 2021
@bmaranville bmaranville deleted the theta_offset_fix branch April 14, 2021 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant