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

Scipy/numpy implementation of the French & Wilson algorithm #2100

Merged
merged 14 commits into from
Jun 1, 2022

Conversation

rjgildea
Copy link
Contributor

@rjgildea rjgildea commented Apr 28, 2022

This implementation uses the standardized median as an M-estimator for the average intensity of resolution bins, as mentioned in #2067 (comment) which makes the procedure robust against the presence of very negative intensities as highlighted in that issue.

The choice between the new dials and existing cctbx implementations can be made using the parameter french_wilson.implementation=dials|cctbx.

Resolves #2067

rjgildea and others added 3 commits April 28, 2022 17:26
As used in the phenix "massage_intensities" option.
This uses the formula |F| = sqrt((Io+sqrt(Io**2 +2sigma**2))/2.0)
to obtain amplitudes if fewer than min_reflection (default=200)
are present.
@codecov
Copy link

codecov bot commented May 4, 2022

Codecov Report

Merging #2100 (1c5028f) into main (7d389fe) will increase coverage by 0.04%.
The diff coverage is 98.85%.

❗ Current head 1c5028f differs from pull request most recent head 18230c2. Consider uploading reports for the commit 18230c2 to get more accurate results

@@            Coverage Diff             @@
##             main    #2100      +/-   ##
==========================================
+ Coverage   80.31%   80.36%   +0.04%     
==========================================
  Files         576      578       +2     
  Lines       65245    65413     +168     
  Branches     9208     9219      +11     
==========================================
+ Hits        52402    52567     +165     
- Misses      10805    10806       +1     
- Partials     2038     2040       +2     

Copy link
Contributor

@jbeilstenedmands jbeilstenedmands left a comment

Choose a reason for hiding this comment

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

I tested this on some ssx data that gets very weak/noisy at higher resolution, and the new implementation clearly handles the weak data better.
This PR:
newplot - 2022-06-01T154522 514
Current main:
newplot - 2022-06-01T154647 963

It seems to do that by filtering out more of the data, which is probably the right thing to do in this case.

@ndevenish ndevenish merged commit e0f4934 into main Jun 1, 2022
@ndevenish ndevenish deleted the french-wilson branch June 1, 2022 19:11
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.

Very negative merged intensities mess up French/Wilson scaling
4 participants