Changeset 2616 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Jan 8, 2017 4:17:15 PM (5 years ago)
Author:
vondreele
Message:

add Durbin-Watson statistic to refinement results for PWDR data
some more spots work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r2615 r2616  
    43494349    def OnImPick(event):
    43504350        'A object has been picked'
     4351       
    43514352        def OnDragIntBound(event):
    43524353            'Respond to the dragging of one of the integration boundaries'
     
    43754376            # compute arcs, etc
    43764377            LRAzim = Data['LRazimuth']                  #NB: integers
    4377             Nazm = Data['outAzimuths']
    4378             delAzm = float(LRAzim[1]-LRAzim[0])/Nazm
    43794378            AzmthOff = Data['azmthOff']
    43804379            IOtth = Data['IOtth']
     
    44154414            Page.figure.gca().draw_artist(pick)
    44164415            Page.canvas.blit(Page.figure.gca().bbox)
     4416           
    44174417        def OnDragMask(event):
    44184418            'Respond to the dragging of a mask'
     
    44234423            Xpos,Ypos = [event.xdata,event.ydata]
    44244424            #if Page.toolbar._active: return # zoom/pan selected
    4425             itemPicked = str(G2frame.itemPicked)
    44264425            Page.canvas.restore_region(savedplot)
    44274426            try:
     
    45784577                print('picktype {} should not happen!'.format(pickType))
    45794578                GSASIIpath.IPyBreak()
    4580             saveLinestyle = [p.get_linestyle() for p in pl]
    4581             for p in pl: p.set_linestyle('dotted') # set line as dotted
    4582             Page.canvas.draw() # refresh without dotted line & save bitmap
    4583             savedplot = Page.canvas.copy_from_bbox(Page.figure.gca().bbox)
    4584             G2frame.cid = Page.canvas.mpl_connect('motion_notify_event', OnDragMask)
    4585             for p,s in zip(pl,saveLinestyle): p.set_linestyle(s) # set back to original
     4579            if event.mouseevent.button == 3:
     4580                if pickType == 'Spot':
     4581                    print 'delete',pick.center
     4582                    del Masks['Points'][pick.itemNumber]
     4583                   
     4584                    Page.canvas.draw() # refresh without dotted line & save bitmap
     4585            else:
     4586                saveLinestyle = [p.get_linestyle() for p in pl]
     4587                for p in pl: p.set_linestyle('dotted') # set line as dotted
     4588                Page.canvas.draw() # refresh without dotted line & save bitmap
     4589                savedplot = Page.canvas.copy_from_bbox(Page.figure.gca().bbox)
     4590                G2frame.cid = Page.canvas.mpl_connect('motion_notify_event', OnDragMask)
     4591                for p,s in zip(pl,saveLinestyle): p.set_linestyle(s) # set back to original
    45864592
    45874593    def OnImRelease(event):
     
    47794785                G2frame.Razim.SetValue(Data['LRazimuth'][1])
    47804786            elif pickType == "Spot" and treeItem == 'Masks':
    4781                 # update the selected circle mask with the last drawn values
    4782                 spotnum = G2frame.itemPicked.itemNumber
    4783                 Masks['Points'][spotnum] = list(G2frame.itemPicked.center) + [
    4784                     2.*G2frame.itemPicked.radius]
     4787                if event.button == 3:
     4788                    # update the selected circle mask with the last drawn values
     4789                    spotnum = G2frame.itemPicked.itemNumber
     4790                    Masks['Points'][spotnum] = list(G2frame.itemPicked.center) + [
     4791                        2.*G2frame.itemPicked.radius]
    47854792                G2imG.UpdateMasks(G2frame,Masks)
    47864793            elif pickType.startswith('Ring') and treeItem == 'Masks':
     
    51925199    atomData = data['Atoms']
    51935200    mapPeaks = []
    5194     vdWRadii = generalData['vdWRadii']
    51955201    if generalData.get('DisAglCtrls',{}):
    51965202        BondRadii = generalData['DisAglCtrls']['BondRadii']
Note: See TracChangeset for help on using the changeset viewer.