Changeset 425


Ignore:
Timestamp:
Nov 21, 2011 9:32:14 AM (12 years ago)
Author:
vondreele
Message:

get As from Dijs in seqdata plotting

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r420 r425  
    15051505        self.OnFileSave(event)
    15061506        #works - but it'd be better if it could restore plots
    1507         dlg = wx.ProgressDialog('Residual','wRp =',101.0,
     1507        dlg = wx.ProgressDialog('Residual','Powder profile Rwp =',101.0,
    15081508            style = wx.PD_ELAPSED_TIME|wx.PD_AUTO_HIDE|wx.PD_CAN_ABORT)
    15091509        screenSize = wx.ClientDisplayRect()
  • trunk/GSASIIgrid.py

    r424 r425  
    8686
    8787class MyHelp(wx.Menu):
    88     def __init__(self,title=''):
     88    def __init__(self,title='',helpType='this item'):
    8989        wx.Menu.__init__(self,title)
    90         self.Append(help='Help on this item',id=wxID_HELP, kind=wx.ITEM_NORMAL,
     90        self.helpType = helpType            #there must be some way to get this
     91        self.Append(help='Help on '+helpType,id=wxID_HELP, kind=wx.ITEM_NORMAL,
    9192            text='Help')                           
    9293
     
    9798    def _init_coll_AtomsMenu(self,parent):
    9899        parent.Append(menu=self.AtomEdit, title='Edit')
    99         parent.Append(menu=MyHelp(),title='Help' )
     100        parent.Append(menu=MyHelp(helpType='Atoms'),title='Help')
    100101       
    101102    def _init_coll_ConstraintMenu(self,parent):
    102103        parent.Append(menu=self.ConstraintEdit, title='Edit')
    103         parent.Append(menu=MyHelp(),title='Help' )
     104        parent.Append(menu=MyHelp(helpType='Constraints'),title='Help')
    104105       
    105106    def _init_coll_RestraintMenu(self,parent):
    106107        parent.Append(menu=self.RestraintEdit, title='Edit')
    107         parent.Append(menu=MyHelp(),title='Help' )
     108        parent.Append(menu=MyHelp(helpType='Restraints'),title='Help')
    108109       
    109110    def _init_coll_DataMenu(self,parent):
    110111        parent.Append(menu=self.DataEdit, title='Edit')
    111         parent.Append(menu=MyHelp(),title='Help' )
     112        parent.Append(menu=MyHelp(helpType='Data'),title='Help')
    112113       
    113114    def _init_coll_DrawAtomsMenu(self,parent):
    114115        parent.Append(menu=self.DrawAtomEdit, title='Edit')
    115         parent.Append(menu=MyHelp(),title='Help' )
     116        parent.Append(menu=MyHelp(helpType='Draw Atoms'),title='Help')
    116117
    117118    def _init_coll_PawleyMenu(self,parent):
    118119        parent.Append(menu=self.PawleyEdit,title='Operations')
    119         parent.Append(menu=MyHelp(),title='Help' )
     120        parent.Append(menu=MyHelp(helpType='Pawley'),title='Help')
    120121     
    121122    def _init_coll_IndPeaksMenu(self,parent):
    122123        parent.Append(menu=self.IndPeaksEdit,title='Operations')
    123         parent.Append(menu=MyHelp(),title='Help' )
     124        parent.Append(menu=MyHelp(helpType='Index Peaks'),title='Help')
    124125                   
    125126    def _init_coll_ImageMenu(self,parent):
    126127        parent.Append(menu=self.ImageEdit, title='Operations')
    127         parent.Append(menu=MyHelp(),title='Help' )
     128        parent.Append(menu=MyHelp(helpType='Images'),title='Help')
    128129       
    129130    def _init_coll_BackMenu(self,parent):
    130131        parent.Append(menu=self.BackEdit, title='File')
    131         parent.Append(menu=MyHelp(),title='Help' )
     132        parent.Append(menu=MyHelp(helpType='Background'),title='Help')
    132133       
    133134    def _init_coll_LimitMenu(self,parent):
    134135        parent.Append(menu=self.LimitEdit, title='File')
    135         parent.Append(menu=MyHelp(),title='Help' )
     136        parent.Append(menu=MyHelp(helpType='Limits'),title='Help')
    136137       
    137138    def _init_coll_InstMenu(self,parent):
    138139        parent.Append(menu=self.InstEdit, title='Operations')
    139         parent.Append(menu=MyHelp(),title='Help' )
     140        parent.Append(menu=MyHelp(helpType='Instrument Parameters'),title='Help')
    140141       
    141142    def _init_coll_MaskMenu(self,parent):
    142143        parent.Append(menu=self.MaskEdit, title='Operations')
    143         parent.Append(menu=MyHelp(),title='Help' )
     144        parent.Append(menu=MyHelp(helpType='Image Masks'),title='Help')
    144145       
    145146    def _init_coll_SampleMenu(self,parent):
    146147        parent.Append(menu=self.SampleEdit, title='File')
    147         parent.Append(menu=MyHelp(),title='Help' )
     148        parent.Append(menu=MyHelp(helpType='Sample Parameters'),title='Help')
    148149       
    149150    def _init_coll_PeakMenu(self,parent):
    150151        parent.Append(menu=self.PeakEdit, title='Peak Fitting')
    151         parent.Append(menu=MyHelp(),title='Help' )
     152        parent.Append(menu=MyHelp(helpType='Powder Peaks'),title='Help')
    152153
    153154    def _init_coll_IndexMenu(self,parent):
    154155        parent.Append(menu=self.IndexEdit, title='Cell Index/Refine')
    155         parent.Append(menu=MyHelp(),title='Help' )
     156        parent.Append(menu=MyHelp(helpType='Cell Indexing/Refine'),title='Help')
    156157       
    157158    def _init_coll_ReflMenu(self,parent):
    158159        parent.Append(menu=self.ReflEdit, title='Reflection List')
    159         parent.Append(menu=MyHelp(),title='Help' )
     160        parent.Append(menu=MyHelp(helpType='Reflection List'),title='Help')
    160161
    161162    def _init_coll_TextureMenu(self,parent):
    162163        parent.Append(menu=self.TextureEdit, title='Texture')
    163         parent.Append(menu=MyHelp(),title='Help' )
     164        parent.Append(menu=MyHelp(helpType='Texture'),title='Help')
    164165
    165166    def _init_coll_PDFMenu(self,parent):
    166167        parent.Append(menu=self.PDFEdit, title='PDF Controls')
    167         parent.Append(menu=MyHelp(),title='Help' )
     168        parent.Append(menu=MyHelp(helpType='PDF Controls'),title='Help')
    168169
    169170    def _init_coll_Atom_Items(self,parent):
     
    677678            if 'All' in names:
    678679                names = choices[1:]
    679                
     680            data['Seq Data'] = names               
    680681        dlg.Destroy()
    681         data['Seq Data'] = names
    682682        reverseSel.Enable(True)
    683683       
     
    795795            if colLabels[parm] in atomList:
    796796                sigData.append(sigList[colLabels.index(atomList[colLabels[parm]])])
     797            elif colLabels[parm] in cellList:
     798                sigData.append(sigList[colLabels.index(cellList[colLabels[parm]])])
    797799            else:
    798800                sigData.append(sigList[parm])
     
    818820    if self.dataDisplay:
    819821        self.dataDisplay.Destroy()
     822    cellList = {}
     823    newCellDict = data[histNames[0]]['newCellDict']
     824    for item in newCellDict:
     825        if item in data['varyList']:
     826            cellList[newCellDict[item][0]] = item
    820827    atomList = {}
    821828    newAtomDict = data[histNames[0]]['newAtomDict']
     
    827834    self.dataFrame.SetLabel('Sequental refinement results')
    828835    self.dataFrame.CreateStatusBar()
    829     colLabels = data['varyList']+atomList.keys()
    830     Types = len(data['varyList']+atomList.keys())*[wg.GRID_VALUE_FLOAT,]
     836    colLabels = data['varyList']+atomList.keys()+cellList.keys()
     837    Types = len(data['varyList']+atomList.keys()+cellList.keys())*[wg.GRID_VALUE_FLOAT,]
    831838    seqList = [list(data[name]['variables']) for name in histNames]
    832839   
    833840    for i,item in enumerate(seqList):
    834841        newAtomDict = data[histNames[i]]['newAtomDict']
     842        newCellDict = data[histNames[i]]['newCellDict']
    835843        item += [newAtomDict[atomList[parm]][1] for parm in atomList.keys()]
     844        item += [newCellDict[cellList[parm]][1] for parm in cellList.keys()]
    836845    self.SeqTable = Table(seqList,colLabels=colLabels,rowLabels=histNames,types=Types)
    837846    self.dataDisplay = GSGrid(parent=self.dataFrame)
     
    15681577    for child in Obj.GetChildren():
    15691578        if 'NoteBook' in str(type(child)):
    1570             page = child.GetCurrentPage()
    1571             notebook = page.GetParent()
    1572             num = notebook.GetSelection()
    1573             line = 'Help on '+notebook.GetPageText(num)
     1579            notebook = child.GetCurrentPage().GetParent()
     1580            line = 'Help on '+notebook.GetPageText(notebook.GetSelection())
    15741581    print line
    15751582    print 'Real help will come here as HTML pages'
  • trunk/GSASIImapvars.py

    r421 r425  
    565565            if name not in varyList: continue # if independent var not varied
    566566            for m,v in zip(invmultarr[:,i],varlist):
    567                 print 'add derv',v,'*',m,'to derv',name
     567#                print 'add derv',v,'*',m,'to derv',name
    568568                if m == 0: continue
    569569                dMdv[varyList.index(name)] += m * derivDict[v]
  • trunk/GSASIIstruct.py

    r424 r425  
    17231723    newCellDict = {}
    17241724    Ddict = dict(zip(['D11','D22','D33','D12','D13','D23'],['A'+str(i) for i in range(6)]))
    1725     Adict = dict(zip(['A'+str(i) for i in range(6)],['D11','D22','D33','D12','D13','D23']))
    17261725    for item in varyList:
    17271726        keys = item.split(':')
    17281727        if keys[2] in Ddict:
    1729             key = keys[0]+':'+keys[1]+':'+Ddict[keys[2]]
    1730             newCellDict[key] = parmDict[key]+parmDict[item]
    1731         elif keys[2] in Adict:
    1732             newCellDict[key] = parmDict[item]
    1733            
    1734    
    1735    
     1728            key = keys[0]+'::'+Ddict[keys[2]]
     1729            parm = keys[0]+'::'+keys[2]
     1730            newCellDict[parm] = [key,parmDict[key]+parmDict[item]]
    17361731    return newCellDict
    17371732   
     
    24722467    Rwp = min(100.,np.sqrt(np.sum(M**2)/sumwYo)*100.)
    24732468    if dlg:
    2474         GoOn = dlg.Update(Rwp,newmsg='%s%8.3f%s'%('wRp =',Rwp,'%'))[0]
     2469        GoOn = dlg.Update(Rwp,newmsg='%s%8.3f%s'%('Powder profile Rwp =',Rwp,'%'))[0]
    24752470        if not GoOn:
    24762471            parmDict['saved values'] = values
     
    25522547        Values2Dict(parmDict, varyList, result[0])
    25532548        G2mv.Dict2Map(parmDict,varyList)
    2554         newCellDict = GetNewCellParms(parmDict,varyList)
    2555         newAtomDict = ApplyXYZshifts(parmDict,varyList)
    25562549       
    25572550        Rwp = np.sqrt(chisq/Histograms['sumwYo'])*100.      #to %
     
    25882581#    print 'test2'
    25892582    sigDict = dict(zip(varyList,sig))
     2583    newCellDict = GetNewCellParms(parmDict,varyList)
     2584    print newCellDict
     2585    newAtomDict = ApplyXYZshifts(parmDict,varyList)
    25902586    covData = {'variables':result[0],'varyList':varyList,'sig':sig,
    25912587        'covMatrix':covMatrix,'title':GPXfile,'newAtomDict':newAtomDict,'newCellDict':newCellDict}
     
    27052701            Values2Dict(parmDict, varyList, result[0])
    27062702            G2mv.Dict2Map(parmDict,varyList)
    2707             newCellDict = GetNewCellParms(parmDict,varyList)
    2708             newAtomDict = ApplyXYZshifts(parmDict,varyList)
    27092703           
    27102704            Rwp = np.sqrt(chisq/Histo['sumwYo'])*100.      #to %
     
    27332727        GetFobsSq(Histo,Phases,parmDict,calcControls)
    27342728        sigDict = dict(zip(varyList,sig))
     2729        newCellDict = GetNewCellParms(parmDict,varyList)
     2730        newAtomDict = ApplyXYZshifts(parmDict,varyList)
    27352731        covData = {'variables':result[0],'varyList':varyList,'sig':sig,
    27362732            'covMatrix':covMatrix,'title':histogram,'newAtomDict':newAtomDict,'newCellDict':newCellDict}
Note: See TracChangeset for help on using the changeset viewer.