Changeset 698


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

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r697 r698  
    6161] = [wx.NewId() for item in range(2)]
    6262
    63 [ wxID_PAWLEYLOAD, wxID_PAWLEYIMPORT, wxID_PAWLEYDELETE, wxID_PAWLEYESTIMATE,
     63[ wxID_PAWLEYLOAD, wxID_PAWLEYDELETE, wxID_PAWLEYESTIMATE,
     64    wxID_PAWLEYUPDATE,
    6465] = [wx.NewId() for item in range(4)]
    6566
     
    596597        self.PawleyEdit.Append(id=wxID_PAWLEYESTIMATE, kind=wx.ITEM_NORMAL,text='Pawley estimate',
    597598            help='Estimate initial Pawley intensities')
     599        self.PawleyEdit.Append(id=wxID_PAWLEYUPDATE, kind=wx.ITEM_NORMAL,text='Pawley update',
     600            help='Update Pawley intensities from reflection list')
    598601        self.PawleyEdit.Append(id=wxID_PAWLEYDELETE, kind=wx.ITEM_NORMAL,text='Pawley delete',
    599602            help='Delete Pawley reflection list')
  • trunk/GSASIIimage.py

    r695 r698  
    743743    print "Elapsed time:","%8.3f"%(t1-t0), "s"
    744744    return H0,H1,H2
     745   
     746def FitStrSta(Image,StrSta,Controls,Masks):
     747   
     748    print Image.shape
     749    print StrSta
     750    print Controls
     751    print Masks
  • trunk/GSASIIimgGUI.py

    r697 r698  
    11501150
    11511151    def OnFitStrSta(event):
    1152         print 'Fit stress/strain data - does nothing yet'
    1153         event.Skip()
     1152        Masks = G2frame.PatternTree.GetItemPyData(
     1153            G2gd.GetPatternTreeItemId(G2frame,G2frame.Image, 'Masks'))
     1154        Controls = G2frame.PatternTree.GetItemPyData(
     1155            G2gd.GetPatternTreeItemId(G2frame,G2frame.Image, 'Image Controls'))
     1156        G2img.FitStrSta(G2frame.ImageZ,data,Controls,Masks)
    11541157       
    11551158    def SamSizer():
  • 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.