Changeset 4034 for trunk


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

implement xline & yline masks to integration - still checking it

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified 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
  • TabularUnified trunk/GSASIIimgGUI.py

    r4032 r4034  
    13591359    before they are used for integration.
    13601360    '''
    1361     for key in ['Points','Rings','Arcs','Polygons','Xlines','Ylines',]:
     1361    for key in ['Points','Rings','Arcs','Polygons',]:
    13621362        data[key] = data.get(key,[])
    13631363        l1 = len(data[key])
Note: See TracChangeset for help on using the changeset viewer.