Changeset 1559
- Timestamp:
- Nov 3, 2014 2:48:51 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIddataGUI.py
r1547 r1559 228 228 if name in ['Scale','Extinction','HStrain']: 229 229 if name == 'Extinction' and 'HKLF' in sourceDict['Histogram']: 230 UseList[item][name][:1] = copy. copy(sourceDict[name][:1])230 UseList[item][name][:1] = copy.deepcopy(sourceDict[name][:1]) 231 231 for itm in ['Eg','Es','Ep']: 232 UseList[item][name][2][itm][1] = copy. copy(copyDict[name][itm])232 UseList[item][name][2][itm][1] = copy.deepcopy(copyDict[name][itm]) 233 233 else: 234 UseList[item][name][1] = copy. copy(copyDict[name])234 UseList[item][name][1] = copy.deepcopy(copyDict[name]) 235 235 elif name in ['Size','Mustrain']: 236 UseList[item][name][0] = copy. copy(copyDict[name][0])237 UseList[item][name][2] = copy. copy(copyDict[name][1])238 UseList[item][name][4] = copy. copy(copyDict[name][2])236 UseList[item][name][0] = copy.deepcopy(copyDict[name][0]) 237 UseList[item][name][2] = copy.deepcopy(copyDict[name][1]) 238 UseList[item][name][4] = copy.deepcopy(copyDict[name][2]) 239 239 elif name == 'Pref.Ori.': 240 UseList[item][name][0] = copy. copy(copyDict[name][0])241 UseList[item][name][2] = copy. copy(copyDict[name][1])240 UseList[item][name][0] = copy.deepcopy(copyDict[name][0]) 241 UseList[item][name][2] = copy.deepcopy(copyDict[name][1]) 242 242 if sourceDict[name][0] == 'SH': 243 SHflags = copy. copy(copyDict[name][2])244 SHterms = copy. copy(sourceDict[name][5])243 SHflags = copy.deepcopy(copyDict[name][2]) 244 SHterms = copy.deepcopy(sourceDict[name][5]) 245 245 for item in SHflags: 246 SHterms[item][1] = copy. copy(SHflags[item])246 SHterms[item][1] = copy.deepcopy(SHflags[item]) 247 247 elif name == 'Babinet': 248 248 for bab in babNames: 249 UseList[item][name][bab][1] = copy. copy(copyDict[name][bab])249 UseList[item][name][bab][1] = copy.deepcopy(copyDict[name][bab]) 250 250 wx.CallAfter(UpdateDData,G2frame,DData,data) 251 251 finally: -
trunk/GSASIIplot.py
r1519 r1559 3856 3856 mapPeakVecs = np.inner(mV,Bmat) 3857 3857 3858 uColors = [Rd,Gr,Bl,Wt, Wt,Wt,Wt,Wt, Wt,Wt,Wt,Wt] 3858 backColor = np.array(list(drawingData['backColor'])+[0,]) 3859 Bc = np.array(list(drawingData['backColor'])) 3860 uColors = [Rd,Gr,Bl,Wt-Bc, Wt-Bc,Wt-Bc,Wt-Bc,Wt-Bc, Wt-Bc,Wt-Bc,Wt-Bc,Wt-Bc] 3859 3861 altDown = False 3860 3862 shiftDown = False … … 4749 4751 Page.camera['position'] = drawingData['cameraPos'] 4750 4752 Page.camera['viewPoint'] = np.inner(Amat,drawingData['viewPoint'][0]) 4751 Page.camera['backColor'] = np.array(list(drawingData['backColor'])+[0,])/255.4753 Page.camera['backColor'] = backColor/255. 4752 4754 try: 4753 4755 Page.canvas.SetCurrent() -
trunk/GSASIIpwdGUI.py
r1552 r1559 2204 2204 2205 2205 def OnSSopt(event): 2206 if controls[5] in ['Fm3m','Im3m','Pm3m']: 2207 SSopt.SetValue(False) 2208 G2frame.ErrorDialog('Cubic lattice', 'Superlattice not allowed for a cubic lattice') 2209 return 2206 2210 ssopt['Use'] = SSopt.GetValue() 2207 2211 wx.CallAfter(UpdateUnitCellsGrid,G2frame,data) … … 2468 2472 def RefreshUnitCellsGrid(event): 2469 2473 data =G2frame.PatternTree.GetItemPyData(UnitCellsId) 2470 cells,dmin = data[2: ]2474 cells,dmin = data[2:4] 2471 2475 r,c = event.GetRow(),event.GetCol() 2472 2476 if cells: -
trunk/GSASIIspc.py
r1548 r1559 1323 1323 SHKL += ['S211','S121','S112'] 1324 1324 return SHKL 1325 1326 def HStrainVals(HSvals,SGData): 1327 laue = SGData['SGLaue'] 1328 uniq = SGData['SGUniq'] 1329 DIJ = np.zeros(6) 1330 if laue in ['m3','m3m']: 1331 DIJ[:3] = [HSvals[0],HSvals[0],HSvals[0]] 1332 elif laue in ['6/m','6/mmm','3m1','31m','3']: 1333 DIJ[:4] = [HSvals[0],HSvals[0],HSvals[1],HSvals[0]] 1334 elif laue in ['3R','3mR']: 1335 DIJ = [HSvals[0],HSvals[0],HSvals[0],HSvals[1],HSvals[1],HSvals[1]] 1336 elif laue in ['4/m','4/mmm']: 1337 DIJ[:3] = [HSvals[0],HSvals[0],HSvals[1]] 1338 elif laue in ['mmm']: 1339 DIJ[:3] = [HSvals[0],HSvals[1],HSvals[2]] 1340 elif laue in ['2/m']: 1341 DIJ[:3] = [HSvals[0],HSvals[1],HSvals[2]] 1342 if uniq == 'a': 1343 DIJ[5] = HSvals[3] 1344 elif uniq == 'b': 1345 DIJ[4] = HSvals[3] 1346 elif uniq == 'c': 1347 DIJ[3] = HSvals[3] 1348 return Dij 1349 else: 1350 DIJ = [HSvals[0],HSvals[1],HSvals[2],HSvals[3],HSvals[4],HSvals[5]] 1351 return DIJ 1325 1352 1326 1353 def HStrainNames(SGData): -
trunk/GSASIIstrIO.py
r1529 r1559 1758 1758 hapVary.append(pfx+item) 1759 1759 names = G2spc.HStrainNames(SGData) 1760 HSvals = [] 1760 1761 for i,name in enumerate(names): 1761 1762 hapDict[pfx+name] = hapData['HStrain'][0][i] 1763 HSvals.append(hapDict[pfx+name]) 1762 1764 if hapData['HStrain'][1][i]: 1763 1765 hapVary.append(pfx+name) 1766 DIJS = G2spc.HStrainVals(HSvals,SGData) 1764 1767 controlDict[pfx+'poType'] = hapData['Pref.Ori.'][0] 1765 1768 if hapData['Pref.Ori.'][0] == 'MD': … … 1824 1827 if hapData['Babinet']['BabA'][0]: 1825 1828 PrintBabinet(hapData['Babinet']) 1826 HKLd = np.array(G2lat.GenHLaue(dmin,SGData,A)) 1829 HKLd = np.array(G2lat.GenHLaue(dmin,SGData,A)) #+DIJS 1827 1830 if resetRefList: 1828 1831 refList = [] -
trunk/GSASIIstrMath.py
r1498 r1559 1370 1370 return sigDict,gamDict 1371 1371 1372 def GetReflPos(refl,wave, G,hfx,calcControls,parmDict):1372 def GetReflPos(refl,wave,A,hfx,calcControls,parmDict): 1373 1373 'Needs a doc string' 1374 1374 h,k,l = refl[:3] 1375 dsq = 1./G2lat.calc_rDsq2(np.array([h,k,l]),G) 1376 d = np.sqrt(dsq) 1375 d = 1./np.sqrt(G2lat.calc_rDsq(np.array([h,k,l]),A)) 1377 1376 1378 1377 refl[4] = d … … 1489 1488 return dDijDict 1490 1489 1490 def GetDij(phfx,SGData,parmDict): 1491 HSvals = [parmDict[phfx+name] for name in G2spc.HStrainNames(SGData)] 1492 return G2spc.HStrainVals(HSvals,SGData) 1493 1491 1494 def GetFobsSq(Histograms,Phases,parmDict,calcControls): 1492 1495 'Needs a doc string' … … 1596 1599 bet = parmDict[hfx+'beta-0']+parmDict[hfx+'beta-1']/refl[4]**4+parmDict[hfx+'beta-q']/refl[4]**2 1597 1600 return alp,bet 1598 1601 1599 1602 hId = Histogram['hId'] 1600 1603 hfx = ':%d:'%(hId) … … 1624 1627 SGData = Phase['General']['SGData'] 1625 1628 SGMT = np.array([ops[0].T for ops in SGData['SGOps']]) 1626 A = [parmDict[pfx+'A%d'%(i)] for i in range(6)] #Do I want to modify by Dij?1629 A = [parmDict[pfx+'A%d'%(i)] for i in range(6)] #+GetDij(phfx,SGData,parmDict) 1627 1630 G,g = G2lat.A2Gmat(A) #recip & real metric tensors 1628 1631 GA,GB = G2lat.Gmat2AB(G) #Orthogonalization matricies … … 1638 1641 h,k,l = refl[:3] 1639 1642 Uniq = np.inner(refl[:3],SGMT) 1640 refl[5] = GetReflPos(refl,wave, G,hfx,calcControls,parmDict) #corrected reflection position1643 refl[5] = GetReflPos(refl,wave,A,hfx,calcControls,parmDict) #corrected reflection position 1641 1644 Lorenz = 1./(2.*sind(refl[5]/2.)**2*cosd(refl[5]/2.)) #Lorentz correction 1642 1645 refl[5] += GetHStrainShift(refl,SGData,phfx,hfx,calcControls,parmDict) #apply hydrostatic strain shift … … 1678 1681 h,k,l = refl[:3] 1679 1682 Uniq = np.inner(refl[:3],SGMT) 1680 refl[5] = GetReflPos(refl,0.0, G,hfx,calcControls,parmDict) #corrected reflection position1683 refl[5] = GetReflPos(refl,0.0,A,hfx,calcControls,parmDict) #corrected reflection position 1681 1684 Lorenz = sind(parmDict[hfx+'2-theta']/2)*refl[4]**4 #TOF Lorentz correction 1682 1685 refl[5] += GetHStrainShift(refl,SGData,phfx,hfx,calcControls,parmDict) #apply hydrostatic strain shift … … 1783 1786 pfx = '%d::'%(pId) 1784 1787 phfx = '%d:%d:'%(pId,hId) 1785 A = [parmDict[pfx+'A%d'%(i)] for i in range(6)] #And modify here by Dij? - no1788 A = [parmDict[pfx+'A%d'%(i)] for i in range(6)] #+GetDij(phfx,SGData,parmDict) 1786 1789 G,g = G2lat.A2Gmat(A) #recip & real metric tensors 1787 1790 GA,GB = G2lat.Gmat2AB(G) #Orthogonalization matricies -
trunk/imports/G2pwd_xye.py
r1544 r1559 46 46 gotCcomment = True 47 47 continue 48 if S[0] == '#':48 if S[0] in ["'",'#']: 49 49 continue #ignore comments, if any 50 50 else: … … 81 81 gotCcomment = True 82 82 continue 83 if S[0] == '#':83 if S[0] in ["'"'#']: 84 84 self.comments.append(S[:-1]) 85 85 continue #ignore comments, if any
Note: See TracChangeset
for help on using the changeset viewer.