When calculating the Delaunay triangles, an error occurs in the case of point groups with openphi==True. The number of triangles depends on the number of octants and nodes of the grid, whereby (nKnots-1)**2 triangles are obtained for one octant.
As can be seen for D2h, this is true for openphi==False. For the example C4h, however, too many triangles are obtained. Several errors lead to this:
for triangles near the pole, due to the symmetry conditions, two points of the triangle have the identical angles, so that a line is obtained instead of a triangle (e.g. triangle [1 2 2]). These triangles are then sorted out on the basis of their area (line 190-192), which means that these angles do not (fully) contribute to the spectrum.
since too many triangles are obtained despite the sorting out of "triangles" with an area of 0, there must still be triangles that are obtained more than once. I have not yet investigated this in more detail, for this you would have to look at the indices of all triangles obtained.
This bug should only have a minor effect, as the majority of triangles are correct and the proportion decreases as the grid size increases.
When calculating the Delaunay triangles, an error occurs in the case of point groups with
openphi==True
. The number of triangles depends on the number of octants and nodes of the grid, whereby (nKnots-1)**2 triangles are obtained for one octant.As can be seen for D2h, this is true for
openphi==False
. For the example C4h, however, too many triangles are obtained. Several errors lead to this:This bug should only have a minor effect, as the majority of triangles are correct and the proportion decreases as the grid size increases.
D2h:
Output:
D2h_matlab.pdf
C4h
Output:
C4h.pdf
Both plots were obtained by adding the following code in sphgrid.m (line 190-194):