Changeset 3737
- Timestamp:
- Nov 22, 2018 7:44:46 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrlGUI.py
r3736 r3737 17 17 Class or function name Description 18 18 ================================ ================================================================= 19 :class:`ValidatedTxtCtrl` A text control with a built-in call back routine to set dict20 or list elements. Optionally validates input as float, int or21 for strings non-blank. Value is set when focus changes22 19 :class:`EnumSelector` A combo box with a built-in call back routine that 23 20 automatically sets a dict or list entry. 21 :class:'DisAglDialog' Distance/Angle Controls input dialog. 22 :class:`FlagSetDialog` Dialog that provides a table of items along with a 23 checkbox for each. 24 24 :class:`G2ChoiceButton` A customized wx.Choice that automatically initializes to 25 25 the initial value and saves the choice directly into a dict … … 30 30 or list value. Optionally calls function when a 31 31 choice is selected 32 :func:`CallScrolledMultiEditor` Routine for editing many dict- or list-contained items. 33 using the :class:`ScrolledMultiEditor` dialog 34 :class:`ScrolledMultiEditor` wx.Dialog for editing many dict- or list-contained items. 35 with validation. Results are placed in dict or list. 32 :class:`G2ColumnIDDialog` A dialog for matching column data to desired items; some 33 columns may be ignored. 34 :class:`G2HistoDataDialog` A dialog for global edits to histogram data globally 36 35 :class:`G2MultiChoiceDialog` Dialog similar to wx.MultiChoiceDialog, but provides 37 36 a filter to select choices and buttons to make selection … … 39 38 :class:`G2SingleChoiceDialog` Dialog similar to wx.SingleChoiceDialog, but provides 40 39 a filter to help search through choices. 41 :class:` FlagSetDialog` Dialog that provides a table of items along with a42 checkbox for each.43 :class:` SingleFloatDialog` Dialog to obtain a single float value from user, with44 optional range validation.40 :class:`HelpButton` Creates a button labeled with a "?" that when pressed 41 displays help text in a modal message window. 42 :class:`MultiColumnSelection` A dialog that builds a multicolumn table, word wrapping 43 is used for the 2nd, 3rd,... columns. 45 44 :class:`MultiDataDialog` Dialog to obtain multiple data values from user, 46 45 with optional range validation; items can be float, str or bool 47 :class:`SingleStringDialog` Dialog to obtain a single string value from user, 48 with optional an optional default value. 46 :class:`MultiIntegerDialog` Dialog to obtain multiple integer values from user, 47 with a description for each value and optional 48 defaults. 49 49 :class:`MultiStringDialog` Dialog to obtain multiple string values from user, 50 50 with a description for each value and optional 51 51 defaults. 52 :class:`OrderBox` Creates a wx.Panel with scrollbars where items can be 53 ordered into columns. 54 :class:`ScrolledMultiEditor` wx.Dialog for editing many dict- or list-contained items. 55 with validation. Results are placed in dict or list. 56 :class:'SGMagSpinBox' Special version of MessageBox that displays magnetic spin text 57 :class:'SGMessageBox' Special version of MessageBox that displays space group & 58 super space group text in two blocks 59 :class:`SingleFloatDialog` Dialog to obtain a single float value from user, with 60 optional range validation. 52 61 :class:`SingleIntDialog` Dialog to obtain a single integer value from user, 53 62 with optional range validation. 54 :class:`MultiIntegerDialog` Dialog to obtain multiple integer values from user, 55 with a description for each value and optional 56 defaults. 57 :class:`MultiColumnSelection` A dialog that builds a multicolumn table, word wrapping 58 is used for the 2nd, 3rd,... columns. 59 :class:`G2ColumnIDDialog` A dialog for matching column data to desired items; some 60 columns may be ignored. 61 :class:`G2HistoDataDialog` A dialog for global edits to histogram data globally 62 :class:`OrderBox` Creates a wx.Panel with scrollbars where items can be 63 ordered into columns. 64 :class:`HelpButton` Creates a button labeled with a "?" that when pressed 65 displays help text in a modal message window. 63 :class:`SingleStringDialog` Dialog to obtain a single string value from user, 64 with optional an optional default value. 65 :class:`ValidatedTxtCtrl` A text control with a built-in call back routine to set dict 66 or list elements. Optionally validates input as float, int or 67 for strings non-blank. Value is set when focus changes 68 :func:`CallScrolledMultiEditor` Routine for editing many dict- or list-contained items. 69 using the :class:`ScrolledMultiEditor` dialog 70 :func:`Define_wxId` Create a unique wx.Id symbol in _initMenus in :mod:`GSASIIdataGUI`. 71 Such symbols are needed when the menu item is defined in a 72 different location from the wx.Bind that links the menu item 73 to a function. This function allows all the menu Ids to be 74 defined as the menus are created in one place and then can be 75 used in Bind elsewhere in the code. 66 76 :func:`G2MessageBox` Displays text typically used for errors or warnings. 67 :func:`HorizontalLine` Places a line in a Frame or Dialog to separate sections.68 :func:`SelectEdit1Var` Select a variable from a list, then edit it and select69 histograms to copy it to.70 :func:`ItemSelector` Select a single item or multiple items from list of choices.71 Creates and then destroys a wx.Dialog and returns the72 selections(s).73 77 :func:`GetItemOrder` Creates a dialog for ordering items into columns 74 78 :func:`GetImportFile` Gets one ore more file from the appropriate import 75 79 directory, which can be overridden. Arguments follow those 76 80 of :func:`wx.FileDialog` 77 :func:`Define_wxId` Create a unique wx.Id symbol that is global to this 78 module (:mod:`GSASIIctrlGUI`). Such symbols are needed 79 when the menu item is defined in a different location 80 from the wx.Bind that links the menu item to a function. 81 This function allows menu Ids to be 82 defined where they are first used rather than be placed 83 yet a third location somewhere in this module. 81 :func:`HorizontalLine` Places a line in a Frame or Dialog to separate sections. 82 :func:`ItemSelector` Select a single item or multiple items from list of choices. 83 Creates and then destroys a wx.Dialog and returns the 84 selections(s). 85 :func:`SelectEdit1Var` Select a variable from a list, then edit it and select 86 histograms to copy it to. 84 87 :func:`askSaveFile` Get a file name from user 85 88 :func:`askSaveDirectory` Get a directory name from user -
trunk/GSASIIimgGUI.py
r3563 r3737 3129 3129 PDFdata = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId( 3130 3130 G2frame,PDFid, 'PDF Controls')) 3131 PDFdata.update( self.pdfControls)3131 PDFdata.update(copy.deepcopy(self.pdfControls)) 3132 3132 if ElList: PDFdata['ElList'] = ElList # override with formula from comments, if present 3133 3133 PDFdata['Sample']['Name'] = pwdr -
trunk/GSASIIphsGUI.py
r3736 r3737 1551 1551 wx.MessageBox(Text,caption=msg,style=wx.ICON_EXCLAMATION) 1552 1552 else: 1553 if "1'" in SpcGp: 1554 generalData['Type'] = 'magnetic' 1555 generalData['Modulated'] = True 1553 1556 if generalData['Type'] == 'magnetic': 1554 1557 Nops = len(SGData['SGOps'])*len(SGData['SGCen']) -
trunk/GSASIIpwdGUI.py
r3736 r3737 3136 3136 controls[5] = brav 3137 3137 controls[13] = SPGlist[brav][0] 3138 ssopt['Use'] = False 3138 3139 wx.CallLater(100,UpdateUnitCellsGrid,G2frame,data) 3139 3140 … … 3141 3142 controls[13] = spcSel.GetString(spcSel.GetSelection()) 3142 3143 ssopt['SGData'] = G2spc.SpcGroup(controls[13])[1] 3144 ssopt['Use'] = False 3143 3145 G2frame.dataWindow.RefineCell.Enable(True) 3144 3146 OnHklShow(event) … … 3229 3231 Symb = SGData['SpGrp'] 3230 3232 M20 = X20 = 0. 3231 if ssopt.get('Use',False) :3233 if ssopt.get('Use',False) and ssopt.get('ssSymb',''): 3232 3234 SSGData = G2spc.SSpcGroup(SGData,ssopt['ssSymb'])[1] 3233 3235 if SSGData is None: … … 3303 3305 3304 3306 def LoadUnitCell(event): 3305 controls,bravais,cells,dminx,ssopt,magcells = G2frame.GPXtree.GetItemPyData(UnitCellsId) 3307 UnitCellsId = G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Unit Cells List') 3308 data = G2frame.GPXtree.GetItemPyData(UnitCellsId) 3309 if len(data) < 5: 3310 data.append({}) 3311 controls,bravais,cells,dminx,ssopt = data[:5] 3306 3312 magcells = [] #clear away old mag cells list (if any) 3307 3313 controls = controls[:14]+[['0','0','0',' ',' ',' '],[],] … … 3328 3334 Cell = Phase['General']['Cell'] 3329 3335 SGData = Phase['General']['SGData'] 3336 if 'SGGray' not in SGData: 3337 SGData['SGGray'] = False 3330 3338 if Phase['General']['Type'] == 'nuclear' and 'MagSpGrp' in SGData: 3331 3339 SGData = G2spc.SpcGroup(SGData['SpGrp'])[1] … … 3335 3343 ssopt['ssSymb'] = ssopt['ssSymb'].replace(',','') 3336 3344 ssSym = ssopt['ssSymb'] 3337 if SGData ['SGGray']:3345 if SGData.get('SGGray',False): 3338 3346 ssSym = ssSym[:-1] 3339 3347 if ssSym not in G2spc.SSChoice(SGData): … … 3343 3351 caption='Unusable super space group',style=wx.ICON_EXCLAMATION) 3344 3352 G2frame.dataWindow.RunSubGroups.Enable(False) 3353 ssopt.update({'Use':False,'ssSymb':'(abg)','ModVec':[0.1,0.1,0.1],'maxH':1}) 3345 3354 SpGrp = SGData['SpGrp'] 3346 3355 if 'mono' in SGData['SGSys']: -
trunk/GSASIIspc.py
r3736 r3737 410 410 if SGData.get('SGGray',False): 411 411 SGText[-1] += " 1'" 412 Mult //= 2412 if SGData.get('SGFixed',False): Mult //= 2 413 413 CentStr = 'centrosymmetric' 414 414 if not SGData['SGInv']: … … 522 522 OpsT = [] 523 523 for item in table: 524 if 'for' in item: continue 524 525 M,T = Text2MT(item.split(')')[1].replace(' ',''),CIF=True) 525 526 OpsM.append(M) … … 532 533 for cent in Cent: 533 534 for iop,opM in enumerate(list(OpsM)): 534 txt = MT2text([opM,(OpsT[iop]+cent )%1.],reverse)535 txt = MT2text([opM,(OpsT[iop]+cent[:3])%1.],reverse) 535 536 OpText.append(txt.replace(' ','').lower()) 536 537 return OpText … … 1581 1582 elif SGData['SGPtGrp'] in ['622',]: #OK 1582 1583 for i,j in enumerate([1,8,9]): 1584 # for i,j in enumerate([2,3,8]): 1583 1585 SSGOps[j][0][3,3] = SSGKl[i] 1584 1586 if genQ[i]: … … 1635 1637 return gensym 1636 1638 1637 Fracs = {'1/2':0.5,'1/3':1./3,'1':1.0,'0':0.,'s':.5,'t':1./3,'q':.25,'h': 1./6,'a':0.,'b':0.,'g':0.}1639 Fracs = {'1/2':0.5,'1/3':1./3,'1':1.0,'0':0.,'s':.5,'t':1./3,'q':.25,'h':-1./6,'a':0.,'b':0.,'g':0.} 1638 1640 if SGData['SGLaue'] in ['m3','m3m']: 1639 1641 return '(3+1) superlattices not defined for cubic space groups',None … … 1651 1653 SSGKl = fixMonoOrtho() 1652 1654 Ngen = len(gensym) 1655 if SGData.get('SGGray',False): 1656 Ngen -= 1 1653 1657 if len(gensym) and Ngen != len(SSGKl): 1654 1658 return 'Wrong number of items in generator symbol '+''.join(gensym),None … … 1815 1819 Splits supersymmetry symbol into two lists of strings 1816 1820 ''' 1817 modsym,gensym = SSymbol.replace(' ','').split(')') 1821 mssym = SSymbol.replace(' ','').split(')') 1822 if len(mssym) > 1: 1823 modsym,gensym = mssym 1824 else: 1825 modsym = mssym[0] 1826 gensym = '' 1818 1827 modsym = modsym.replace(',','') 1819 1828 if "1'" in modsym: … … 1862 1871 SSsymb = SSGData['SSpGrp'] 1863 1872 if SGData.get('SGGray',False): 1864 Mult //= 21873 if SGData.get('SGFixed',False): Mult //= 2 1865 1874 else: 1866 if "1'" in SSsymb: 1875 if "1'" in SSsymb: #leftover in nonmag phase in mcif file 1867 1876 nCen //= 2 1868 1877 Mult //= 2 -
trunk/GSASIIstrIO.py
r3713 r3737 1272 1272 else: 1273 1273 CSI = G2spc.GetSSfxuinel('Fourier',Stype,iw+1-nx,at[cx:cx+3],SGData,SSGData) 1274 uId,uCoef = CSI 1274 uId,uCoef = CSI[0] 1275 1275 stiw = str(i)+':'+str(iw) 1276 1276 if Stype == 'Spos':
Note: See TracChangeset
for help on using the changeset viewer.