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

Implement proper map normalization #31

Merged
merged 5 commits into from
Dec 4, 2023
Merged

Implement proper map normalization #31

merged 5 commits into from
Dec 4, 2023

Conversation

dennisbrookner
Copy link
Member

The map normalization that was used prior to this PR was very hacky, inconsistent across datasets, and led to confusion when using coot's vs. PyMOL's contour levels. Key improvements:

  • The mostly-full-of-zeros maps created by matchmaps are never subjected to gemmi's "normalize" feature, which operates over the entire unit cell. Doing so led to the zeros being replaced with some constant, small, non-zero value, and messed up everything downstream. Rather, normalization (enforcing mean=0, std=1) is only ever performed on non-zero voxels.
  • The final "unmasked" output map has matching values for "sigma" and "electrons / cubic Angstrom" by virtue of its creation. This (in combination with turning off the "normalize maps" feature in PyMOL) solves the issue of inconsistent contour levels between coot and PyMOL. The sigma and e/A^3 values differ slightly in the "masked" output, which is unavoidable, but the raw e/A^3 values match between the masked and unmasked versions.

@dennisbrookner dennisbrookner merged commit ce6dd6a into main Dec 4, 2023
4 checks passed
@dennisbrookner dennisbrookner deleted the debugging branch December 4, 2023 16:29
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