Changeset 87 for trunk/GSASIIimage.py
- Timestamp:
- Jun 15, 2010 1:21:20 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIimage.py
r85 r87 434 434 return True 435 435 436 def Make2ThetaAzimuthMap(data, imageN):436 def Make2ThetaAzimuthMap(data,masks,imageN): 437 437 #transforms 2D image from x,y space to 2-theta,azimuth space based on detector orientation 438 438 pixelSize = data['pixelSize'] … … 442 442 tax = np.asfarray(tax*scalex,dtype=np.float32) 443 443 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 445 447 446 def Fill2ThetaAzimuthMap(masks,TA, image):448 def Fill2ThetaAzimuthMap(masks,TA,tam,image): 447 449 import numpy.ma as ma 448 450 Zlim = masks['Thresholds'][1] … … 481 483 dlg.Update(0) 482 484 imageN = len(self.ImageZ) 483 TA = Make2ThetaAzimuthMap(data,imageN) #2-theta & azimuth arrays485 TA,tam = Make2ThetaAzimuthMap(data,masks,imageN) #2-theta & azimuth arrays & create position mask 484 486 dlg.Update(1) 485 487 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 487 489 del TA 488 490 dlg.Update(2) … … 496 498 dlg.Update(4) 497 499 t1 = time.time() 500 print "Elapsed time:","%8.3f"%(t1-t0), "s" 498 501 print 'Integration complete' 499 print "Elapsed time:","%8.3f"%(t1-t0), "s"500 502 finally: 501 503 dlg.Destroy()
Note: See TracChangeset
for help on using the changeset viewer.