Changeset 1498 for trunk/GSASIIpwdGUI.py


Ignore:
Timestamp:
Sep 16, 2014 4:20:57 PM (7 years ago)
Author:
vondreele
Message:

try to implement drag/drop of tree items - commented out as it doesn't work
add 'ShowCell?' to Controls to avoid cell errors for sequential single peak fitting when normal sequential refinement has been done
fix a neg. peak width error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r1496 r1498  
    407407        dlg.Destroy()
    408408        SeqResult = {'histNames':names}
     409        Reverse = False
     410        CopyForward = False
     411        choice = ['Copy from prev.',]       #'Reverse sequence',
     412        dlg = wx.MultiChoiceDialog(G2frame.dataFrame,'Sequential controls','Select controls',choice)
     413        if dlg.ShowModal() == wx.ID_OK:
     414            for sel in dlg.GetSelections():
     415                if sel:
     416                    CopyForward = True
     417                else:
     418                    Reverse = True
    409419        dlg.Destroy()
    410420        dlg = wx.ProgressDialog('Sequential peak fit','Data set name = '+names[0],len(names),
    411421            style = wx.PD_ELAPSED_TIME|wx.PD_AUTO_HIDE|wx.PD_REMAINING_TIME|wx.PD_CAN_ABORT)
     422        Controls = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,G2frame.root, 'Controls'))
    412423        controls = {'deriv type':'analytic','min dM/M':0.0001,}
     424        Controls['ShowCell'] = False
    413425        print 'Peak Fitting with '+controls['deriv type']+' derivatives:'
    414426        oneCycle = False
     
    421433                    break
    422434                PatternId =  G2gd.GetPatternTreeItemId(G2frame,G2frame.root,name)
     435                if i and CopyForward:
     436                    G2frame.PatternTree.SetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'Peak List'),peaks)
    423437                peaks = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'Peak List'))
    424438                background = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'Background'))
     
    444458                print ' ***** Sequential peak fit successful *****'
    445459        finally:
    446             wx.EndBusyCursor()   
     460            wx.EndBusyCursor()
    447461        Id =  G2gd.GetPatternTreeItemId(G2frame,G2frame.root,'Sequential results')
    448462        if Id:
Note: See TracChangeset for help on using the changeset viewer.