Changeset 2744


Ignore:
Timestamp:
Mar 6, 2017 10:03:02 AM (5 years ago)
Author:
vondreele
Message:

delt-G(R) cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r2740 r2744  
    50815081       
    50825082        def OnSelectGR(event):
    5083             data['diffGRname'] = grName.GetValue()
    5084             if data['diffGRname']:
     5083            newName = grName.GetValue()
     5084            if newName:
    50855085                data['delt-G(R)'] = copy.deepcopy(data['G(R)'])
    5086                 id = G2gd.GetPatternTreeItemId(G2frame,G2frame.root,data['diffGRname'])
     5086                id = G2gd.GetPatternTreeItemId(G2frame,G2frame.root,newName)
    50875087                pId = G2gd.GetPatternTreeItemId(G2frame,id,'PDF Controls')
    50885088                subData = G2frame.PatternTree.GetItemPyData(pId)['G(R)']
    5089                 if subData[1][0].shape != data['G(R)'][1][0].shape:
    5090                     print 'Error - G(R) not same length'
     5089                if subData[1][0][-1] != data['G(R)'][1][0][-1]:
     5090                    G2frame.ErrorDialog('delt-G(R) Error',' G(R) for '+newName+' not same R range')
     5091                    grName.SetValue(data['diffGRname'])
     5092                    return
     5093                data['diffGRname'] = newName
    50915094                data['delt-G(R)'][1] = np.array([subData[1][0],data['G(R)'][1][1]-subData[1][1]])
    50925095                data['delt-G(R)'][2] += ('-\n'+subData[2])
Note: See TracChangeset for help on using the changeset viewer.