 Timestamp:
 Mar 24, 2021 6:16:47 PM (6 months ago)
 Location:
 trunk
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIindex.py
r4865 r4866 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 902 if bet < 90.: 904 903 bet = 180.bet #always want obtuse beta 905 904 A = G2lat.cell2A([a,b,c,90.,bet,90.]) 906 905 G,g = G2lat.A2Gmat(A) 907 if ibrav in [13,]: #Imonoclinic  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]) 916 elif ibrav in [14,]: #Amonoclinic  OK? 906 if ibrav in [14,]: #Amonoclinic  OK? 917 907 u = [0,0,1] 918 908 v = [1,0,2] … … 929 919 if cnew < c: 930 920 cang = np.dot(np.dot(u,g),v)/(a*cnew) 921 beta = acosd(abs(cang)) 922 if beta < 90.: beta = 180.beta #always want obtuse beta 923 A = G2lat.cell2A([a,b,cnew,90,beta,90]) 924 elif ibrav in [13,]: #Imonoclinic  checked OK 925 uc = [0,0,1] 926 vc = [1,0,2] 927 ua = [1,0,0] 928 va = [2,0,1] 929 anew = math.sqrt(np.dot(np.dot(va,g),va)) 930 cnew = math.sqrt(np.dot(np.dot(vc,g),vc)) 931 if cnew < c: 932 cang = np.dot(np.dot(uc,g),v)/(a*cnew) 933 beta = acosd(abs(cang)) 934 if beta < 90.: beta = 180.beta #always want obtuse beta 935 A = G2lat.cell2A([a,b,cnew,90,beta,90]) 936 if anew < a: 937 cang = np.dot(np.dot(ua,g),v)/(c*anew) 938 beta = acosd(abs(cang)) 939 if beta < 90.: beta = 180.beta #always want obtuse beta 940 A = G2lat.cell2A([anew,b,c,90,beta,90]) 941 else: #P 942 ua = [0,0,1] 943 uc = [1,0,0] 944 va = [1,0,1] 945 vc = [1,0,1] 946 anew = math.sqrt(np.dot(np.dot(va,g),va)) 947 cnew = math.sqrt(np.dot(np.dot(vc,g),vc)) 948 if anew < a: 949 cang = np.dot(np.dot(ua,g),va)/(anew*c) 950 beta = acosd(abs(cang)) 951 if beta < 90.: beta = 180.beta #always want obtuse beta 952 A = G2lat.cell2A([anew,b,c,90,beta,90]) 953 if cnew < c: 954 cang = np.dot(np.dot(uc,g),vc)/(a*cnew) 931 955 beta = acosd(abs(cang)) 932 956 if beta < 90.: beta = 180.beta #always want obtuse beta … … 1007 1031 bestM20 = max(bestM20,M20) 1008 1032 A = halfCell(ibrav,A[:],peaks) 1009 if ibrav in [13,14,15 ]:1033 if ibrav in [13,14,15,16]: 1010 1034 A = monoCellReduce(ibrav,A[:]) 1011 1035 HKL = G2lat.GenHBravais(dmin,ibrav,A) 
trunk/imports/G2sfact.py
r4847 r4866 213 213 self.errors = ' Error reading line '+str(line+1) 214 214 if self.Super == 0: 215 SH = S[:12] 216 SF = S[12:32] 217 h,k,l = SH.split() 218 Fo,sigFo,Tw = SF.split() 215 h,k,l,Fo,sigFo,Tw = S.split() 219 216 # h,k,l,Fo,sigFo,Tw = S[:4],S[4:8],S[8:12],S[12:20],S[20:28],S[28:32] 220 217 h,k,l = [int(h),int(k),int(l)] 221 218 elif self.Super == 1: 222 SH = S[:16] 223 SF = S[16:36] 224 h,k,l,m1 = SH.split() 225 Fo,sigFo,Tw = SF.split() 219 h,k,l,m1,Fo,sigFo,Tw = SF.split() 226 220 # h,k,l,m1,Fo,sigFo,Tw = S[:4],S[4:8],S[8:12],S[12:16],S[16:24],S[24:32],S[32:36] 227 221 h,k,l,m1 = [int(h),int(k),int(l),int(m1)]
Note: See TracChangeset
for help on using the changeset viewer.