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

Scale method changed #83

Closed
wants to merge 1 commit into from
Closed

Conversation

Junschen1
Copy link

Find the position of the strongest central spot and subtract its intensity to further determine the brightness of the strongest diffraction point

Comment on lines +118 to +119
max_row = np.argmax(img) // img.shape[1]
max_col = np.argmax(img) % img.shape[1]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
max_row = np.argmax(img) // img.shape[1]
max_col = np.argmax(img) % img.shape[1]
max_row, max_col = np.unravel_index(np.argmax(img), img.shape)

Comment on lines +120 to +122
for k in range(20):
for l in range(20):
img[max_row - k + 10][max_col - l + 10] = 1
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for k in range(20):
for l in range(20):
img[max_row - k + 10][max_col - l + 10] = 1
img[max_row - 10: max_row + 10, max_col - 10: max_col + 10] = 1

@stefsmeets
Copy link
Member

Hi @Junschen1 thanks for the pull request. It seems like this finds the largest value over all images, but also sets a 20x20 window around the primary beam to 1.

I just pushed a similar change yesterday: #82

Could you see if that works for you?

@stefsmeets
Copy link
Member

I'm going to close this because of inactivity, feel free to re-open to update the PR.

@stefsmeets stefsmeets closed this Jan 23, 2024
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