Changeset 87 for trunk/GSASIIimage.py


Ignore:
Timestamp:
Jun 15, 2010 1:21:20 PM (12 years ago)
Author:
vondreel
Message:

"Spots" in Masks is really "Points"
Start of "points" for masks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r85 r87  
    434434    return True
    435435   
    436 def Make2ThetaAzimuthMap(data,imageN):
     436def Make2ThetaAzimuthMap(data,masks,imageN):
    437437    #transforms 2D image from x,y space to 2-theta,azimuth space based on detector orientation
    438438    pixelSize = data['pixelSize']
     
    442442    tax = np.asfarray(tax*scalex,dtype=np.float32)
    443443    tay = np.asfarray(tay*scaley,dtype=np.float32)
    444     return GetTthAzm(tay,tax,data)           #2-theta & azimuth arrays
     444    #make position masks here
     445    XY = np.dstack((tax,tay))
     446    return GetTthAzm(tay,tax,data),0           #2-theta & azimuth arrays & position mask
    445447
    446 def Fill2ThetaAzimuthMap(masks,TA,image):
     448def Fill2ThetaAzimuthMap(masks,TA,tam,image):
    447449    import numpy.ma as ma
    448450    Zlim = masks['Thresholds'][1]
     
    481483        dlg.Update(0)
    482484        imageN = len(self.ImageZ)
    483         TA = Make2ThetaAzimuthMap(data,imageN)           #2-theta & azimuth arrays
     485        TA,tam = Make2ThetaAzimuthMap(data,masks,imageN)           #2-theta & azimuth arrays & create position mask
    484486        dlg.Update(1)
    485487        print 'Fill map with 2-theta/azimuth values'
    486         tax,tay,taz = Fill2ThetaAzimuthMap(masks,TA,self.ImageZ)
     488        tax,tay,taz = Fill2ThetaAzimuthMap(masks,TA,tam,self.ImageZ)    #and apply masks
    487489        del TA
    488490        dlg.Update(2)
     
    496498        dlg.Update(4)
    497499        t1 = time.time()
     500        print "Elapsed time:","%8.3f"%(t1-t0), "s"
    498501        print 'Integration complete'
    499         print "Elapsed time:","%8.3f"%(t1-t0), "s"
    500502    finally:
    501503        dlg.Destroy()
Note: See TracChangeset for help on using the changeset viewer.