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

Add unit cell angle distribution plots to cluster plotting code #2197

Merged
merged 7 commits into from
Aug 12, 2022

Conversation

jbeilstenedmands
Copy link
Contributor

This PR add plots of unit cell angle distributions to the unit cell cluster plotting code, e.g.
newplot - 2022-08-09T094814 213
Distributions are only plotted for non-symmetry constrained angles, e.g. won't appear for cubic crystals, only beta distribution plotted for P2.

I have also implemented a heatmap version of the unit cell scatter plot to the cluster plotting code. For now I have implemented this as an option and kept the default as before for dials.cosym, xia2.multiplex etc, but I have added the new version to the dials.merge report :
New option:
newplot - 2022-08-09T094923 494
Default:
newplot - 2022-08-09T095209 856
As you can see, the default is probably more appropriate for up to several hundred crystals (the plots here are 34 crystals), but when you get into the 1000s, I think the heatmap is a more useful plot due to the point crowding.

@codecov
Copy link

codecov bot commented Aug 9, 2022

Codecov Report

Merging #2197 (1a4f6a4) into main (6a7ada4) will increase coverage by 0.01%.
The diff coverage is 92.59%.

@@            Coverage Diff             @@
##             main    #2197      +/-   ##
==========================================
+ Coverage   80.65%   80.66%   +0.01%     
==========================================
  Files         588      588              
  Lines       66601    66920     +319     
  Branches     9393     9476      +83     
==========================================
+ Hits        53718    53982     +264     
- Misses      10804    10850      +46     
- Partials     2079     2088       +9     

Copy link
Contributor

@rjgildea rjgildea left a comment

Choose a reason for hiding this comment

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

Thanks for adding this, it would be good to see some examples for SSX data, i.e. with 1000s of unit cells. For the scatter plot version improvements it might be worth exploring adding alpha levels to help reduce overcrowding of the plot (although probably outside of the scope of this PR).

newsfragments/2197.feature Outdated Show resolved Hide resolved
src/dials/algorithms/clustering/plots.py Outdated Show resolved Hide resolved
Co-authored-by: Richard Gildea <rjgildea@users.noreply.github.com>
@jbeilstenedmands jbeilstenedmands merged commit 722b5a4 into main Aug 12, 2022
@jbeilstenedmands jbeilstenedmands deleted the add_uc_plots_to_merge_html branch August 12, 2022 14:57
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.

None yet

3 participants