Changeset 4316


Ignore:
Timestamp:
Feb 17, 2020 7:30:29 AM (4 years ago)
Author:
vondreele
Message:

slight streamline of AutoSpotMask2 - a bit faster

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r4302 r4316  
    15241524    dtth = (LUtth[1]-LUtth[0])/numChans
    15251525    esdMul = Masks['SpotMask']['esdMul']
    1526     mask = ma.make_mask_none(Image.shape)   
     1526    mask = ma.make_mask_none(Image.shape)
     1527    band = ma.array(Image,mask=ma.nomask)
    15271528    TA = Make2ThetaAzimuthMap(Controls,(0,Image.shape[0]),(0,Image.shape[1]))[0]    #2-theta array
    15281529    TThs = np.linspace(LUtth[0],LUtth[1],numChans,False)
    15291530    for it,TTh in enumerate(TThs):
    1530         band = ma.array(Image,mask=ma.getmask(ma.masked_outside(TA,TTh,TTh+dtth)))
     1531        band.mask = ma.masked_outside(TA,TTh,TTh+dtth).mask
    15311532        std = ma.std(band)
    15321533        anom = band.anom()/std
    15331534        anom = ma.masked_greater(anom,esdMul,copy=False)
    1534         mask ^= (ma.getmask(anom)^ma.getmask(band))
     1535        mask ^= (anom.mask^band.mask)
    15351536        if not dlg is None:
    15361537            GoOn = dlg.Update(it,newmsg='Processed 2-theta rings = %d'%(it))
Note: See TracChangeset for help on using the changeset viewer.