Changeset 2616 for trunk/GSASIIimage.py


Ignore:
Timestamp:
Jan 8, 2017 4:17:15 PM (5 years ago)
Author:
vondreele
Message:

add Durbin-Watson statistic to refinement results for PWDR data
some more spots work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r2613 r2616  
    11321132    for roll in rolls:
    11331133        if np.any(roll):        #avoid [0,0]
    1134             spotMask = ma.array(spotMask,mask=(spotMask-rollImage(Image,roll)<=0.))
     1134            spotMask = ma.array(spotMask,mask=(spotMask-rollImage(Image,roll)<=0.10*np.mean(Image)))
    11351135    mags = spotMask[spotMask.nonzero()]
    11361136    indx = np.transpose(spotMask.nonzero())
     
    11461146                jndx.append([ind[1]+.5,ind[0]+.5])
    11471147    print 'Spots found: ',len(jndx)
    1148     if len(jndx) > 100:
    1149         txt = 'Found: %d. Too many spots found; are rings spotty?'%(len(jndx))
    1150         return txt
    11511148    jndx = np.array(jndx)
    11521149    peaks = jndx*pixelSize/1000.
    11531150    tth = GetTth(peaks.T[0],peaks.T[1],Controls)
    11541151    Peakarray = np.vstack((tth,peaks.T)).T
    1155     Peakarray = np.array(G2mth.sortArray(Peakarray,0))  #now in 2theta order
     1152    Peakarray = np.array(G2mth.sortArray(Peakarray,0))  #now in 2theta
     1153    if peaks.shape[0] > 100:
     1154        txt = 'More than 100 spots found: %d. Are rings spotty?'%(len(jndx))
     1155        return txt
     1156    #should be able to filter out spotty Bragg rings here
    11561157    Points = np.ones((peaks.shape[0],3))
    11571158    Points[:,:2] = Peakarray[:,1:]
    1158     Masks['Points'] = Points
     1159    Masks['Points'] = list(Points)
    11591160    return None
    11601161                   
Note: See TracChangeset for help on using the changeset viewer.