You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create a Voronoi diagram from a lagrangian simulation where I have particles. The expectations for the particles in terms of the PDF of the Voronoi cell areas are good; however when I look at the diagram I see some empty spaces.
Here is an example:
Steps to Reproduce
L=2*pipath_npz=appendpath+'lagr/output/npz/'coord_tra=np.load(path_npz+'./xycoord.%.2d.npz'%(irun))
xtra=coord_tra['x']
ytra=coord_tra['y']
flatxy=zip_xy(xtra,ytra,ifr)
voro=freud.locality.Voronoi()
flatxy3d=flat2dto3d_shift(flatxy,-pi)
box=freud.box.Box.square(L)
voro.compute((box, flatxy3d))
vol=voro.volumes# Plot Voronoi with points and a custom cmapplt.figure()
ax=plt.gca()
voro.plot(ax=ax, cmap="RdBu")
ax.scatter(flatxy3d[:, 0], flatxy3d[:, 1], s=2, c="k")
plt.savefig('./lagr/output/img/vordiag.png')
plt.show()
Error Output
There is no output error, just a visualization issue.
freud Version
v3.1.0
Python Version
v3.13.0
System Platform
MacOS
Installation method
Download from conda-forge
Developer
None
The text was updated successfully, but these errors were encountered:
I see that you are converting your points from 2D to 3D. Can you confirm that this is done correctly in your snippet? z values should all be zero if system is 2D.
Description
Hello,
I am trying to create a Voronoi diagram from a lagrangian simulation where I have particles. The expectations for the particles in terms of the PDF of the Voronoi cell areas are good; however when I look at the diagram I see some empty spaces.
Here is an example:
Steps to Reproduce
Error Output
freud Version
v3.1.0
Python Version
v3.13.0
System Platform
MacOS
Installation method
Download from conda-forge
Developer
None
The text was updated successfully, but these errors were encountered: