Changeset 1643
- Timestamp:
- Feb 10, 2015 12:24:35 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASII.py ¶
r1625 r1643 755 755 Id = self.PatternTree.AppendItem(parent=self.root,text=HistName) 756 756 if not Bank['RefDict'].get('FF'): 757 Bank['RefDict']['FF'] = [{} for i in range(len(Bank['RefDict']['RefList']))]757 Bank['RefDict']['FF'] = {} 758 758 self.PatternTree.SetItemPyData(Id,[valuesdict,Bank['RefDict']]) 759 759 Sub = self.PatternTree.AppendItem(Id,text='Instrument Parameters') … … 767 767 print 'Read structure factor table '+str(HistName)+' from file '+str(self.lastimport) 768 768 if not rd.RefDict.get('FF'): 769 rd.RefDict['FF'] = [{} for i in range(len(rd.RefDict['RefList']))]769 rd.RefDict['FF'] = {} 770 770 Id = self.PatternTree.AppendItem(parent=self.root,text=HistName) 771 771 self.PatternTree.SetItemPyData(Id,[valuesdict,rd.RefDict]) -
TabularUnified trunk/GSASIIIO.py ¶
r1634 r1643 1685 1685 'self.Parameters is a list with two dicts for data parameter settings' 1686 1686 self.InitParameters() 1687 self.RefDict = {'RefList':[],'FF': [],'Super':0}1687 self.RefDict = {'RefList':[],'FF':{},'Super':0} 1688 1688 self.Banks = [] #for multi bank data (usually TOF) 1689 1689 '''self.RefDict is a dict containing the reflection information, as read from the file. … … 1699 1699 self.InitParameters() 1700 1700 self.Banks = [] #for multi bank data (usually TOF) 1701 self.RefDict = {'RefList':[],'FF': [],'Super':0}1701 self.RefDict = {'RefList':[],'FF':{},'Super':0} 1702 1702 1703 1703 def InitParameters(self): -
TabularUnified trunk/GSASIImath.py ¶
r1639 r1643 1090 1090 ''' 1091 1091 def calcVec(Ox,Tx,U,inv,C,M,T,Amat): 1092 TxT = inv*(np.inner(M,Tx)+T)+C 1093 TxT = G2spc.MoveToUnitCell(TxT)+U 1092 TxT = inv*(np.inner(M,Tx)+T)+C+U 1094 1093 return np.inner(Amat,(TxT-Ox)) 1095 1094 -
TabularUnified trunk/GSASIIplot.py ¶
r1635 r1643 527 527 ################################################################################ 528 528 529 def Plot3DSngl(G2frame,newPlot=False,Data=None,hklRef=None,Title= 'no phase'):529 def Plot3DSngl(G2frame,newPlot=False,Data=None,hklRef=None,Title=False): 530 530 '''3D Structure factor plotting package - displays reflections as rings proportional 531 531 to F, F**2, etc. as requested as 3D array … … 545 545 print "PIL/pillow Image module not present. Cannot save images without this" 546 546 raise Exception("PIL/pillow Image module not found") 547 Fname = os.path.join(Mydir,generalData['Name']+'.'+mode) 547 try: 548 Fname = os.path.join(Mydir,generalData['Name']+'.'+mode) 549 except NameError: #for when generalData doesn't exist! 550 Fname = os.path.join(Mydir,'unknown'+'.'+mode) 551 print Fname+' saved' 548 552 size = Page.canvas.GetSize() 549 553 glPixelStorei(GL_UNPACK_ALIGNMENT, 1) … … 600 604 601 605 Name = G2frame.PatternTree.GetItemText(G2frame.PatternId) 602 if Title != 'no phase': #NB: save image as e.g. jpeg will fail if no phase; MyDir is unknown606 if Title: #NB: save image as e.g. jpeg will fail if False; MyDir is unknown 603 607 generalData = G2frame.GetPhaseData()[Title]['General'] 604 608 cell = generalData['Cell'][1:7] -
TabularUnified trunk/GSASIIpwdGUI.py ¶
r1637 r1643 2869 2869 Super = General.get('Super',0) 2870 2870 SuperVec = General.get('SuperVec',[]) 2871 refList = np.array(data[phaseName]['RefList']) 2871 if 'list' in str(type(data)): #single crystal data is 2 dict in list 2872 refList = data[1]['RefList'] 2873 else: #powder data is a dict of dicts; each same structure as SC 2nd dict 2874 refList = np.array(data[phaseName]['RefList']) 2872 2875 FoMax = np.max(refList.T[8+Super]) 2873 2876 Hmin = np.array([int(np.min(refList.T[0])),int(np.min(refList.T[1])),int(np.min(refList.T[2]))]) … … 2886 2889 Super = General.get('Super',0) 2887 2890 SuperVec = General.get('SuperVec',[]) 2888 refList = np.array(data[phaseName]['RefList']) 2891 if 'list' in str(type(data)): #single crystal data is 2 dict in list 2892 refList = data[1]['RefList'] 2893 else: #powder data is a dict of dicts; each same structure as SC 2nd dict 2894 refList = np.array(data[phaseName]['RefList']) 2889 2895 FoMax = np.max(refList.T[8+Super]) 2890 2896 Hmin = np.array([int(np.min(refList.T[0])),int(np.min(refList.T[1])),int(np.min(refList.T[2]))]) -
TabularUnified trunk/GSASIIspc.py ¶
r1638 r1643 1155 1155 1156 1156 ''' 1157 hklf = HKL+[0,]1157 hklf = list(HKL)+[0,] #could be numpy array! 1158 1158 Ops = SGData['SGOps'] 1159 1159 OpM = np.array([op[0] for op in Ops]) -
TabularUnified trunk/GSASIIstrMain.py ¶
r1625 r1643 527 527 if i <= j: continue 528 528 AngArray[Oatom[0]].append((i,j, 529 G2mth.getAngSig(VectA[i],VectA[j],Amat,SGData,covData) 530 )) 529 G2mth.getAngSig(VectA[i],VectA[j],Amat,SGData,covData))) 531 530 return AtomLabels,DistArray,AngArray 532 531
Note: See TracChangeset
for help on using the changeset viewer.