Changeset 4866 for trunk/GSASIIindex.py
 Timestamp:
 Mar 24, 2021 6:16:47 PM (2 years ago)
 File:

 1 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)
Note: See TracChangeset
for help on using the changeset viewer.