Changeset 4791
 Timestamp:
 Feb 2, 2021 9:37:33 AM (22 months ago)
 Location:
 trunk
 Files:

 1 added
 3 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIindex.py
r4466 r4791 787 787 return len(HKL),M20,X20,Aref,Vref,Z 788 788 789 def refinePeaks(peaks,ibrav,A,ifX20=True ):789 def refinePeaks(peaks,ibrav,A,ifX20=True,sg_type=None): 790 790 'needs a doc string' 791 791 dmin = getDmin(peaks) … … 795 795 OK = False 796 796 tries = 0 797 HKL = G2lat.GenHBravais(dmin,ibrav,A) 797 sg_type = G2lat.make_sgtype(ibrav) 798 HKL = G2lat.GenHBravais(dmin,ibrav,A,sg_type) 798 799 while len(HKL) > 2 and IndexPeaks(peaks,HKL)[0]: 799 800 Pwr = pwr  (tries % 2) … … 810 811 continue 811 812 try: 812 HKL = G2lat.GenHBravais(dmin,ibrav,A )813 HKL = G2lat.GenHBravais(dmin,ibrav,A,sg_type) 813 814 except FloatingPointError: 814 815 A = oldA … … 919 920 return A 920 921 921 def DoIndexPeaks(peaks,controls,bravais,dlg,ifX20=True): 922 def DoIndexPeaks(peaks,controls,bravais,dlg,ifX20=True, 923 timeout=None,M20_min=2.0,X20_max=None,return_Nc=False): 922 924 'needs a doc string' 923 925 … … 963 965 N2 = 0 964 966 while N2 < N2s[ibrav]: #Table 2 step (iii) 967 if timeout and time.time()  begin > timeout: 968 GoOn = False 969 break 970 965 971 if ibrav > 2: 966 972 if not N2: … … 993 999 a,b,c,alp,bet,gam = G2lat.A2cell(A) 994 1000 V = G2lat.calc_V(A) 995 if M20 >= 2.0: 1001 if ( 1002 (M20 >= M20_min) and 1003 (X20_max is None or X20 <= X20_max) 1004 ): 996 1005 cell = [M20,X20,ibrav,a,b,c,alp,bet,gam,V,False,False] 1006 if return_Nc: cell.append(Nc) 997 1007 newcell = np.array(cell[3:10]) 998 1008 if not np.allclose(newcell,lastcell): 999 print ("%10.3f %3d %3d %10.5f %10.5f %10.5f %10.3f %10.3f %10.3f %10.2f %10.2f " \1000 %(M20,X20,Nc,a,b,c,alp,bet,gam,V,V1 ))1009 print ("%10.3f %3d %3d %10.5f %10.5f %10.5f %10.3f %10.3f %10.3f %10.2f %10.2f %s" 1010 %(M20,X20,Nc,a,b,c,alp,bet,gam,V,V1,bravaisNames[ibrav])) 1001 1011 cells.append(cell) 1002 1012 lastcell = np.array(cell[3:10]) … … 1018 1028 V1 = cells[0][9] 1019 1029 else: 1020 V1 = 251030 V1 = controls[3] 1021 1031 ncMax += Nobs 1022 1032 cycle += 1 
trunk/GSASIIlattice.py
r4636 r4791 1114 1114 raise ValueError('nonstandard Bravais lattice center=%s, cell=%s' % (center,system)) 1115 1115 1116 def GenHBravais(dmin,Bravais,A ):1116 def GenHBravais(dmin,Bravais,A, sg_type=None): 1117 1117 """Generate the positionally unique powder diffraction reflections 1118 1118 … … 1139 1139 1140 1140 :param A: reciprocal metric tensor elements as [G11,G22,G33,2*G12,2*G13,2*G23] 1141 :param sg_type: alternate specification for Bravais lattice used in CCTBX 1141 1142 :return: HKL unique d list of [h,k,l,d,1] sorted with largest d first 1142 1143 
trunk/docs/source/index.rst
r4789 r4791 20 20 21 21 .. toctree:: 22 :maxdepth: 2 23 :numbered: 4 22 24 23 packages.rst 24 GSASII.rst 25 GSASIIobj.rst 26 GSASIIutil.rst 27 GSASIIGUIr.rst 28 GSASIIGUI.rst 29 GSASIIstruc.rst 30 GSASIImapvars.rst 31 GSASIIimage.rst 32 GSASIImath.rst 33 GSASIIindex.rst 34 GSASIIplot.rst 35 GSASIIpwd.rst 36 SAS.rst 37 GSASIIscriptable.rst 38 GSASIIscripts.rst 39 imports.rst 40 exports.rst 41 G2tools.rst 42 43 .. only:: html 44 45 `General Index <./genindex.html>`_ 46 47 `Module Index <./pymodindex.html>`_ 48 25 packages.rst 26 GSASII.rst 27 GSASIIobj.rst 28 GSASIIutil.rst 29 GSASIIGUIr.rst 30 GSASIIGUI.rst 31 GSASIIstruc.rst 32 GSASIImapvars.rst 33 GSASIIimage.rst 34 GSASIImath.rst 35 GSASIIindex.rst 36 GSASIIplot.rst 37 GSASIIpwd.rst 38 SAS.rst 39 GSASIIscriptable.rst 40 GSASIIscripts.rst 41 imports.rst 42 exports.rst 43 G2tools.rst 44 indices.rst
Note: See TracChangeset
for help on using the changeset viewer.