Changeset 1364 for trunk/GSASII.py


Ignore:
Timestamp:
May 27, 2014 12:14:59 PM (8 years ago)
Author:
vondreele
Message:

read TOPAZ structure factor files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r1359 r1364  
    722722            HistName = 'HKLF '+HistName
    723723            # make new histogram names unique
    724             HistName = G2obj.MakeUniqueLabel(HistName,HKLFlist)
    725             print 'Read structure factor table '+str(HistName)+' from file '+str(self.lastimport)
    726             if not rd.RefDict.get('FF'):
    727                 rd.RefDict['FF'] = [{} for i in range(len(rd.RefDict['RefList']))]
    728             Id = self.PatternTree.AppendItem(parent=self.root,text=HistName)
    729724            valuesdict = {
    730725                'wtFactor':1.0,
     
    732727                'ranId':ran.randint(0,sys.maxint),
    733728                }
    734             self.PatternTree.SetItemPyData(Id,[valuesdict,rd.RefDict])
    735             Sub = self.PatternTree.AppendItem(Id,text='Instrument Parameters')
    736             self.PatternTree.SetItemPyData(Sub,rd.Parameters)
    737             self.PatternTree.SetItemPyData(
    738                 self.PatternTree.AppendItem(Id,text='HKL Plot Controls'),
    739                 rd.Controls)
    740             self.PatternTree.SetItemPyData(
    741                 self.PatternTree.AppendItem(Id,text='Reflection List'),[])  #dummy entry for GUI use
     729            if len(rd.Banks):
     730                for Bank in rd.Banks:
     731                    HistName = G2obj.MakeUniqueLabel(HistName,HKLFlist)
     732                    print 'Read structure factor table '+str(HistName)+' from file '+str(self.lastimport)
     733                    Id = self.PatternTree.AppendItem(parent=self.root,text=HistName)
     734                    if not Bank['RefDict'].get('FF'):
     735                        Bank['RefDict']['FF'] = [{} for i in range(len(Bank['RefDict']['RefList']))]
     736                    self.PatternTree.SetItemPyData(Id,[valuesdict,Bank['RefDict']])
     737                    Sub = self.PatternTree.AppendItem(Id,text='Instrument Parameters')
     738                    self.PatternTree.SetItemPyData(Sub,copy.copy(rd.Parameters))
     739                    self.PatternTree.SetItemPyData(
     740                        self.PatternTree.AppendItem(Id,text='Reflection List'),[])  #dummy entry for GUI use
     741            else:
     742                HistName = G2obj.MakeUniqueLabel(HistName,HKLFlist)
     743                print 'Read structure factor table '+str(HistName)+' from file '+str(self.lastimport)
     744                if not rd.RefDict.get('FF'):
     745                    rd.RefDict['FF'] = [{} for i in range(len(rd.RefDict['RefList']))]
     746                Id = self.PatternTree.AppendItem(parent=self.root,text=HistName)
     747                print rd.RefDict
     748                self.PatternTree.SetItemPyData(Id,[valuesdict,rd.RefDict])
     749                Sub = self.PatternTree.AppendItem(Id,text='Instrument Parameters')
     750                self.PatternTree.SetItemPyData(Sub,rd.Parameters)
     751                self.PatternTree.SetItemPyData(
     752                    self.PatternTree.AppendItem(Id,text='Reflection List'),[])  #dummy entry for GUI use
     753               
    742754            self.PatternTree.SelectItem(Id)
    743755            self.PatternTree.Expand(Id)
     
    16411653        filelist = []
    16421654        for path in pathlist:
    1643             for filename in glob.iglob(os.path.join(
    1644                 path,
    1645                 "G2export*.py")):
     1655            for filename in glob.iglob(os.path.join(path,"G2export*.py")):
    16461656                filelist.append(filename)   
    16471657        filelist = sorted(list(set(filelist))) # remove duplicates
Note: See TracChangeset for help on using the changeset viewer.