Changeset 794


Ignore:
Timestamp:
Oct 24, 2012 11:46:26 AM (10 years ago)
Author:
vondreele
Message:

still more iparm fixes - maybe that's all of them?

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r793 r794  
    11321132                for item in inst:
    11331133                    inst[item] = list(inst[item])
    1134             self.PatternTree.SetItemPyData(self.PatternTree.AppendItem(Id,text='Instrument Parameters'),inst)
     1134                self.PatternTree.SetItemPyData(self.PatternTree.AppendItem(Id,text='Instrument Parameters'),inst)
    11351135                self.PatternTree.SetItemPyData(self.PatternTree.AppendItem(Id,text='Comments'),comments)
    11361136                self.PatternTree.SetItemPyData(self.PatternTree.AppendItem(Id,text='Index Peak List'),peaks)
  • trunk/GSASIIIO.py

    r793 r794  
    536536            G2frame.PatternTree.SetItemPyData(G2frame.PatternTree.AppendItem(Id,text='Background'),[['chebyschev',1,3,1.0,0.0,0.0],
    537537                            {'nDebye':0,'debyeTerms':[],'nPeaks':0,'peaksList':[]}])
    538             G2frame.PatternTree.SetItemPyData(G2frame.PatternTree.AppendItem(Id,text='Instrument Parameters'),dict(zip(names,zip(parms,parms,codes))))
     538            inst = dict(zip(names,zip(parms,parms,codes)))
     539            for item in inst:
     540                inst[item] = list(inst[item])
     541            G2frame.PatternTree.SetItemPyData(G2frame.PatternTree.AppendItem(Id,text='Instrument Parameters'),inst)
    539542            G2frame.PatternTree.SetItemPyData(G2frame.PatternTree.AppendItem(Id,text='Sample Parameters'),Sample)
    540543            G2frame.PatternTree.SetItemPyData(G2frame.PatternTree.AppendItem(Id,text='Peak List'),[])
  • trunk/GSASIIpwd.py

    r762 r794  
    11361136                           
    11371137    def SetInstParms(Inst):
    1138         insVals,insFlags,insNames = Inst[1:4]
    1139         dataType = insVals[0]
     1138        dataType = Inst['Type'][0]
    11401139        insVary = []
    1141         for i,flag in enumerate(insFlags):
    1142             if flag and insNames[i] in ['U','V','W','X','Y','SH/L','I(L2)/I(L1)']:
    1143                 insVary.append(insNames[i])
     1140        insNames = []
     1141        insVals = []
     1142        for parm in Inst:
     1143            insNames.append(parm)
     1144            insVals.append(Inst[parm][1])
     1145            if parm in ['U','V','W','X','Y','SH/L','I(L2)/I(L1)'] and Inst[parm][2]:
     1146                insVary.append(parm)
    11441147        instDict = dict(zip(insNames,insVals))
    11451148        instDict['X'] = max(instDict['X'],0.01)
     
    11491152       
    11501153    def GetInstParms(parmDict,Inst,varyList,Peaks):
    1151         instNames = Inst[3]
    1152         for i,name in enumerate(instNames):
    1153             Inst[1][i] = parmDict[name]
     1154        for name in Inst:
     1155            Inst[name][1] = parmDict[name]
    11541156        iPeak = 0
    11551157        while True:
     
    11721174        ptstr =  'values:'
    11731175        sigstr = 'esds  :'
    1174         instNames = Inst[3][1:]
    1175         for i,name in enumerate(instNames):
    1176             ptlbls += "%s" % (name.center(12))
    1177             ptstr += ptfmt % (Inst[1][i+1])
    1178             if name in sigDict:
    1179                 sigstr += ptfmt % (sigDict[name])
    1180             else:
    1181                 sigstr += 12*' '
     1176        for parm in Inst:
     1177            if parm in  ['U','V','W','X','Y','SH/L','I(L2)/I(L1)']:
     1178                ptlbls += "%s" % (parm.center(12))
     1179                ptstr += ptfmt % (Inst[parm][1])
     1180                if parm in sigDict:
     1181                    sigstr += ptfmt % (sigDict[parm])
     1182                else:
     1183                    sigstr += 12*' '
    11821184        print ptlbls
    11831185        print ptstr
  • trunk/GSASIIpwdGUI.py

    r792 r794  
    674674                File.close()
    675675                data = dict(zip(newItems,zip(newVals,newVals,len(newVals)*[False,])))
     676                for item in data:
     677                    data[item] = list(data[item])
    676678                G2frame.PatternTree.SetItemPyData(G2gd.GetPatternTreeItemId(G2frame,G2frame.PatternId,'Instrument Parameters'),data)
    677679                RefreshInstrumentGrid(event,doAnyway=True)          #to get peaks updated
Note: See TracChangeset for help on using the changeset viewer.