Changeset 342 for trunk/GSASIIgrid.py


Ignore:
Timestamp:
Aug 5, 2011 2:35:43 PM (11 years ago)
Author:
vondreele
Message:

major modifications to get 1st "working" version of Refine
Add GSASIImapvars.py
fix cell refinement in indexing window
single cycle for peak refinement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r335 r342  
    4646] = [wx.NewId() for _init_coll_IndPeaks_Items in range(1)]
    4747
    48 [ wxID_UNDO,wxID_LSQPEAKFIT,wxID_BFGSPEAKFIT,wxID_RESETSIGGAM,
    49 ] = [wx.NewId() for _init_coll_PEAK_Items in range(4)]
     48[ wxID_UNDO,wxID_LSQPEAKFIT,wxID_LSQONECYCLE,wxID_BFGSPEAKFIT,wxID_RESETSIGGAM,
     49] = [wx.NewId() for _init_coll_PEAK_Items in range(5)]
    5050
    5151[  wxID_INDEXPEAKS, wxID_REFINECELL, wxID_COPYCELL, wxID_MAKENEWPHASE,
    5252] = [wx.NewId() for _init_coll_INDEX_Items in range(4)]
     53
     54[ wxID_SELECTPHASE,
     55] = [wx.NewId() for _init_coll_Refl_Items in range(1)]
    5356
    5457[ wxID_PDFCOPYCONTROLS, wxID_PDFSAVECONTROLS, wxID_PDFLOADCONTROLS,
     
    9295        parent.Append(menu=self.IndexEdit, title='Cell Index/Refine')
    9396       
     97    def _init_coll_ReflMenu(self,parent):
     98        parent.Append(menu=self.ReflEdit, title='Reflection List')
     99
    94100    def _init_coll_PDFMenu(self,parent):
    95101        parent.Append(menu=self.PDFEdit, title='PDF Controls')
     
    148154        parent.Append(id=wxID_PAWLEYLOAD, kind=wx.ITEM_NORMAL,text='Pawley create',
    149155            help='Initialize Pawley reflection list')
    150         parent.Append(id=wxID_PAWLEYIMPORT, kind=wx.ITEM_NORMAL,text='Pawley import',
    151             help='Import Pawley reflection list')
     156#        parent.Append(id=wxID_PAWLEYIMPORT, kind=wx.ITEM_NORMAL,text='Pawley import',
     157#            help='Import Pawley reflection list')
    152158        parent.Append(id=wxID_PAWLEYDELETE, kind=wx.ITEM_NORMAL,text='Pawley delete',
    153159            help='Delete Pawley reflection list')
     
    156162        parent.Append(help='Load/Reload index peaks from peak list',id=wxID_INDXRELOAD,
    157163            kind=wx.ITEM_NORMAL,text='Load/Reload')
     164           
     165    def _init_coll_Refl_Items(self,parent):
     166        self.SelectPhase = parent.Append(help='Select phase for reflection list',id=wxID_SELECTPHASE,
     167            kind=wx.ITEM_NORMAL,text='Select phase')
    158168           
    159169    def _init_coll_Image_Items(self,parent):
     
    191201        self.PeakFit = parent.Append(id=wxID_LSQPEAKFIT, kind=wx.ITEM_NORMAL,text='LSQ PeakFit',
    192202            help='Peak fitting via least-squares' )
     203        self.PFOneCycle = parent.Append(id=wxID_LSQONECYCLE, kind=wx.ITEM_NORMAL,text='LSQ one cycle',
     204            help='One cycle of Peak fitting via least-squares' )
    193205#        self.PeakFit = parent.Append(id=wxID_BFGSPEAKFIT, kind=wx.ITEM_NORMAL,text='BFGS PeakFit',
    194206#            help='Peak fitting via BFGS algorithm' )
     
    236248        self.IndPeaksMenu = wx.MenuBar()
    237249        self.IndexMenu = wx.MenuBar()
     250        self.ReflMenu = wx.MenuBar()
    238251        self.PDFMenu = wx.MenuBar()
    239252        self.AtomEdit = wx.Menu(title='')
     
    247260        self.IndPeaksEdit = wx.Menu(title='')
    248261        self.IndexEdit = wx.Menu(title='')
     262        self.ReflEdit = wx.Menu(title='')
    249263        self.PDFEdit = wx.Menu(title='')
    250264        self._init_coll_AtomsMenu(self.AtomsMenu)
     
    268282        self._init_coll_IndexMenu(self.IndexMenu)
    269283        self._init_coll_Index_Items(self.IndexEdit)
     284        self._init_coll_ReflMenu(self.ReflMenu)
     285        self._init_coll_Refl_Items(self.ReflEdit)
    270286        self._init_coll_PDFMenu(self.PDFMenu)
    271287        self._init_coll_PDF_Items(self.PDFEdit)
    272288        self.UnDo.Enable(False)
    273289        self.PeakFit.Enable(False)
     290        self.PFOneCycle.Enable(False)
    274291        self.IndexPeaks.Enable(False)
    275292        self.CopyCell.Enable(False)
     
    879896        else:
    880897            G2plt.PlotPatterns(self)
     898    elif self.PatternTree.GetItemText(item) == 'Reflection Lists':
     899        self.PatternId = self.PatternTree.GetItemParent(item)
     900        self.PickId = item
     901        data = self.PatternTree.GetItemPyData(item)
     902        self.RefList = ''
     903        if len(data):
     904            self.RefList = data.keys()[0]
     905        G2pdG.UpdateReflectionGrid(self,data)
     906        G2plt.PlotPatterns(self)
    881907     
Note: See TracChangeset for help on using the changeset viewer.