Changeset 4302 for trunk/GSASIIimgGUI.py


Ignore:
Timestamp:
Feb 14, 2020 10:00:32 AM (3 years ago)
Author:
vondreele
Message:

full implementation of the new spotmask finder.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimgGUI.py

    r4301 r4302  
    437437        CleanupMasks(masks)
    438438        sumImg = GetImageZ(G2frame,data)
     439        if not masks['SpotMask']['spotMask'] is None:
     440            sumImg = ma.array(sumImg,mask=masks['SpotMask']['spotMask'])
    439441        G2frame.Integrate = G2img.ImageIntegrate(sumImg,data,masks,blkSize,useTA=useTA,useMask=useMask)           
    440442        G2frame.PauseIntegration = G2frame.Integrate[-1]
     
    16451647            Controls = copy.deepcopy(G2frame.GPXtree.GetItemPyData(
    16461648                G2gd.GetGPXtreeItemId(G2frame,G2frame.Image,'Image Controls')))
    1647             nChans = Controls['outChannels']
    1648             dlg = wx.ProgressDialog("Auto spot masking","Processed 2-theta rings = ",nChans+1,
     1649            wave = Controls['wavelength']
     1650            LUtth = np.array(Controls['IOtth'])
     1651            dsp0 = wave/(2.0*sind(LUtth[0]/2.0))
     1652            dsp1 = wave/(2.0*sind(LUtth[1]/2.0))
     1653            x0 = G2img.GetDetectorXY(dsp0,0.0,Controls)[0]
     1654            x1 = G2img.GetDetectorXY(dsp1,0.0,Controls)[0]   
     1655            nChans = int(1000*(x1-x0)/Controls['pixelSize'][0])
     1656            dlg = wx.ProgressDialog("Auto spot masking for %d bins"%nChans,"Processed 2-theta rings = ",nChans+1,
    16491657                style = wx.PD_ELAPSED_TIME|wx.PD_CAN_ABORT)
    1650             Error = G2img.AutoSpotMasks2(G2frame.ImageZ,data,Controls,dlg)
     1658            Error = G2img.AutoSpotMasks2(G2frame.ImageZ,data,Controls,nChans,dlg)
    16511659            if not Error is None:
    16521660                G2frame.ErrorDialog('Auto spot search error',Error)
Note: See TracChangeset for help on using the changeset viewer.