Changeset 5020
- Timestamp:
- Sep 2, 2021 4:10:06 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrlGUI.py
r4997 r5020 82 82 used in Bind elsewhere in the code. 83 83 :func:`G2MessageBox` Displays text typically used for errors or warnings. 84 :func:`ShowScrolledInfo` Displays longer text where scrolling is possibly needed 84 85 :func:`GetItemOrder` Creates a dialog for ordering items into columns 85 86 :func:`GetImportFile` Gets one ore more file from the appropriate import … … 2412 2413 dlg.ShowModal() 2413 2414 dlg.Destroy() 2415 2416 def ShowScrolledInfo(parent,txt,width=600,height=400,header='Warning info'): 2417 '''Simple code to display possibly extensive error or warning text 2418 in a scrolled window. 2419 2420 :param wx.Frame parent: parent window for 2421 :param str txt: text to be displayed 2422 :param int width: lateral of window in pixels (defaults to 600) 2423 :param int height: vertical dimension of window in pixels (defaults to 400) 2424 :param str header: width of window in pixels (defaults to 600) 2425 ''' 2414 2426 2427 dlg = wx.Dialog(parent.GetTopLevelParent(),wx.ID_ANY,header, style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER) 2428 spanel = wxscroll.ScrolledPanel(dlg, wx.ID_ANY, size=(width-20, height)) 2429 mainSizer = wx.BoxSizer(wx.VERTICAL) 2430 mainSizer.Add(spanel,1,wx.ALL|wx.EXPAND,1) 2431 2432 txtSizer = wx.BoxSizer(wx.VERTICAL) 2433 txt = wx.StaticText(spanel,wx.ID_ANY,txt) 2434 txt.Wrap(600) 2435 txt.SetBackgroundColour(wx.WHITE) 2436 txtSizer.Add(txt,1,wx.ALL|wx.EXPAND,1) 2437 spanel.SetSizer(txtSizer) 2438 btnsizer = wx.BoxSizer(wx.HORIZONTAL) 2439 btn = wx.Button(dlg, wx.ID_CLOSE) 2440 btn.Bind(wx.EVT_BUTTON,lambda event: dlg.EndModal(wx.ID_CANCEL)) 2441 btnsizer.Add(btn) 2442 mainSizer.Add(btnsizer, 0, wx.ALIGN_CENTER|wx.ALL, 5) 2443 dlg.SetSizer(mainSizer) 2444 mainSizer.Fit(dlg) 2445 spanel.SetAutoLayout(1) 2446 spanel.SetupScrolling() 2447 #dlg.SetMaxSize((-1,400)) 2448 dlg.CenterOnParent() 2449 dlg.ShowModal() 2450 dlg.Destroy() 2451 2415 2452 ################################################################################ 2416 2453 class PickTwoDialog(wx.Dialog): -
trunk/GSASIIindex.py
r4866 r5020 832 832 return len(HKL),M20,X20,A 833 833 834 def findBestCell(dlg,ncMax,A,Ntries,ibrav,peaks,V1,ifX20=True ):834 def findBestCell(dlg,ncMax,A,Ntries,ibrav,peaks,V1,ifX20=True,cctbx_args=None): 835 835 'needs a doc string' 836 836 # dlg & ncMax are used for wx progress bar … … 871 871 872 872 if IndexPeaks(peaks,HKL)[0] and len(HKL) > mHKL[ibrav]: 873 Lhkl,M20,X20,Aref = refinePeaks(peaks,ibrav,Abeg,ifX20 )873 Lhkl,M20,X20,Aref = refinePeaks(peaks,ibrav,Abeg,ifX20,cctbx_args=cctbx_args) 874 874 Asave.append([calc_M20(peaks,HKL,ifX20),Aref[:]]) 875 875 if ibrav in [9,10,11]: #A,B,or C-centered orthorhombic 876 876 for i in range(2): 877 877 Abeg = rotOrthoA(Abeg[:]) 878 Lhkl,M20,X20,Aref = refinePeaks(peaks,ibrav,Abeg,ifX20 )878 Lhkl,M20,X20,Aref = refinePeaks(peaks,ibrav,Abeg,ifX20,cctbx_args=cctbx_args) 879 879 HKL = G2lat.GenHBravais(dmin,ibrav,Aref) 880 880 peaks = IndexPeaks(peaks,HKL)[1] … … 882 882 # elif ibrav == 15: #C-centered monoclinic 883 883 # Abeg = swapMonoA(Abeg[:]) 884 # Lhkl,M20,X20,Aref = refinePeaks(peaks,ibrav,Abeg,ifX20 )884 # Lhkl,M20,X20,Aref = refinePeaks(peaks,ibrav,Abeg,ifX20,cctbx_args=cctbx_args) 885 885 # HKL = G2lat.GenHBravais(dmin,ibrav,Aref) 886 886 # peaks = IndexPeaks(peaks,HKL)[1] … … 892 892 X = sortM20(Asave) 893 893 if X: 894 Lhkl,M20,X20,A = refinePeaks(peaks,ibrav,X[0][1],ifX20 )894 Lhkl,M20,X20,A = refinePeaks(peaks,ibrav,X[0][1],ifX20,cctbx_args=cctbx_args) 895 895 return GoOn,Skip,Lhkl,M20,X20,A 896 896 else: … … 959 959 960 960 def DoIndexPeaks(peaks,controls,bravais,dlg,ifX20=True, 961 timeout=None,M20_min=2.0,X20_max=None,return_Nc=False): 961 timeout=None,M20_min=2.0,X20_max=None,return_Nc=False, 962 cctbx_args=None): 962 963 'needs a doc string' 963 964 … … 1010 1011 if not N2: 1011 1012 A = [] 1012 GoOn,Skip,Nc,M20,X20,A = findBestCell(dlg,ncMax,A,Nm[ibrav]*N1s[ibrav],ibrav,peaks,V1,ifX20 )1013 GoOn,Skip,Nc,M20,X20,A = findBestCell(dlg,ncMax,A,Nm[ibrav]*N1s[ibrav],ibrav,peaks,V1,ifX20,cctbx_args=cctbx_args) 1013 1014 if Skip: 1014 1015 break 1015 1016 if A: 1016 GoOn,Skip,Nc,M20,X20,A = findBestCell(dlg,ncMax,A[:],N1s[ibrav],ibrav,peaks,0,ifX20 )1017 GoOn,Skip,Nc,M20,X20,A = findBestCell(dlg,ncMax,A[:],N1s[ibrav],ibrav,peaks,0,ifX20,cctbx_args=cctbx_args) 1017 1018 else: 1018 GoOn,Skip,Nc,M20,X20,A = findBestCell(dlg,ncMax,0,Nm[ibrav]*N1s[ibrav],ibrav,peaks,V1,ifX20 )1019 GoOn,Skip,Nc,M20,X20,A = findBestCell(dlg,ncMax,0,Nm[ibrav]*N1s[ibrav],ibrav,peaks,V1,ifX20,cctbx_args=cctbx_args) 1019 1020 if Skip: 1020 1021 break -
trunk/docs/source/packages.rst
r4658 r5020 51 51 GSAS-II to download updates to our code. 52 52 53 54 53 Scripting Requirements 55 54 ----------------------- … … 65 64 http://www.pythonware.com/products/pil/), or h5py + hdf5 to function 66 65 but scripts will load and run without these. 66 67 68 External and Supplied Programs 69 -------------------------------- 70 71 GSAS-II provides interfaces to use a number of programs developed by 72 others. Some are included with GSAS-II and others must be installed 73 separately. When these programs are accessed, citation 74 information is provided. 75 76 GSAS-II includes copies of these programs: 77 78 **DIFFaX** 79 Simulate layered structures with faulting 80 81 **CifFile** 82 A software library used to read data and structures from CIF 83 84 **Shapes** 85 Model small angle scattering with shaped particles 86 87 **NIST FPA** 88 Use Fundamental Parameters to determine GSAS-II profile function 89 90 No additional steps beyond a standard installation 91 are needed to access their functionality. 92 93 **Bilboa Crystallographic Server**: GSAS-II directly access the 94 Bilboa Crystallographic Server (provided 95 the computer has internet access). This allows automated use of the 96 k-SUBGROUPSMAG, k-SUBGROUPS and PseudoLattice web utilities for 97 computation of space group subgroups, color (magnetic) subgroups & 98 lattice search. 99 100 At the request of the program authors, these programs are not included 101 with GSAS-II and must be installed separately: 102 103 **RMCProfile** 104 Large-box PDF & S(Q) fitting. We have heard from users that V6.7.7 105 of RMCProfile is compatible with the input created by GSAS-II, 106 but not V6.7.9. 107 108 **fullrmc** 109 A modern software toolkit for large-box PDF & S(Q) fitting. Use 110 version 5.0 or later. 111 112 **Dysnomia** 113 Computes enhanced Fourier maps with Maximum Entropy estimated 114 extension of reflection sphere
Note: See TracChangeset
for help on using the changeset viewer.