Changeset 420 for trunk/GSASIIgrid.py


Ignore:
Timestamp:
Nov 17, 2011 1:35:34 PM (11 years ago)
Author:
vondreele
Message:

small fixes including
move msg = in SetVaryFlags? outside loop
arrange so plot shows Yo-Yc (was other way around)
put Yo-Yc at bottom in multiplot plots
more on seq refinement plots

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r415 r420  
    7979    wxID_PDFCOMPUTE, wxID_PDFCOMPUTEALL, wxID_PDFADDELEMENT, wxID_PDFDELELEMENT,
    8080] = [wx.NewId() for _init_coll_PDF_Items in range(7)]
     81
     82[ wxID_HELP,
     83] = [wx.NewId() for _init_coll_Help_Items in range(1)]
    8184
    8285VERY_LIGHT_GREY = wx.Colour(235,235,235)
     
    309312        self.PDFCompute = parent.Append(help='Compute all PDFs', id=wxID_PDFCOMPUTEALL, kind=wx.ITEM_NORMAL,
    310313            text='Compute all PDFs')
    311        
    312 
     314           
    313315    def _init_utils(self):
    314316        self.BlankMenu = wx.MenuBar()
     
    742744                'title' - histogram name; same as dict item name
    743745                'newAtomDict' - new atom parameters after shifts applied
     746                'newCellDict' - new cell parameters after shifts to A0-A5 applied'
    744747    """
    745748    if not data:
     
    747750        return
    748751    histNames = data['histNames']
    749    
     752       
     753    def GetSampleParms():
     754        sampleParmDict = {'Temperature':[],'Pressure':[],'Humidity':[],'Voltage':[],'Force':[],}
     755        sampleParm = {}
     756        for name in histNames:
     757            Id = GetPatternTreeItemId(self,self.root,name)
     758            sampleData = self.PatternTree.GetItemPyData(GetPatternTreeItemId(self,Id,'Sample Parameters'))
     759            for item in sampleParmDict:
     760                sampleParmDict[item].append(sampleData[item])
     761        for item in sampleParmDict:
     762            frstValue = sampleParmDict[item][0]
     763            if np.any(np.array(sampleParmDict[item])-frstValue):
     764                sampleParm[item] = sampleParmDict[item]           
     765        return sampleParm
     766           
    750767    def GetSigData(parm):
    751768        sigData = []
     
    770787                plotNames.append(self.SeqTable.GetColLabelValue(col))
    771788            plotData = np.array(plotData)
    772             G2plt.PlotSeq(self,plotData,plotSig,plotNames)
     789            G2plt.PlotSeq(self,plotData,plotSig,plotNames,sampleParms)
    773790        elif rows:
    774791            name = histNames[rows[0]]
     
    782799        if item in data['varyList']:
    783800            atomList[newAtomDict[item][0]] = item
     801    sampleParms = GetSampleParms()
    784802    self.dataFrame.SetMenuBar(self.dataFrame.BlankMenu)
    785803    self.dataFrame.SetLabel('Sequental refinement results')
     
    788806    Types = len(data['varyList']+atomList.keys())*[wg.GRID_VALUE_FLOAT,]
    789807    seqList = [list(data[name]['variables']) for name in histNames]
     808   
    790809    for i,item in enumerate(seqList):
    791810        newAtomDict = data[histNames[i]]['newAtomDict']
     
    11221141    self.dataFrame.Bind(wx.EVT_MENU, OnAddEquivalence, id=wxID_EQUIVADD)
    11231142    self.dataFrame.Bind(wx.EVT_MENU, OnAddHold, id=wxID_HOLDADD)
     1143    self.dataFrame.Bind(wx.EVT_MENU, OnHelp, id=wxID_HELP)
    11241144    self.dataDisplay = GSNoteBook(parent=self.dataFrame,size=self.dataFrame.GetClientSize())
    11251145   
     
    15181538        G2plt.PlotPatterns(self)
    15191539     
     1540def OnHelp(event):
     1541    Obj = event.GetEventObject()
     1542    print 'Help on '+Obj.GetTitle()
Note: See TracChangeset for help on using the changeset viewer.