Changeset 3452


Ignore:
Timestamp:
Jun 26, 2018 4:18:47 AM (3 years ago)
Author:
vondreele
Message:

Add 'C -1' as possible Bravais lattice/space group for Unit cell GUI
fix odd business with basestring in py3. Code failed; just use basestring fine in py3

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrlGUI.py

    r3447 r3452  
    33893389        # make lists of variables of different types along with lists of parameter names, histogram #s, phase #s,...
    33903390        self.parmNames = sorted(list(parmDict.keys()))
    3391         if '2' not in platform.python_version_tuple()[0]: basestring = str
    3392         splitNames = [item.split(':') for item in self.parmNames if len(item) > 3 and not isinstance(self.parmDict[item],basestring)]
     3391        basestr = basestring
     3392        splitNames = [item.split(':') for item in self.parmNames if len(item) > 3 and not isinstance(self.parmDict[item],basestr)]
    33933393        globNames = [':'.join(item) for item in splitNames if not item[0] and not item[1]]
    33943394        if len(globNames):
     
    34283428        count = 0
    34293429        for name in self.choiceDict[self.parmChoice]:
    3430             # skip entries without numerical values
    3431             if '2' not in platform.python_version_tuple()[0]: basestring = str
    3432             if isinstance(self.parmDict[name],basestring): continue
     3430            basestr = basestring
     3431            if isinstance(self.parmDict[name],basestr): continue
    34333432            if 'Refined' in self.listSel and (name not in self.fullVaryList
    34343433                                              ) and (name not in self.varyList):
  • trunk/GSASIIpwdGUI.py

    r3443 r3452  
    25952595    '''
    25962596    bravaisSymb = ['Fm3m','Im3m','Pm3m','R3-H','P6/mmm','I4/mmm',
    2597         'P4/mmm','Fmmm','Immm','Cmmm','Pmmm','C2/m','P2/m','P1']
     2597        'P4/mmm','Fmmm','Immm','Cmmm','Pmmm','C2/m','P2/m','C1','P1']
    25982598    IndexId = G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Index Peak List')
    25992599    Inst = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Instrument Parameters'))[0]
     
    27412741    SPGlist = G2spc.spglist
    27422742    bravaisSymb = ['Fm3m','Im3m','Pm3m','R3-H','P6/mmm','I4/mmm','P4/mmm',
    2743         'Fmmm','Immm','Cmmm','Pmmm','C2/m','P2/m','P1']
     2743        'Fmmm','Immm','Cmmm','Pmmm','C2/m','P2/m','C1','P1']
    27442744    spaceGroups = ['F m 3 m','I m 3 m','P m 3 m','R 3 m','P 6/m m m','I 4/m m m',
    2745         'P 4/m m m','F m m m','I m m m','C m m m','P m m m','C 2/m','P 2/m','P -1']
     2745        'P 4/m m m','F m m m','I m m m','C m m m','P m m m','C 2/m','P 2/m','C -1','P -1']
    27462746    Inst = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Instrument Parameters'))[0]
    27472747    Limits = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Limits'))[1]
     
    30413041        SGData = Phase['General']['SGData']
    30423042        controls[4] = 1
    3043         controls[5] = SGData['SGLatt']+SGData['SGLaue']
     3043        controls[5] = (SGData['SGLatt']+SGData['SGLaue']).replace('-','')
    30443044        controls[6:12] = Cell[1:8]
    30453045        controls[13] = spaceGroups[bravaisSymb.index(controls[5])]
     
    30583058        SGData = rd.Phase['General']['SGData']
    30593059        controls[4] = 1
    3060         controls[5] = SGData['SGLatt']+SGData['SGLaue']
     3060        controls[5] = (SGData['SGLatt']+SGData['SGLaue']).replace('-','')
    30613061        controls[6:12] = Cell[1:8]
    30623062        controls[13] = spaceGroups[bravaisSymb.index(controls[5])]
     
    33503350    [[11,12],10,zip([" Unit cell: a = "," b = "," c = "," beta = "," Vol = "],
    33513351        [(10,5),(10,5),(10,5),(10,3),"%.3f"],[True,True,True,True,False],[0,1,2,4,0])],
    3352     [[13,],8,zip([" Unit cell: a = "," b = "," c = "," Vol = "," alpha = "," beta = "," gamma = "],
     3352    [[13,14],8,zip([" Unit cell: a = "," b = "," c = "," Vol = "," alpha = "," beta = "," gamma = "],
    33533353        [(10,5),(10,5),(10,5),"%.3f",(10,3),(10,3),(10,3)],
    33543354        [True,True,True,False,True,True,True],[0,1,2,0,3,4,5])]]
Note: See TracChangeset for help on using the changeset viewer.