Skip to content

Commit a722e40

Browse files
committed
fix bad CW bug in profile calculations
1 parent 43dd1db commit a722e40

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

GSASII/GSASIIpwd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,7 @@ def getFCJVoigt3(pos,sig,gam,shl,xdata):
13261326
returns: array: calculated peak function at each xdata
13271327
returns: integral of peak; nominally = 1.0
13281328
'''
1329-
if len(xdata):
1329+
if len(xdata)>1:
13301330
cw = np.diff(xdata)
13311331
cw = np.append(cw,cw[-1])
13321332
Df = pyd.pypsvfcjo(len(xdata),xdata-pos,pos,sig,gam,shl)
@@ -1364,7 +1364,7 @@ def getExpFCJVoigt3(pos,alp,bet,sig,gam,shl,xdata):
13641364
returns: array: calculated peak function at each xdata
13651365
returns: integral of peak; nominally = 1.0
13661366
'''
1367-
if len(xdata):
1367+
if len(xdata)>1:
13681368
cw = np.diff(xdata)
13691369
cw = np.append(cw,cw[-1])
13701370
Df = pyd.pypsvfcjexpo(len(xdata),xdata-pos,pos,alp,bet,sig,gam,shl)

0 commit comments

Comments
 (0)