Changeset 2242


Ignore:
Timestamp:
May 6, 2016 1:57:25 PM (6 years ago)
Author:
vondreele
Message:

change default stack inst to Gaussian
provide labels for plots of sequential stacking fault calcs.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r2235 r2242  
    687687        self.parmRange = [0.,1.]
    688688        self.parmStep = 2
    689         self.Inst = 'None'
     689        self.Inst = 'Gaussian'
    690690        self.Draw()
    691691       
  • trunk/GSASIIphsGUI.py

    r2237 r2242  
    25272527        def OnSeqPlot(event):
    25282528            seqPlot.SetValue(False)
    2529             resultXY,resultXY2 = Layers['seqResults']
     2529            resultXY,resultXY2,seqNames = Layers['seqResults']
    25302530            pName = Layers['seqCodes'][0]
    25312531            G2plt.PlotXY(G2frame,resultXY,XY2=resultXY2,labelX=r'$\mathsf{2\theta}$',
    2532             labelY='Intensity',newPlot=True,Title='Sequential simulations on '+pName,lines=False)
     2532                labelY='Intensity',newPlot=True,Title='Sequential simulations on '+pName,
     2533                lines=False,names=seqNames)
    25332534           
    25342535        def CellSizer():
     
    32213222        profile = np.copy(G2frame.PatternTree.GetItemPyData(G2frame.PatternId)[1])
    32223223        resultXY2 = []
    3223         resultXY = [np.vstack((profile[0],profile[1])),]
     3224        resultXY = [np.vstack((profile[0],profile[1])),]    #observed data
    32243225        data['Layers']['selInst'] = simCodes[1]
    32253226        data['Layers']['seqCodes'] = simCodes[2:]
     
    32313232        dStep = (BegFin[1]-BegFin[0])/nSteps
    32323233        vals = np.linspace(BegFin[0],BegFin[1],nSteps+1,True)
     3234        simNames = []
    32333235        for val in vals:
    32343236            print ' Stacking simulation step for '+pName+' = %.5f'%(val)
     3237            simNames.append('%.3f'%(val))
    32353238            if 'cell' in pName:
    32363239                cellId = cellSel.index(pName)
     
    32633266            G2pwd.CalcStackingPWDR(Layers,scale,background,limits,inst,profile,False)
    32643267            resultXY2.append([np.vstack((profile[0],profile[3])),][0])
    3265         data['Layers']['seqResults'] = [resultXY,resultXY2]
     3268        data['Layers']['seqResults'] = [resultXY,resultXY2,simNames]
    32663269        wx.MessageBox('Sequential simulation finished',caption='Stacking fault simulation',style=wx.ICON_EXCLAMATION)
    32673270        wx.CallAfter(UpdateLayerData)
  • trunk/GSASIIplot.py

    r2241 r2242  
    24182418################################################################################
    24192419           
    2420 def PlotXY(G2frame,XY,XY2=None,labelX=None,labelY=None,newPlot=False,Title='',lines=False):
     2420def PlotXY(G2frame,XY,XY2=None,labelX=None,labelY=None,newPlot=False,
     2421    Title='',lines=False,names=[]):
    24212422    '''simple plot of xy data, used for diagnostic purposes
    24222423    '''
     
    24382439            #GSASIIpath.IPyBreak()
    24392440            return
    2440         wx.CallAfter(PlotXY,G2frame,XY,XY2,labelX,labelY,False,Title,False)
     2441        wx.CallAfter(PlotXY,G2frame,XY,XY2,labelX,labelY,False,Title,False,names)
    24412442
    24422443    def OnMotion(event):
     
    25012502            dX = Page.Offset[0]*(ixy+1)*Xmax/500.
    25022503            dY = Page.Offset[1]*(ixy+1)*Ymax/100.
    2503             Plot.plot(X+dX,Y+dY,colors[ixy%6],picker=False)
     2504            if len(names):
     2505                Plot.plot(X+dX,Y+dY,colors[ixy%6],picker=False,label=names[ixy])
     2506            else:
     2507                Plot.plot(X+dX,Y+dY,colors[ixy%6],picker=False)
     2508    if len(names):
     2509        Plot.legend(loc='best')
    25042510    if not newPlot:
    25052511        Page.toolbar.push_current()
Note: See TracChangeset for help on using the changeset viewer.