Skip to content

Commit 616bbdb

Browse files
committed
fix OOB acos value that breaks refinement
1 parent eed9876 commit 616bbdb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

GSASII/GSASIIlattice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2662,7 +2662,7 @@ 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(DHR)
2665+
phi = acosd(max(-1,min(DHR,1.)))
26662666
if Laue == '-1':
26672667
BA = H.T[1]*a/(b-H.T[0]*cosd(ga))
26682668
BB = H.T[0]*sind(ga)**2

0 commit comments

Comments
 (0)