Changeset 3737


Ignore:
Timestamp:
Nov 22, 2018 7:44:46 AM (5 years ago)
Author:
vondreele
Message:

reorder descriptions in front of G2ctrlGUI to alpha order - now easier to find stuff & add a couple more to list
use copy.deepcopy on PDF controls inside autointegrate
fixes to supersymmetry stuff & magnetic stuff to get correct cell multiplicities etc.
A fix t G2strIO to make ssymetry refinements work

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrlGUI.py

    r3736 r3737  
    1717Class or function name             Description
    1818================================  =================================================================
    19 :class:`ValidatedTxtCtrl`          A text control with a built-in call back routine to set dict
    20                                    or list elements. Optionally validates input as float, int or
    21                                    for strings non-blank. Value is set when focus changes
    2219:class:`EnumSelector`              A combo box with a built-in call back routine that
    2320                                   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.
    2424:class:`G2ChoiceButton`            A customized wx.Choice that automatically initializes to
    2525                                   the initial value and saves the choice directly into a dict
     
    3030                                   or list value. Optionally calls function when a
    3131                                   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
    3635:class:`G2MultiChoiceDialog`       Dialog similar to wx.MultiChoiceDialog, but provides
    3736                                   a filter to select choices and buttons to make selection
     
    3938:class:`G2SingleChoiceDialog`      Dialog similar to wx.SingleChoiceDialog, but provides
    4039                                   a filter to help search through choices.
    41 :class:`FlagSetDialog`             Dialog that provides a table of items along with a
    42                                    checkbox for each.
    43 :class:`SingleFloatDialog`         Dialog to obtain a single float value from user, with
    44                                    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.
    4544:class:`MultiDataDialog`           Dialog to obtain multiple data values from user,
    4645                                   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.
    4949:class:`MultiStringDialog`         Dialog to obtain multiple string values from user,
    5050                                   with a description for each value and optional
    5151                                   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.
    5261:class:`SingleIntDialog`           Dialog to obtain a single integer value from user,
    5362                                   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.
    6676: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 select
    69                                    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 the
    72                                    selections(s).
    7377:func:`GetItemOrder`               Creates a dialog for ordering items into columns
    7478:func:`GetImportFile`              Gets one ore more file from the appropriate import
    7579                                   directory, which can be overridden. Arguments follow those
    7680                                   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.
    8487:func:`askSaveFile`                Get a file name from user
    8588:func:`askSaveDirectory`           Get a directory name from user
  • trunk/GSASIIimgGUI.py

    r3563 r3737  
    31293129                PDFdata = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(
    31303130                    G2frame,PDFid, 'PDF Controls'))
    3131                 PDFdata.update(self.pdfControls)
     3131                PDFdata.update(copy.deepcopy(self.pdfControls))
    31323132                if ElList: PDFdata['ElList'] = ElList # override with formula from comments, if present
    31333133                PDFdata['Sample']['Name'] = pwdr
  • trunk/GSASIIphsGUI.py

    r3736 r3737  
    15511551                    wx.MessageBox(Text,caption=msg,style=wx.ICON_EXCLAMATION)
    15521552                else:
     1553                    if "1'" in SpcGp:
     1554                        generalData['Type'] = 'magnetic'
     1555                        generalData['Modulated'] = True
    15531556                    if generalData['Type'] == 'magnetic':
    15541557                        Nops = len(SGData['SGOps'])*len(SGData['SGCen'])
  • trunk/GSASIIpwdGUI.py

    r3736 r3737  
    31363136        controls[5] = brav
    31373137        controls[13] = SPGlist[brav][0]       
     3138        ssopt['Use'] = False
    31383139        wx.CallLater(100,UpdateUnitCellsGrid,G2frame,data)
    31393140       
     
    31413142        controls[13] = spcSel.GetString(spcSel.GetSelection())
    31423143        ssopt['SGData'] = G2spc.SpcGroup(controls[13])[1]
     3144        ssopt['Use'] = False
    31433145        G2frame.dataWindow.RefineCell.Enable(True)
    31443146        OnHklShow(event)
     
    32293231        Symb = SGData['SpGrp']
    32303232        M20 = X20 = 0.
    3231         if ssopt.get('Use',False):
     3233        if ssopt.get('Use',False) and ssopt.get('ssSymb',''):
    32323234            SSGData = G2spc.SSpcGroup(SGData,ssopt['ssSymb'])[1]
    32333235            if SSGData is None:
     
    33033305
    33043306    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]
    33063312        magcells = []           #clear away old mag cells list (if any)
    33073313        controls = controls[:14]+[['0','0','0',' ',' ',' '],[],]
     
    33283334        Cell = Phase['General']['Cell']
    33293335        SGData = Phase['General']['SGData']
     3336        if 'SGGray' not in SGData:
     3337            SGData['SGGray'] = False
    33303338        if Phase['General']['Type'] == 'nuclear' and 'MagSpGrp' in SGData:
    33313339            SGData = G2spc.SpcGroup(SGData['SpGrp'])[1]
     
    33353343            ssopt['ssSymb'] = ssopt['ssSymb'].replace(',','')
    33363344            ssSym = ssopt['ssSymb']
    3337             if SGData['SGGray']:
     3345            if SGData.get('SGGray',False):
    33383346                ssSym = ssSym[:-1]
    33393347            if ssSym not in G2spc.SSChoice(SGData):
     
    33433351                    caption='Unusable super space group',style=wx.ICON_EXCLAMATION)
    33443352            G2frame.dataWindow.RunSubGroups.Enable(False)
     3353        ssopt.update({'Use':False,'ssSymb':'(abg)','ModVec':[0.1,0.1,0.1],'maxH':1})
    33453354        SpGrp = SGData['SpGrp']
    33463355        if 'mono' in SGData['SGSys']:
  • trunk/GSASIIspc.py

    r3736 r3737  
    410410    if SGData.get('SGGray',False):
    411411        SGText[-1] += " 1'"
    412         Mult //= 2
     412        if SGData.get('SGFixed',False): Mult //= 2
    413413    CentStr = 'centrosymmetric'
    414414    if not SGData['SGInv']:
     
    522522    OpsT = []
    523523    for item in table:
     524        if 'for' in item: continue
    524525        M,T = Text2MT(item.split(')')[1].replace(' ',''),CIF=True)
    525526        OpsM.append(M)
     
    532533    for cent in Cent:
    533534        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)
    535536            OpText.append(txt.replace(' ','').lower())
    536537    return OpText
     
    15811582        elif SGData['SGPtGrp'] in ['622',]: #OK
    15821583            for i,j in enumerate([1,8,9]):
     1584#            for i,j in enumerate([2,3,8]):
    15831585                SSGOps[j][0][3,3] = SSGKl[i]
    15841586                if genQ[i]:
     
    16351637        return gensym
    16361638                           
    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.}
    16381640    if SGData['SGLaue'] in ['m3','m3m']:
    16391641        return '(3+1) superlattices not defined for cubic space groups',None
     
    16511653        SSGKl = fixMonoOrtho()
    16521654    Ngen = len(gensym)
     1655    if SGData.get('SGGray',False):
     1656        Ngen -= 1
    16531657    if len(gensym) and Ngen != len(SSGKl):
    16541658        return 'Wrong number of items in generator symbol '+''.join(gensym),None
     
    18151819    Splits supersymmetry symbol into two lists of strings
    18161820    '''
    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 = ''
    18181827    modsym = modsym.replace(',','')
    18191828    if "1'" in modsym:
     
    18621871    SSsymb = SSGData['SSpGrp']
    18631872    if SGData.get('SGGray',False):
    1864         Mult //= 2
     1873        if SGData.get('SGFixed',False): Mult //= 2
    18651874    else:
    1866         if "1'" in SSsymb:
     1875        if "1'" in SSsymb:  #leftover in nonmag phase in mcif file
    18671876            nCen //= 2
    18681877            Mult //= 2
  • trunk/GSASIIstrIO.py

    r3713 r3737  
    12721272                            else:
    12731273                                CSI = G2spc.GetSSfxuinel('Fourier',Stype,iw+1-nx,at[cx:cx+3],SGData,SSGData)
    1274                             uId,uCoef = CSI
     1274                            uId,uCoef = CSI[0]
    12751275                            stiw = str(i)+':'+str(iw)
    12761276                            if Stype == 'Spos':
Note: See TracChangeset for help on using the changeset viewer.