Skip to content

Commit e59fc05

Browse files
committed
update call to sph_harm_y for scipy 1.15.1+
1 parent f4e280a commit e59fc05

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

GSASII/GSASIIlattice.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2993,7 +2993,7 @@ def SHarmcal(SytSym,SHFln,psi,gam):
29932993
Presently only used for plotting
29942994
Note that the the number of gam values must either be 1 or must match psi
29952995
2996-
:param str SytSym: sit symmetry - only looking for cubics - remove this
2996+
:param str SytSym: site symmetry - only looking for cubics
29972997
:param dict SHFln: spherical harmonics coefficients; key has L & M
29982998
:param float/array psi: Azimuthal coordinate 0 <= Th <= 360
29992999
:param float/array gam: Polar coordinate 0<= Ph <= 180
@@ -3038,8 +3038,11 @@ def SphHarmAng(L,M,P,Th,Ph):
30383038
30393039
:returns ylmp value/array: as reals
30403040
'''
3041-
ylmp = spsp.sph_harm(M,L,rpd*Th,rpd*Ph) #wants radians; order then degree; not normalized
3041+
try:
3042+
ylmp = spsp.sph_harm_y(L,M,rpd*Th,rpd*Ph)
3043+
except AttributeError:
30423044
#### TODO: this will be deprecated in future scipy; new one sph_harm_y in scipy 1.15.1
3045+
ylmp = spsp.sph_harm(M,L,rpd*Th,rpd*Ph) #wants radians; order then degree
30433046

30443047
if M > 0:
30453048
return (-1)**M*P*np.real(ylmp)*SQ2

0 commit comments

Comments
 (0)