Skip to content

Commit 9d7d89d

Browse files
committed
fix to CrsAng for min/max bug
1 parent 616bbdb commit 9d7d89d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

GSASII/GSASIIlattice.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2662,7 +2662,10 @@ def CrsAng(H,cell,SGData):
26622662
DR = np.inner(H3,np.inner(G,H3))
26632663
DHR = np.inner(H,np.inner(G,H3))
26642664
DHR /= np.sqrt(DR*DH)
2665-
phi = acosd(max(-1,min(DHR,1.)))
2665+
if DHR.shape:
2666+
phi = acosd(DHR)
2667+
else:
2668+
phi = acosd(max(-1,min(DHR,1.)))
26662669
if Laue == '-1':
26672670
BA = H.T[1]*a/(b-H.T[0]*cosd(ga))
26682671
BB = H.T[0]*sind(ga)**2

0 commit comments

Comments
 (0)