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

Fixing multi_scat script #521

Merged
merged 2 commits into from
Oct 24, 2022
Merged

Fixing multi_scat script #521

merged 2 commits into from
Oct 24, 2022

Conversation

wpotrzebowski
Copy link

Simple fix to make multiple scattering script running

@@ -472,7 +472,7 @@ def __init__(self, qmin=None, qmax=None, nq=None, window=2,
# 1-D radial profile is determined by the q values we need to
# compute, either for the calculated q values for the resolution
# function (if any) or for the raw q values desired
self._q = np.linspace(qmin, qmax, nq//(2*window))
self._q = np.linspace(qmin, qmax, nq//int(2*window))
Copy link
Contributor

@pkienzle pkienzle Oct 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember what the code is doing so I don't know what self._q should be. My guess is that older numpy implicitly wrapped the floating point length argument with int, so int(nq//(2*window)) is a safer choice.

Note: edited for clarity

@pkienzle pkienzle merged commit 9374038 into master Oct 24, 2022
@pkienzle pkienzle deleted the multi_scat branch November 4, 2022 19:37
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.

2 participants