Changeset 698 for trunk/GSASIIphsGUI.py


Ignore:
Timestamp:
Aug 3, 2012 3:50:30 PM (10 years ago)
Author:
vondreele
Message:

implement Pawley update from reflection list
a bit more for stress/atrain

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r697 r698  
    37483748                pass
    37493749        FillPawleyReflectionsGrid()
     3750
     3751    def OnPawleyUpdate(event):
     3752        try:
     3753            Refs = data['Pawley ref']
     3754            Histograms = data['Histograms']
     3755        except KeyError:
     3756            print '**** Error - no histograms defined for this phase ****'
     3757            return
     3758        HistoNames = Histograms.keys()
     3759        PatternId = G2gd.GetPatternTreeItemId(G2frame,G2frame.root,HistoNames[0])
     3760        refData = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId,'Reflection Lists'))[PhaseName]
     3761        for iref,ref in enumerate(Refs):
     3762            try:
     3763                ref[6] = refData[iref][9]
     3764                ref[7] = 1.0
     3765            except IndexError:
     3766                pass
     3767        FillPawleyReflectionsGrid()
    37503768                           
    37513769    def OnPawleyDelete(event):
     
    40354053            G2frame.dataFrame.Bind(wx.EVT_MENU, OnPawleyLoad, id=G2gd.wxID_PAWLEYLOAD)
    40364054            G2frame.dataFrame.Bind(wx.EVT_MENU, OnPawleyEstimate, id=G2gd.wxID_PAWLEYESTIMATE)
     4055            G2frame.dataFrame.Bind(wx.EVT_MENU, OnPawleyUpdate, id=G2gd.wxID_PAWLEYUPDATE)
    40374056            G2frame.dataFrame.Bind(wx.EVT_MENU, OnPawleyDelete, id=G2gd.wxID_PAWLEYDELETE)           
    40384057            FillPawleyReflectionsGrid()
Note: See TracChangeset for help on using the changeset viewer.