Ignore:
Timestamp:
Jul 2, 2017 7:27:09 PM (6 years ago)
Author:
toby
Message:

merge trunk changes to 2984

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branch/2frame/GSASIIphsGUI.py

    r2893 r2895  
    444444used (not recommended when alpha >> 120 or << 60, due to correlation.)
    445445
     446For standard settings of space groups, space group numbers (1-230) can alternately
     447be entered.
     448
    446449GSAS-II will accept non-standard settings of space groups. For example, space
    447450group "P -1" can be set to include face centering, using symbol "F -1" and "P 1 1 21/a"
     
    452455'''
    453456                dlg = G2G.SingleStringDialog(General,'Get Space Group',
    454                     '  Input the space group with spaces between axial fields  \n  (e.g. p 21/c, P 63/m m c, P 4/m m m',
     457                    '  Input the space group with spaces between axial fields  \n  (e.g. p 21/c, P 63/m m c, P 4/m m m) or enter a space\n  group number between 1 and 230.',
    455458                    value=generalData['SGData']['SpGrp'],help=helptext)
    456459                if not dlg.Show():
     
    458461                    return
    459462                else:
    460                     Flds = dlg.GetValue().split()
    461                     dlg.Destroy()
    462                 #get rid of extra spaces between fields first
    463                 for fld in Flds: fld = fld.strip()
    464                 SpcGp = ' '.join(Flds)
     463                    try:
     464                        # has a space group number been input?
     465                        spcnum = int(dlg.GetValue())
     466                        if 1 <= spcnum <= 230:
     467                            SpcGp = G2spc.spgbyNum[spcnum]
     468                        else:
     469                            msg = 'Space Group Error'
     470                            Style = wx.ICON_EXCLAMATION
     471                            wx.MessageBox('Invalid space group number',caption=msg,style=Style)
     472                            return
     473                    except:
     474                        #get rid of extra spaces between fields first
     475                        Flds = dlg.GetValue().split()
     476                        for fld in Flds: fld = fld.strip()
     477                        SpcGp = ' '.join(Flds)
     478                    finally:
     479                        dlg.Destroy()
    465480                # try a lookup on the user-supplied name
    466481                SpGrpNorm = G2spc.StandardizeSpcName(SpcGp)
     
    481496                    SGTxt.SetLabel(generalData['SGData']['SpGrp'])
    482497                    msg = 'Space Group Information'
    483                     G2gd.SGMessageBox(General,msg,text,table).Show()
     498                    G2G.SGMessageBox(General,msg,text,table).Show()
    484499                if generalData['Type'] == 'magnetic':
    485500                    Nops = len(SGData['SGOps'])*len(SGData['SGCen'])
     
    884899                    generalData['SuperSg'] = SSymbol
    885900                    msg = 'Superspace Group Information'
    886                     G2gd.SGMessageBox(General,msg,text,table).Show()
     901                    G2G.SGMessageBox(General,msg,text,table).Show()
    887902                else:
    888903                    text = [E+'\nSuperspace Group set to previous']
     
    57085723                    copyDict[name] = sourceDict[name][1]
    57095724            elif name in ['Size','Mustrain']:
    5710                 copyDict[name] = [sourceDict[name][0],sourceDict[name][2],sourceDict[name][4]]
     5725                copyDict[name] = [sourceDict[name][0],sourceDict[name][2],sourceDict[name][5]]
    57115726            elif name == 'Pref.Ori.':
    57125727                copyDict[name] = [sourceDict[name][0],sourceDict[name][2]]
     
    57495764                            data['Histograms'][item][name][0] = copy.deepcopy(copyDict[name][0])
    57505765                            data['Histograms'][item][name][2] = copy.deepcopy(copyDict[name][1])
    5751                             data['Histograms'][item][name][4] = copy.deepcopy(copyDict[name][2])
     5766                            data['Histograms'][item][name][5] = copy.deepcopy(copyDict[name][2])
    57525767                        elif name == 'Pref.Ori.':
    57535768                            data['Histograms'][item][name][0] = copy.deepcopy(copyDict[name][0])
Note: See TracChangeset for help on using the changeset viewer.