-
Notifications
You must be signed in to change notification settings - Fork 29
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
Compute and plot 2D ring geometry #460
Conversation
Dear @swhite2401, I think there is some problem with the radius computation. When asking for centered=True for a ring lattice, the output radius is zero, and thus the coordinates are unchanged. The resulting figure is not centered on zero.
When computing the coordinates for a subset of the lattice, the radius seems also not correctly computed: resulting figure is not centered on zero.
I expected the radius to be independent of the portion of lattice requested (unless it is just a drift). |
@simoneliuzzo, @lfarv, I think this version fixes the issues you have found. The main difference is that now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems ok now !
This is based on the code proposed by @simoneliuzzo in #433.
Two functions are provided:
ring.get_geometry()
to compute the ring geometryring.plot_geometry()
to plot and compute the ring geometry