Changeset 2786


Ignore:
Timestamp:
Apr 16, 2017 4:16:30 PM (5 years ago)
Author:
vondreele
Message:

fix seq REFD results display
fix 'Rough' problems

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r2780 r2786  
    39583958        Types += [wg.GRID_VALUE_FLOAT+':10,3',]
    39593959    # add % change in Chi^2 in last cycle
    3960     if histNames[0][:4] not in ['SASD','IMG '] and Controls.get('ShowCell'):
     3960    if histNames[0][:4] not in ['SASD','IMG ','REFD'] and Controls.get('ShowCell'):
    39613961        G2frame.colList += [[100.*data[name]['Rvals'].get('DelChi2',-1) for name in histNames]]
    39623962        G2frame.colSigs += [None]
     
    42184218        G2frame.dataFrame.setSizePosLeft([700,350])
    42194219    # highlight unconverged shifts
    4220     if histNames[0][:4] not in ['SASD','IMG ']:
     4220    if histNames[0][:4] not in ['SASD','IMG ','REFD',]:
    42214221        for row,name in enumerate(histNames):
    42224222            deltaChi = G2frame.SeqTable.GetValue(row,deltaChiCol)
     
    46714671        prfx = G2frame.PatternTree.GetItemText(item).split()[0]
    46724672        prfx1 = G2frame.PatternTree.GetItemText(parentID).split()[0]
    4673         if prfx in ('IMG','PKS','PWDR','SASD','HKLF','PDF',):
     4673        if prfx in ('IMG','PKS','PWDR','SASD','HKLF','PDF','refd',):
    46744674            G2frame.dataFrame.helpKey = prfx
    4675         elif prfx1 in ('IMG','PKS','PWDR','SASD','HKLF','PDF',):
     4675        elif prfx1 in ('IMG','PKS','PWDR','SASD','HKLF','PDF','REFD',):
    46764676            suffix = G2frame.PatternTree.GetItemText(item)
    46774677            suffix1 = suffix.split()[0]
  • trunk/GSASIIpwd.py

    r2785 r2786  
    19891989            for parm in ['Thick','Rough','DenMul','Mag SLD','iDenMul']:
    19901990                if parm in layer:
    1991                     layer[parm][0] = parmDict[cid+parm]
     1991                    if parm == 'Rough':
     1992                        layer[parm][0] = abs(parmDict[cid+parm])    #make positive
     1993                    else:
     1994                        layer[parm][0] = parmDict[cid+parm]
    19921995                    line += ' %s: %.3f'%(parm,layer[parm][0])
    19931996                    if cid+parm in varyList:
     
    20622065    if varyList:
    20632066        if data['Minimizer'] == 'LMLS':
    2064             result = so.leastsq(calcREFD,values,full_output=True,epsfcn=1.e-8,   #ftol=Ftol,
     2067            result = so.leastsq(calcREFD,values,full_output=True,epsfcn=1.e-8,ftol=1.e-6,
    20652068                args=(Q[Ibeg:Ifin],Io[Ibeg:Ifin],wtFactor*wt[Ibeg:Ifin],Qsig[Ibeg:Ifin],parmDict,varyList))
    20662069            parmDict.update(zip(varyList,result[0]))
     
    21282131            indx = Negs.nonzero()
    21292132            name = varyList[indx[0][0]]
    2130             if name != 'FltBack' and name.split(';')[1] in ['Thick','Rough']:
     2133            if name != 'FltBack' and name.split(';')[1] in ['Thick',]:
    21312134                Msg += ' negative coefficient for '+name+'!'
    21322135                raise ValueError
  • trunk/GSASIIpwdGUI.py

    r2785 r2786  
    559559            Id = G2frame.PatternTree.AppendItem(parent=G2frame.root,text='Sequential peak fit results')
    560560        SeqResult = {'SeqPseudoVars':{},'SeqParFitEqList':[]}
     561        SeqResult['histNames'] = names
    561562        Reverse = False
    562563        CopyForward = False
     
    41714172                SeqResult = {}
    41724173                Id = G2frame.PatternTree.AppendItem(parent=G2frame.root,text='Sequential SASD results')
    4173             SeqResult['histNames'] = choices
     4174            SeqResult['histNames'] = names
    41744175            SeqResult = {'SeqPseudoVars':{},'SeqParFitEqList':[]}
    41754176        else:
     
    48404841                SeqResult = {}
    48414842                Id = G2frame.PatternTree.AppendItem(parent=G2frame.root,text='Sequential REFD results')
    4842             SeqResult['histNames'] = choices
    48434843            SeqResult = {'SeqPseudoVars':{},'SeqParFitEqList':[]}
     4844            SeqResult['histNames'] = names
    48444845        else:
    48454846            dlg.Destroy()
     
    48724873                if i and CopyForward:
    48734874                    G2frame.PatternTree.SetItemPyData(G2gd.GetPatternTreeItemId(G2frame,sId, 'Models'),JModel)
    4874                 IProfDict,IProfile = G2frame.PatternTree.GetItemPyData(Id)[:2]
     4875                IProfDict,IProfile = G2frame.PatternTree.GetItemPyData(sId)[:2]
    48754876                IModel = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,sId, 'Models'))
    4876                 ISubstances = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,sId, 'Substances'))
     4877                ISubstances = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,sId, 'Substances'))['Substances']
    48774878                ILimits = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,sId, 'Limits'))
    48784879                IfOK,result,varyList,sig,Rvals,covMatrix,parmDict,Msg = G2pwd.REFDRefine(IProfile,IProfDict,Inst,ILimits,ISubstances,IModel)
Note: See TracChangeset for help on using the changeset viewer.