Changeset 3154 for trunk/GSASIIimgGUI.py


Ignore:
Timestamp:
Nov 18, 2017 6:14:55 PM (5 years ago)
Author:
vondreele
Message:

new & imporved spot mask routines:
manual spot mask now fits position & size for selected spot.
changed mouse controls LB drag moves spot, shift-LB changes size & RB deletes spot
autospotmask improved - new algorithm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimgGUI.py

    r3142 r3154  
    234234        '''
    235235        CleanupMasks(masks)
    236         blkSize = 128   #this seems to be optimal; will break in polymask if >1024
     236        blkSize = 1024   #this seems to be optimal; will break in polymask if >1024
     237#        blkSize = 128   #this seems to be optimal; will break in polymask if >1024
    237238        sumImg = GetImageZ(G2frame,data)
    238239        wx.BeginBusyCursor()
     
    15141515        #   (Imin0, Imax0) => Range[0] = data['range'][0] # lowest to highest pixel intensity
    15151516        #   [Imin, Imax] => Range[1] = data['range'][1] #   lowest to highest pixel intensity on cmap scale
     1517        scaleChoices = ("100%","99%","95%","90%","80%","?")
     1518        scaleSel = wx.Choice(G2frame.dataWindow,choices=scaleChoices,size=(-1,-1))
     1519        if (Range[1][0] == Range[0][0] and Range[1][1] == Range[0][1]):
     1520            scaleSel.SetSelection(0)
     1521        else:
     1522            scaleSel.SetSelection(len(scaleChoices)-1)
     1523        scaleSel.Bind(wx.EVT_CHOICE,OnAutoSet)
     1524       
    15161525        maxSizer = wx.GridBagSizer(0,0)
    15171526        r = c = 0
     
    15331542        maxSizer.Add(maxVal,(r,c))
    15341543        c += 1
    1535         scaleChoices = ("100%","99%","95%","90%","80%","?")
    1536         scaleSel = wx.Choice(G2frame.dataWindow,choices=scaleChoices,size=(-1,-1))
    1537         if (Range[1][0] == Range[0][0] and
    1538             Range[1][1] == Range[0][1]):
    1539             scaleSel.SetSelection(0)
    1540         else:
    1541             scaleSel.SetSelection(len(scaleChoices)-1)
    1542         scaleSel.Bind(wx.EVT_CHOICE,OnAutoSet)
    15431544        maxSizer.Add(scaleSel,(r,c),(2,1),flag=wx.ALIGN_CENTER)
    15441545        c = 0
     
    16241625    mainSizer.Add(littleSizer,0,)
    16251626    if len(Spots):
    1626         lbl = wx.StaticText(parent=G2frame.dataWindow,label=' Spot masks')
     1627        lbl = wx.StaticText(parent=G2frame.dataWindow,label=' Spot masks(on plot LB drag to move, shift-LB drag to resize, RB to delete)')
    16271628        lbl.SetBackgroundColour(wx.Colour(200,200,210))
    16281629        mainSizer.Add(lbl,0,wx.EXPAND|wx.ALIGN_CENTER,0)
Note: See TracChangeset for help on using the changeset viewer.