- Timestamp:
- Mar 24, 2021 1:06:49 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIindex.py
r4862 r4865 873 873 Lhkl,M20,X20,Aref = refinePeaks(peaks,ibrav,Abeg,ifX20) 874 874 Asave.append([calc_M20(peaks,HKL,ifX20),Aref[:]]) 875 if ibrav in [9,10,11]: # C-centered orthorhombic875 if ibrav in [9,10,11]: #A,B,or C-centered orthorhombic 876 876 for i in range(2): 877 877 Abeg = rotOrthoA(Abeg[:]) … … 900 900 'needs a doc string' 901 901 a,b,c,alp,bet,gam = G2lat.A2cell(A) 902 print(a,b,c,alp,bet,gam) 903 if bet < 90.: 904 bet = 180.-bet #always want obtuse beta 905 A = G2lat.cell2A([a,b,c,90.,bet,90.]) 902 906 G,g = G2lat.A2Gmat(A) 903 if ibrav in [13,]: #I-monoclinic 904 pass 905 # u = [-1,0,0] 906 # v = [1,0,1] 907 # cnew = math.sqrt(np.dot(np.dot(v,g),v)) 908 # if cnew < c: 909 # cang = np.dot(np.dot(u,g),v)/(a*cnew) 910 # beta = acosd(-abs(cang)) 911 # if beta < 90.: beta = 180.-beta 912 # A = G2lat.cell2A([a,b,cnew,90,beta,90]) 907 if ibrav in [13,]: #I-monoclinic - checked OK 908 u = [-1,0,0] 909 v = [2,0,1] 910 cnew = math.sqrt(np.dot(np.dot(v,g),v)) 911 if cnew < c: 912 cang = np.dot(np.dot(u,g),v)/(a*cnew) 913 beta = acosd(-abs(cang)) 914 if beta < 90.: beta = 180.-beta #always want obtuse beta 915 A = G2lat.cell2A([a,b,cnew,90,beta,90]) 913 916 elif ibrav in [14,]: #A-monoclinic - OK? 914 917 u = [0,0,-1] … … 918 921 cang = np.dot(np.dot(u,g),v)/(anew*c) 919 922 beta = acosd(-abs(cang)) 920 if beta < 90.: beta = 180.-beta 923 if beta < 90.: beta = 180.-beta #always want obtuse beta 921 924 A = G2lat.cell2A([anew,b,c,90,beta,90]) 922 925 elif ibrav in [15,]: #C-monoclinic - OK? … … 927 930 cang = np.dot(np.dot(u,g),v)/(a*cnew) 928 931 beta = acosd(-abs(cang)) 929 if beta < 90.: beta = 180.-beta 932 if beta < 90.: beta = 180.-beta #always want obtuse beta 930 933 A = G2lat.cell2A([a,b,cnew,90,beta,90]) 931 934 return A -
trunk/GSASIIrestrGUI.py
r4864 r4865 242 242 Lists = {'origin':[],'target':[]} 243 243 for listName in ['origin','target']: 244 dlg = wx.MultiChoiceDialog(G2frame,'Bond restraint '+listName+' for '+General['Name'],244 dlg = G2G.G2MultiChoiceDialog(G2frame,'Bond restraint '+listName+' for '+General['Name'], 245 245 'Select bond restraint '+listName+' atoms',Names) 246 246 if dlg.ShowModal() == wx.ID_OK: … … 276 276 for Tid,Ttype,Tcoord in targAtoms: 277 277 if 'macro' in General['Type']: 278 result = [ Tcoord,1,[0,0,0],[]]278 result = [[Tcoord,1,[0,0,0],[]],] 279 279 else: 280 280 result = G2spc.GenAtom(Tcoord,SGData,False,Move=False) … … 369 369 Lists = {'A-atom':[],'B-atom':[],'C-atom':[]} 370 370 for listName in ['A-atom','B-atom']: 371 dlg = wx.MultiChoiceDialog(G2frame,'Select '+listName+' for angle A-B-C for '+General['Name'] ,371 dlg = G2G.G2MultiChoiceDialog(G2frame,'Select '+listName+' for angle A-B-C for '+General['Name'] , 372 372 'Select angle restraint '+listName,Names) 373 373 if dlg.ShowModal() == wx.ID_OK: … … 521 521 def AddPlaneRestraint(restrData): 522 522 ids = [] 523 dlg = wx.MultiChoiceDialog(G2frame,'Select 4 or more atoms for plane in '+General['Name'],523 dlg = G2G.G2MultiChoiceDialog(G2frame,'Select 4 or more atoms for plane in '+General['Name'], 524 524 'Select 4+ atoms',Names[iBeg:]) 525 525 if dlg.ShowModal() == wx.ID_OK: … … 812 812 ids = [] 813 813 factors = [] 814 dlg = wx.MultiChoiceDialog(G2frame,'Select atoms for chemical restraint in '+General['Name'],814 dlg = G2G.G2MultiChoiceDialog(G2frame,'Select atoms for chemical restraint in '+General['Name'], 815 815 'Select atoms',Names) 816 816 if dlg.ShowModal() == wx.ID_OK: -
trunk/imports/G2phase.py
r4415 r4865 76 76 EightPiSq = 8.*math.pi**2 77 77 self.errors = 'Error opening file' 78 file = open(filename, ' Ur')78 file = open(filename, 'r') 79 79 Phase = {} 80 80 Title = os.path.basename(filename) … … 449 449 ''' 450 450 self.errors = 'Error opening file' 451 fp = open(filename, ' Ur') #contains only cell & spcgroup451 fp = open(filename, 'r') #contains only cell & spcgroup 452 452 Phase = {} 453 453 Title = os.path.basename(filename) … … 523 523 waveTypes = ['Fourier','Sawtooth','ZigZag',] 524 524 filename2 = os.path.splitext(filename)[0]+'.m40' 525 file2 = open(filename2,' Ur')525 file2 = open(filename2,'r') 526 526 S = file2.readline() 527 527 line = 1
Note: See TracChangeset
for help on using the changeset viewer.