Changeset 3295
- Timestamp:
- Feb 22, 2018 11:01:07 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIElem.py
r3191 r3295 380 380 nt = -nfb[:,np.newaxis]*SQ 381 381 MMF = np.sum(mfa[:,np.newaxis]*np.exp(mt)[:],axis=0)+El['mfc'] 382 MMF0 = np.sum(mfa)+El['mfc'] 382 383 NMF = np.sum(nfa[:,np.newaxis]*np.exp(nt)[:],axis=0)+El['nfc'] 383 return MMF+(2.0/El['gfac']-1.0)*NMF 384 NMF0 = np.sum(nfa)+El['nfc'] 385 MF0 = MMF0+(2.0/El['gfac']-1.0)*NMF0 386 return (MMF+(2.0/El['gfac']-1.0)*NMF)/MF0 384 387 385 388 def BlenResCW(Els,BLtables,wave): -
trunk/GSASIIphsGUI.py
r3291 r3295 2499 2499 ci = colLabels.index('I/A') 2500 2500 ID = atomData[r][ci+8] 2501 SGData = generalData['SGData'] 2501 2502 if Atoms.GetColLabelValue(c) in ['x','y','z']: 2502 2503 ci = colLabels.index('x') … … 2506 2507 SScol = colLabels.index('site sym') 2507 2508 Mulcol = colLabels.index('mult') 2508 E,SGData = G2spc.SpcGroup(generalData['SGData']['SpGrp'])2509 2509 Sytsym,Mult = G2spc.SytSym(XYZ,SGData)[:2] 2510 2510 atomData[r][SScol] = Sytsym … … 2556 2556 ci = colLabels.index('I/A') 2557 2557 atomData[r][c] = atomData[r][c].replace(rbAtmDict.get(atomData[r][ci+8],''),'') 2558 elif Atoms.GetColLabelValue(c) in ['Mx','My','Mz']: 2559 value = atomData[r][c] 2560 cx = colLabels.index('x') 2561 SpnFlp = generalData['SGData']['SpnFlp'] 2562 SytSym,Mul,Nop,dupDir = G2spc.SytSym(atomData[r][cx:cx+3],SGData) 2563 CSI = G2spc.GetCSpqinel(SytSym,SpnFlp,dupDir) 2564 iM = CSI[0][c-colLabels.index('Mx')] 2565 for i in range(3): 2566 if iM == CSI[0][i]: 2567 atomData[r][i+colLabels.index('Mx')] = value*CSI[1][i] 2558 2568 if 'Atoms' in data['Drawing']: 2559 2569 ci = colLabels.index('I/A') … … 2720 2730 if not SGData['SGGray']: 2721 2731 CSI = G2spc.GetCSpqinel(SytSym,SpnFlp,dupDir) 2722 #print (SytSym,Nop,SpnFlp[Nop],CSI,dupDir)2732 print (SytSym,Nop,SpnFlp[Nop],CSI,dupDir) 2723 2733 for i in range(3): 2724 2734 ci = i+colM … … 2728 2738 Atoms.SetCellStyle(row,ci,WHITE,False) 2729 2739 Atoms.SetCellTextColour(row,ci,BLACK) 2730 2731 2740 if 'X' in rbExcl: 2732 2741 for c in range(0,colX+3): … … 2837 2846 generalData = data['General'] 2838 2847 atId = ran.randint(0,sys.maxsize) 2839 E,SGData = G2spc.SpcGroup(generalData['SGData']['SpGrp'])2848 SGData = generalData['SGData'] 2840 2849 Sytsym,Mult = G2spc.SytSym([x,y,z],SGData)[:2] 2841 2850 if generalData['Type'] == 'macromolecular': … … 3086 3095 atomData = data['Atoms'] 3087 3096 generalData = data['General'] 3088 E,SGData = G2spc.SpcGroup(generalData['SGData']['SpGrp'])3097 SGData = generalData['SGData'] 3089 3098 Sytsym,Mult = G2spc.SytSym([x,y,z],SGData)[:2] 3090 3099 atId = ran.randint(0,sys.maxsize) … … 3178 3187 atomData = data['Atoms'] 3179 3188 generalData = data['General'] 3189 ifMag = False 3180 3190 colLabels = [Atoms.GetColLabelValue(c) for c in range(Atoms.GetNumberCols())] 3181 3191 ci = colLabels.index('I/A') … … 3183 3193 if generalData['Type'] == 'magnetic': 3184 3194 choices += ['Mx','My','Mz',] 3195 ifMag = True 3185 3196 dlg = wx.SingleChoiceDialog(G2frame,'Select','Atom parameter',choices) 3186 3197 parm = '' … … 3191 3202 dlg.Destroy() 3192 3203 if parm in ['Type']: 3193 dlg = G2elemGUI.PickElement(G2frame )3204 dlg = G2elemGUI.PickElement(G2frame,ifMag=ifMag) 3194 3205 if dlg.ShowModal() == wx.ID_OK: 3195 3206 if dlg.Elem not in ['None']: -
trunk/GSASIIplot.py
r3290 r3295 3964 3964 G2frame.G2plotNB.status.SetStatusText('',1) 3965 3965 3966 PHI = np.linspace(0.,360., 30,True)3967 PSI = np.linspace(0.,180., 30,True)3966 PHI = np.linspace(0.,360.,40,True) 3967 PSI = np.linspace(0.,180.,40,True) 3968 3968 X = np.outer(npcosd(PHI),npsind(PSI)) 3969 3969 Y = np.outer(npsind(PHI),npsind(PSI)) … … 4039 4039 xyzlim = np.array([Plot.get_xlim3d(),Plot.get_ylim3d(),Plot.get_zlim3d()]).T 4040 4040 XYZlim = [min(xyzlim[0]),max(xyzlim[1])] 4041 Plot.contour(X,Y,Z,10,zdir='x',offset=XYZlim[0]) 4042 Plot.contour(X,Y,Z,10,zdir='y',offset=XYZlim[1]) 4043 Plot.contour(X,Y,Z,10,zdir='z',offset=XYZlim[0]) 4041 4044 Plot.set_xlim3d(XYZlim) 4042 4045 Plot.set_ylim3d(XYZlim) … … 4305 4308 xyzlim = np.array([Plot.get_xlim3d(),Plot.get_ylim3d(),Plot.get_zlim3d()]).T 4306 4309 XYZlim = [min(xyzlim[0]),max(xyzlim[1])] 4310 Plot.contour(X,Y,Z,10,zdir='x',offset=XYZlim[0]) 4311 Plot.contour(X,Y,Z,10,zdir='y',offset=XYZlim[1]) 4312 Plot.contour(X,Y,Z,10,zdir='z',offset=XYZlim[0]) 4307 4313 Plot.set_xlim3d(XYZlim) 4308 4314 Plot.set_ylim3d(XYZlim) -
trunk/GSASIIspc.py
r3293 r3295 178 178 moregen.append(1) 179 179 SGData['SGGen'] += moregen 180 # GSASIIpath.IPyBreak()181 180 if SGData['SGLaue'] in '-1': 182 181 SGData['SGSys'] = SysSym[0] … … 542 541 LaueSym = ('-1','2/m','mmm','4/m','4/mmm','3R','3mR','3','3m1','31m','6/m','6/mmm','m3','m3m') 543 542 LattSym = ('P','A','B','C','I','F','R') 544 UniqSym = ('','','a','b','c','',)545 543 546 544 ''' … … 1720 1718 Idup = [] 1721 1719 Cell = [] 1720 inv = int(SGData['SGInv']+1) 1721 icen = SGData['SGCen'] 1722 if SGData['SGFixed']: 1723 inv = 1 1722 1724 X = np.array(XYZ) 1723 1725 if Move: 1724 1726 X = MoveToUnitCell(X)[0] 1725 for ic,cen in enumerate( SGData['SGCen']):1727 for ic,cen in enumerate(icen): 1726 1728 C = np.array(cen) 1727 for invers in range(in t(SGData['SGInv']+1)):1729 for invers in range(inv): 1728 1730 for io,[M,T] in enumerate(SGData['SGOps']): 1729 1731 idup = ((io+1)+100*ic)*(1-2*invers) … … 2092 2094 "returns Mxyz terms, multipliers, GUI flags" 2093 2095 CSI = [[1,2,3],[1.0,1.0,1.0]] 2096 if '-1' in siteSym and SpnFlp[len(SpnFlp)//2] < 0: 2097 return [[0,0,0],[0.,0.,0.]] 2094 2098 for opr in dupDir: 2095 if '-1' in siteSym and SpnFlp[len(SpnFlp)//2] < 0:2096 return [[0,0,0],[0.,0.,0.]]2097 2099 indx = GetNXUPQsym(opr) 2098 2100 if SpnFlp[dupDir[opr]] > 0.: … … 2100 2102 else: 2101 2103 csi = CSxinel[indx[3]] #Q 2104 print(opr,SpnFlp[dupDir[opr]],indx,csi,CSI) 2102 2105 if not len(csi): 2103 2106 return [[0,0,0],[0.,0.,0.]] … … 2847 2850 Ndup = 0 2848 2851 dupDir = {} 2852 inv = SGData['SGInv']+1 2853 icen = SGData['SGCen'] 2854 if SGData['SGFixed']: #already in list of operators 2855 inv = 1 2849 2856 Xeqv = GenAtom(XYZ,SGData,True) 2850 2857 IRT = PackRot(SGData['SGOps']) 2851 2858 L = -1 2852 for ic,cen in enumerate( SGData['SGCen']):2853 for invers in range(int( SGData['SGInv']+1)):2859 for ic,cen in enumerate(icen): 2860 for invers in range(int(inv)): 2854 2861 for io,ops in enumerate(SGData['SGOps']): 2855 2862 irtx = (1-2*invers)*IRT[io] -
trunk/atmdata.py
r3289 r3295 24 24 <j0> & <j2> coeff. from Intl. Tables for Cryst, Vol. C 25 25 5-d <j0> & <j2> from Kobayashi K, Nagao T, Ito M. 26 Acta Crystallogr A6 8, 589-94 (2012)26 Acta Crystallogr A67, 473-480 (2011) 27 27 28 28 Neutron anomalous coeff (LS) from fitting Lynn & Seeger, At. Data & Nuc. Data Tables, 44, 191-207(1990)
Note: See TracChangeset
for help on using the changeset viewer.