Changeset 3224
- Timestamp:
- Jan 14, 2018 3:58:51 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIspc.py
r3221 r3224 2115 2115 2116 2116 def getTauT(tau,sop,ssop,XYZ,wave=np.zeros(3)): 2117 phase = 4.*np.pi*np.sum(XYZ*wave)2117 phase = np.sum(XYZ*wave) 2118 2118 ssopinv = nl.inv(ssop[0]) 2119 2119 mst = ssopinv[3][:3] -
trunk/GSASIIstrMath.py
r3219 r3224 684 684 if not Xdata.size: #no atoms in phase! 685 685 return 686 if parmDict[pfx+'isMag']: 686 if parmDict[pfx+'isMag']: #TODO: fix the math - mag moments now along crystal axes 687 687 Mag = np.sqrt(np.sum(Gdata**2,axis=0)) #magnitude of moments for uniq atoms 688 688 Gdata = np.where(Mag>0.,Gdata/Mag,0.) #normalze mag. moments … … 692 692 Gdata = np.hstack((Gdata,-Gdata)) #inversion if any 693 693 Gdata = np.hstack([Gdata for icen in range(Ncen)]) #dup over cell centering 694 # GSASIIpath.IPyBreak()695 694 Gdata = SGData['MagMom'][nxs,:,nxs]*Gdata #flip vectors according to spin flip * det(opM) 696 695 Gdata = np.inner(Amat,Gdata.T) #convert back to cart. space MXYZ, Natoms, NOps*Inv*Ncen … … 761 760 Tindx = np.array([refDict['FF']['El'].index(El) for El in Tdata]) 762 761 FF = np.repeat(refDict['FF']['FF'][iBeg:iFin].T[Tindx].T,len(SGT)*len(TwinLaw),axis=0) 763 if 'N' in calcControls[hfx+'histType'] and parmDict[pfx+'isMag']: 762 if 'N' in calcControls[hfx+'histType'] and parmDict[pfx+'isMag']: #TODO: math here?? 764 763 MF = refDict['FF']['MF'][iBeg:iFin].T[Tindx].T #Nref,Natm 765 764 TMcorr = 0.539*(np.reshape(Tiso,Tuij.shape)*Tuij)[:,0,:]*Fdata*Mdata*MF/(2*Nops) #Nref,Natm … … 990 989 :returns: dict dFdvDict: dictionary of derivatives 991 990 ''' 991 #TODO: fix mag math - moments parallel to crystal axes 992 992 ast = np.sqrt(np.diag(G)) 993 993 Mast = twopisq*np.multiply.outer(ast,ast) -
trunk/imports/G2phase.py
r3221 r3224 239 239 Ptype = 'nuclear' 240 240 elif NPhas[result] in ['2','3']: 241 Ptype = 'nuclear' 242 # Ptype = 'magnetic' 243 # MagDmin = 1.0 241 Ptype = 'magnetic' 242 MagDmin = 1.0 244 243 elif NPhas[result] == '4': 245 244 Ptype = 'macromolecular' … … 266 265 SpnFlp = np.where(SpnFlp==0,1,SpnFlp) 267 266 if SGData['SpGrp'][0] in ['A','B','C','I','R','F']: 268 SpnFlp +=[1,1,1,1]267 SpnFlp = list(SpnFlp)+[1,1,1,1] 269 268 elif 'MXDSTR' in key: 270 269 MagDmin = float(EXPphase[key][:10]) … … 317 316 mag = np.sqrt(np.sum(mom**2)) 318 317 mom = np.inner(Bmat,mom)*mag 319 print (mom,mag)320 318 Atoms[-1] = Atom[:7]+list(mom)+Atom[7:] 321 319 elif Ptype == 'macromolecular':
Note: See TracChangeset
for help on using the changeset viewer.