Skip to content

Commit 4e4d63a

Browse files
committed
another fix in strfctrderiv2
1 parent 9cdc647 commit 4e4d63a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

GSASII/GSASIIstrMath.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,9 +1293,6 @@ def StructureFactorDerv2(refDict,G,hfx,pfx,SGData,calcControls,parmDict):
12931293
ORBtables = calcControls['ORBtables']
12941294
BLtables = calcControls['BLtables']
12951295
hType = calcControls[hfx+'histType']
1296-
TwinLaw = np.array([[[1,0,0],[0,1,0],[0,0,1]],])
1297-
if 'S' in hType:
1298-
TwinLaw = calcControls[phfx+'TwinLaw']
12991296
Amat,Bmat = G2lat.Gmat2AB(G)
13001297
nRef = len(refDict['RefList'])
13011298
Tdata,Mdata,Fdata,Xdata,dXdata,IAdata,Uisodata,Uijdata,Gdata = \
@@ -1306,6 +1303,9 @@ def StructureFactorDerv2(refDict,G,hfx,pfx,SGData,calcControls,parmDict):
13061303
mSize = len(Mdata)
13071304
nOps = len(SGMT)
13081305
pMul = 2.0
1306+
if SGData['SGInv']:
1307+
nOps *= 2
1308+
# pMul *= 2.0
13091309
if calcControls[hfx+'histType'][1:3] in ['NA','NB','NC']:
13101310
FP,FPP = G2el.BlenResCW(Tdata,BLtables,parmDict[hfx+'Lam'])
13111311
elif 'X' in calcControls[hfx+'histType']:
@@ -1349,10 +1349,10 @@ def StructureFactorDerv2(refDict,G,hfx,pfx,SGData,calcControls,parmDict):
13491349
Uniq = np.inner(H,SGMT) # array(nSGOp,3,3)
13501350
Phi = np.inner(H,SGT)
13511351
if SGData['SGInv']:
1352-
Uniq = np.dstack((Uniq,-Uniq))
1353-
Phi = np.dstack((Phi,-Phi))
1352+
Uniq = np.hstack((Uniq,-Uniq))
1353+
Phi = np.hstack((Phi,-Phi))
13541354
Tindx = np.array([refDict['FF']['El'].index(El) for El in Tdata])
1355-
FFR = np.repeat(refDict['FF']['FF'][iBeg:iFin].T[Tindx].T,nOps*len(TwinLaw),axis=0)
1355+
FFR = np.repeat(refDict['FF']['FF'][iBeg:iFin].T[Tindx].T,nOps,axis=0)
13561356
FFI = np.zeros_like(FFR)
13571357
phase = twopi*(np.inner(Uniq,(dXdata+Xdata).T).T+Phi.T).T
13581358
sinp = np.sin(phase) #refBlk x nOps x nAtoms

0 commit comments

Comments
 (0)