Changeset 2661


Ignore:
Timestamp:
Jan 26, 2017 12:41:59 PM (5 years ago)
Author:
vondreele
Message:

G(R) peak picking & GUI now done - no CN calc yet & no fitting yet

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r2660 r2661  
    24932493        else:       # a profile point, e.g. a peak
    24942494            if mouse.button == 1:
    2495                 Peaks['Peaks'].append([xy[0],xy[1]*.5,.5,'','','',0.])
     2495                El = data['ElList'].keys()[0]
     2496                Peaks['Peaks'].append([xy[0],(xy[1]-Peaks['Background'][1][1]*xy[0])/.798,.5,'',El,El,0.])
    24962497                Peaks['Peaks'] = G2mth.sortArray(Peaks['Peaks'],0,reverse=False)
    24972498                PlotISFG(G2frame,data,peaks=Peaks,newPlot=False)
  • trunk/GSASIIpwdGUI.py

    r2660 r2661  
    53005300    def peakSizer():
    53015301       
    5302         for item in peaks['Peaks']: print item
     5302        atms = ','.join(data['ElList'].keys())
     5303        colLabels = ['position','magnitude','width','refine','Atom A','Atom B','Cooord. No.']
     5304        Types = 3*[wg.GRID_VALUE_FLOAT+':10,3',]+[wg.GRID_VALUE_CHOICE+': ,P,M,W,PM,PW,MW,PMW',]+     \
     5305            2*[wg.GRID_VALUE_CHOICE+':'+atms,]+[wg.GRID_VALUE_FLOAT+':10,3',]
     5306        rowLabels = range(len(peaks['Peaks']))
     5307        peakTable = G2G.Table(peaks['Peaks'],rowLabels=rowLabels,colLabels=colLabels,types=Types)
     5308        PDFPeaks = G2G.GSGrid(G2frame.dataDisplay)
     5309        PDFPeaks.SetTable(peakTable,False)
     5310        PDFPeaks.SetMargins(0,0)
     5311        PDFPeaks.SetRowLabelSize(40)
     5312        PDFPeaks.AutoSizeColumns(False)
     5313
    53035314        peakBox = wx.BoxSizer(wx.VERTICAL)
    5304        
     5315        peakBox.Add(wx.StaticText(G2frame.dataDisplay,label=' PDF Peaks:'),0,WACV)
     5316        peakBox.Add(PDFPeaks,0,WACV)
    53055317       
    53065318        return peakBox
     
    53225334    mainSizer.Add((5,5),0)
    53235335    mainSizer.Add(backSizer())
    5324     mainSizer.Add((5,5),0)
    5325     mainSizer.Add(peakSizer())
    5326 
     5336    if len(peaks['Peaks']):
     5337        mainSizer.Add((5,5),0)
     5338        mainSizer.Add(peakSizer())
    53275339    mainSizer.Layout()   
    53285340    G2frame.dataDisplay.SetSizer(mainSizer)
Note: See TracChangeset for help on using the changeset viewer.