Changeset 4034 for trunk/GSASIIimage.py


Ignore:
Timestamp:
Jun 20, 2019 3:13:53 PM (2 years ago)
Author:
vondreele
Message:

implement xline & yline masks to integration - still checking it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r4032 r4034  
    901901            tam = ma.mask_or(tam,ma.make_mask(pm.polymask(nI*nJ,tax,
    902902                tay,len(polygon),polygon,tamp)[:nI*nJ]))
    903     if True:
    904         for X,Y,rsq in masks['Points'].T:
    905             tam = ma.mask_or(tam,ma.getmask(ma.masked_less((tax-X)**2+(tay-Y)**2,rsq)))
    906     if tam.shape: tam = np.reshape(tam,(nI,nJ))
     903    for X,Y,rsq in masks['Points'].T:
     904        tam = ma.mask_or(tam,ma.getmask(ma.masked_less((tax-X)**2+(tay-Y)**2,rsq)))
     905    if tam.shape:
     906        tam = np.reshape(tam,(nI,nJ))
     907    else:
     908        tam = ma.make_mask_none((nI,nJ))
     909    for xline in masks.get('Xlines',[]):    #a y pixel position
     910        if iLim[0] <= xline <= iLim[1]:
     911            tam[iLim[1]-xline,:] = True
     912    for yline in masks.get('Ylines',[]):    #a x pixel position
     913        if jLim[0] <= yline <= jLim[1]:
     914            tam[:,jLim[1]-yline] = True           
    907915    return tam           #position mask
    908916
Note: See TracChangeset for help on using the changeset viewer.