Changeset 793 for trunk/GSASII.py


Ignore:
Timestamp:
Oct 24, 2012 9:38:52 AM (10 years ago)
Author:
vondreele
Message:

more iparm fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r792 r793  
    557557            S = File.readline()               
    558558        File.close()
    559         return dict(zip(newItems,zip(newVals,newVals,len(newVals)*[False,])))
     559        inst = dict(zip(newItems,zip(newVals,newVals,len(newVals)*[False,])))
     560        for item in inst:
     561            inst[item] = list(inst[item])
     562        return inst
    560563       
    561564    def ReadPowderIparm(self,instfile,bank,databanks,rd):
     
    655658                    data.extend([0.0,0.0,0.002,azm])                                      #OK defaults if fxn #3 not 1st in iprm file
    656659                codes.extend([0,0,0,0,0,0,0])
    657                 return dict(zip(names,zip(data,data,codes)))
     660                inst = dict(zip(names,zip(data,data,codes)))
     661                for item in inst:
     662                    inst[item] = list(inst[item])
     663                return inst
    658664            elif 'T' in DataType:
    659665                names = ['Type','2-theta','difC','difA','Zero','alpha','beta-0','beta-1','var-inst','X','Y','Azimuth']
     
    682688                        s = Iparm['INS  1PRCF12'].split()
    683689                        data.extend([G2IO.sfloat(s[0]),0.0,0.0,azm])
    684                 return dict(zip(names,zip(data,data,codes)))
     690                inst = dict(zip(names,zip(data,data,codes)))
     691                for item in inst:
     692                    inst[item] = list(inst[item])
     693                return inst
    685694
    686695        # stuff we might need from the reader
     
    11191128                data = ['PKS',Cuka,0.0]
    11201129                names = ['Type','Lam','Zero']
    1121                 codes = [0,0]
    1122                 self.PatternTree.SetItemPyData(self.PatternTree.AppendItem(Id,text='Instrument Parameters'),dict(zip(names,zip(data,data,codes))))
     1130                codes = [0,0,0]
     1131                inst = dict(zip(names,zip(data,data,codes)))
     1132                for item in inst:
     1133                    inst[item] = list(inst[item])
     1134            self.PatternTree.SetItemPyData(self.PatternTree.AppendItem(Id,text='Instrument Parameters'),inst)
    11231135                self.PatternTree.SetItemPyData(self.PatternTree.AppendItem(Id,text='Comments'),comments)
    11241136                self.PatternTree.SetItemPyData(self.PatternTree.AppendItem(Id,text='Index Peak List'),peaks)
     
    14301442        SumList = []
    14311443        Names = []
    1432         Inst = []
     1444        Inst = {}
    14331445        SumItemList = []
    14341446        Comments = ['Sum equals: \n']
Note: See TracChangeset for help on using the changeset viewer.