Changeset 750
- Timestamp:
- Sep 5, 2012 10:43:15 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIImath.py
r741 r750 934 934 rho[rMM[0]:rMP[0],rMM[1]:rMP[1],rMM[2]:rMP[2]] = peakFunc(x1,rX,rY,rZ,rhoPeak,res,SGData['SGLaue']) 935 935 rho = np.roll(np.roll(np.roll(rho,-rMI[2],axis=2),-rMI[1],axis=1),-rMI[0],axis=0) 936 #if SGData['SGInv']: #check origin location & fix it if needed - centrosymmetric only937 #Ocheck = np.zeros_like(rho)938 #for ipeak in peaks:939 #for opeak in peaks:940 #dx = ((opeak-ipeak)*incre)%incre941 #if np.any(dx): #avoid self vector942 #Ocheck[dx[0],dx[1],dx[2]] += 1943 #dxMax = np.unravel_index(np.argmax(Ocheck),rho.shape)944 # print 'Inversion at:',dxMax,' shift by ;',dxMax-mapHalf,' map size:',rho.shape 945 #rho = np.roll(np.roll(np.roll(rho,dxMax[2],axis=2),dxMax[1],axis=1),dxMax[0],axis=0)946 #for peak in peaks:947 #peak = (peak-(dxMax+mapHalf)/incre)%1.0936 if SGData['SGInv']: #check origin location & fix it if needed - centrosymmetric only 937 Ocheck = np.zeros_like(rho) 938 for ipeak in peaks: 939 for opeak in peaks: 940 dx = ((opeak-ipeak)*incre)%incre 941 if np.any(dx): #avoid self vector 942 Ocheck[dx[0],dx[1],dx[2]] += 1 943 dxMax = np.unravel_index(np.argmax(Ocheck),rho.shape) 944 print ' Inversion at:',dxMax,' shift by ;',dxMax-mapHalf 945 rho = np.roll(np.roll(np.roll(rho,dxMax[2],axis=2),dxMax[1],axis=1),dxMax[0],axis=0) 946 for peak in peaks: 947 peak = (peak-(dxMax+mapHalf)/incre)%1.0 948 948 949 949 return np.array(peaks),np.array([mags,]).T,np.array([dzeros,]).T -
trunk/GSASIIphsGUI.py
r749 r750 1388 1388 generalData = data['General'] 1389 1389 colLabels = [Atoms.GetColLabelValue(c) for c in range(Atoms.GetNumberCols())] 1390 choices = ['Type',' x','y','z','frac','I/A','Uiso']1390 choices = ['Type','Name','x','y','z','frac','I/A','Uiso'] 1391 1391 dlg = wx.SingleChoiceDialog(G2frame,'Select','Atom parameter',choices) 1392 1392 if dlg.ShowModal() == wx.ID_OK: … … 1413 1413 FillAtomsGrid() 1414 1414 dlg.Destroy() 1415 elif parm in ['Name',]: 1416 dlg = wx.MessageDialog(G2frame,'Do you really want to rename the selected atoms?','Rename', 1417 wx.YES_NO | wx.ICON_QUESTION) 1418 try: 1419 result = dlg.ShowModal() 1420 if result == wx.ID_YES: 1421 for r in indx: 1422 El = atomData[r][cid+1] 1423 if len(El) in [2,4]: 1424 atomData[r][cid] = El[:2]+'(%d)'%(r+1) 1425 else: 1426 atomData[r][cid] = El[:1]+'(%d)'%(r+1) 1427 FillAtomsGrid() 1428 finally: 1429 dlg.Destroy() 1430 1415 1431 elif parm in ['I/A']: 1416 1432 choices = ['Isotropic','Anisotropic'] … … 3966 3982 colLabels = ['mag','x','y','z','dzero'] 3967 3983 Types = 5*[wg.GRID_VALUE_FLOAT+':10,4',] 3968 MapPeaksTable = G2gd.Table(mapPeaks,rowLabels=rowLabels,colLabels=colLabels,types=Types)3969 MapPeaks.SetTable( MapPeaksTable, True)3984 G2frame.MapPeaksTable = G2gd.Table(mapPeaks,rowLabels=rowLabels,colLabels=colLabels,types=Types) 3985 MapPeaks.SetTable(G2frame.MapPeaksTable, True) 3970 3986 MapPeaks.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK, RowSelect) 3971 3987 for r in range(MapPeaks.GetNumberRows()): -
trunk/GSASIIplot.py
r749 r750 2432 2432 SetMapRoll(dirDict[key]) 2433 2433 SetPeakRoll(dirDict[key]) 2434 SetMapPeaksText(mapPeaks) 2434 2435 Draw() 2435 2436 … … 2531 2532 names = [child.GetName() for child in panel] 2532 2533 panel[names.index('viewPoint')].SetValue('%.3f, %.3f, %.3f'%(VP[0],VP[1],VP[2])) 2534 2535 def SetMapPeaksText(mapPeaks): 2536 page = getSelection() 2537 if page: 2538 if G2frame.dataDisplay.GetPageText(page) == 'Map peaks': 2539 G2frame.MapPeaksTable.SetData(mapPeaks) 2540 panel = G2frame.dataDisplay.GetPage(page).GetChildren() 2541 names = [child.GetName() for child in panel] 2542 panel[names.index('grid window')].Refresh() 2533 2543 2534 2544 def ClearSelectedAtoms(): … … 2610 2620 peak[1:4] += dxy 2611 2621 peak[1:4] %= 1. 2622 peak[4] = np.sqrt(np.sum(np.inner(Amat,peak[1:4])**2)) 2612 2623 2613 2624 def SetTranslation(newxy):
Note: See TracChangeset
for help on using the changeset viewer.