Changeset 413


Ignore:
Timestamp:
Nov 12, 2011 12:04:15 PM (10 years ago)
Author:
vondreele
Message:

add plotting of new atom coordinates to sequential refinement plots

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r411 r413  
    730730           
    731731def UpdateSeqResults(self,data):
     732    """
     733    input:
     734        data - dictionary
     735            'histNames' - list of histogram names in order as processed by Sequential Refinement
     736            'varyList' - list of variables - identical over all refinements insequence
     737            histName - dictionaries for all data sets processed:
     738                'variables'- result[0] from leastsq call
     739                'varyList' - list of variables; same as above
     740                'sig' - esds for variables
     741                'covMatrix' - covariance matrix from individual refinement
     742                'title' - histogram name; same as dict item name
     743                'newAtomDict' - new atom parameters after shifts applied
     744    """
    732745    if not data:
    733746        print 'No sequential refinement results'
     
    739752        for name in histNames:
    740753            sigList = data[name]['sig']
    741             sigData.append(sigList[parm])
     754            if colLabels[parm] in atomList:
     755                sigData.append(sigList[colLabels.index(atomList[colLabels[parm]])])
     756            else:
     757                sigData.append(sigList[parm])
    742758        return sigData
    743759   
     
    761777    if self.dataDisplay:
    762778        self.dataDisplay.Destroy()
     779    atomList = {}
     780    newAtomDict = data[histNames[0]]['newAtomDict']
     781    for item in newAtomDict:
     782        if item in data['varyList']:
     783            atomList[newAtomDict[item][0]] = item
    763784    self.dataFrame.SetMenuBar(self.dataFrame.BlankMenu)
    764785    self.dataFrame.SetLabel('Sequental refinement results')
    765786    self.dataFrame.CreateStatusBar()
    766     colLabels = data['varyList']
    767     Types = len(data['varyList'])*[wg.GRID_VALUE_FLOAT,]
     787    colLabels = data['varyList']+atomList.keys()
     788    Types = len(data['varyList']+atomList.keys())*[wg.GRID_VALUE_FLOAT,]
    768789    seqList = [list(data[name]['variables']) for name in histNames]
     790    for i,item in enumerate(seqList):
     791        newAtomDict = data[histNames[i]]['newAtomDict']
     792        item += [newAtomDict[atomList[parm]][1] for parm in atomList.keys()]
    769793    self.SeqTable = Table(seqList,colLabels=colLabels,rowLabels=histNames,types=Types)
    770794    self.dataDisplay = GSGrid(parent=self.dataFrame)
Note: See TracChangeset for help on using the changeset viewer.