Changeset 346


Ignore:
Timestamp:
Aug 18, 2011 9:00:13 PM (12 years ago)
Author:
vondreele
Message:

GSASIIgrid.py - clear peaks from peak fit list & allow change from lam to lam1 & lam2
avoid log(neg) in image plots

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r342 r346  
    4040] = [wx.NewId() for _init_coll_PAWLEY_Items in range(3)]
    4141
    42 [ wxID_INSTPRMRESET,
    43 ] = [wx.NewId() for _init_coll_INST_Items in range(1)]
     42[ wxID_INSTPRMRESET,wxID_CHANGEWAVETYPE,
     43] = [wx.NewId() for _init_coll_INST_Items in range(2)]
    4444
    4545[ wxID_INDXRELOAD,
    4646] = [wx.NewId() for _init_coll_IndPeaks_Items in range(1)]
    4747
    48 [ wxID_UNDO,wxID_LSQPEAKFIT,wxID_LSQONECYCLE,wxID_BFGSPEAKFIT,wxID_RESETSIGGAM,
     48[ wxID_UNDO,wxID_LSQPEAKFIT,wxID_LSQONECYCLE,wxID_RESETSIGGAM,wxID_CLEARPEAKS,
    4949] = [wx.NewId() for _init_coll_PEAK_Items in range(5)]
    5050
     
    195195        parent.Append(help='Reset instrument profile parameters to default',
    196196            id=wxID_INSTPRMRESET, kind=wx.ITEM_NORMAL,text='Reset profile')
     197        parent.Append(help='Change radiation type (Ka12 - synch)',
     198            id=wxID_CHANGEWAVETYPE, kind=wx.ITEM_NORMAL,text='Change radiation')
    197199
    198200    def _init_coll_Peak_Items(self,parent):
     
    203205        self.PFOneCycle = parent.Append(id=wxID_LSQONECYCLE, kind=wx.ITEM_NORMAL,text='LSQ one cycle',
    204206            help='One cycle of Peak fitting via least-squares' )
    205 #        self.PeakFit = parent.Append(id=wxID_BFGSPEAKFIT, kind=wx.ITEM_NORMAL,text='BFGS PeakFit',
    206 #            help='Peak fitting via BFGS algorithm' )
    207207        self.ResetSigGam = parent.Append(id=wxID_RESETSIGGAM, kind=wx.ITEM_NORMAL,
    208208            text='Reset sig and gam',help='Reset sigma and gamma to global fit' )
     209        self.PeakFit = parent.Append(id=wxID_CLEARPEAKS, kind=wx.ITEM_NORMAL,text='Clear peaks',
     210            help='Clear the peak list' )
    209211           
    210212    def _init_coll_Index_Items(self,parent):
  • trunk/GSASIIplot.py

    r342 r346  
    16441644    try:
    16451645        if self.PatternTree.GetItemText(self.PickId) in ['Image Controls',]:
     1646            Choice = (' key press','l: log(I) on',)
    16461647            if self.logPlot:
    1647                 Choice = (' key press','l: log(I) off')
    1648             else:
    1649                 Choice = (' key press','l: log(I) on')
     1648                Choice[1] = 'l: log(I) off'
    16501649            cb = wx.ComboBox(self.G2plotNB.status,style=wx.CB_DROPDOWN|wx.CB_READONLY,
    16511650                choices=Choice)
     
    16921691            AM = G2img.ImageCompress(MaskA,imScale)
    16931692            if self.logPlot:
    1694                 A = np.log(A)
    1695                 AM = np.log(AM)
     1693                A = np.where(A>0,np.log(A),0)
     1694                AM = np.where(AM>0,np.log(AM),0)
    16961695                Imin,Imax = [np.amin(A),np.amax(A)]
    16971696            ImgM = Plot.imshow(AM,aspect='equal',cmap='Reds',
Note: See TracChangeset for help on using the changeset viewer.