Changeset 55 for trunk/GSASIIcomp.py
- Timestamp:
- Apr 29, 2010 12:27:45 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIcomp.py
r54 r55 1341 1341 sphi = sind(phi) 1342 1342 ring = [] 1343 for a in range( 0,360,2):1343 for a in range(-180,180,2): 1344 1344 x = radii[0]*cosd(a) 1345 1345 y = radii[1]*sind(a) … … 1436 1436 return xy 1437 1437 1438 def GetTth DspAzm(x,y,data):1438 def GetTthAzmDsp(x,y,data): 1439 1439 wave = data['wavelength'] 1440 1440 dist = data['distance'] … … 1453 1453 1454 1454 def GetTth(x,y,data): 1455 return GetTth DspAzm(x,y,data)[0]1455 return GetTthAzmDsp(x,y,data)[0] 1456 1456 1457 1457 def GetTthAzm(x,y,data): 1458 return GetTth DspAzm(x,y,data)[0:2]1458 return GetTthAzmDsp(x,y,data)[0:2] 1459 1459 1460 1460 def GetDsp(x,y,data): 1461 return GetTth DspAzm(x,y,data)[2]1461 return GetTthAzmDsp(x,y,data)[2] 1462 1462 1463 1463 def ImageCompress(image,scale): … … 1662 1662 self.TA = GetTthAzm(tay,tax,data) #2-theta & azimuth arrays 1663 1663 self.TA = np.reshape(self.TA,(2,imageN,imageN)) 1664 self.TA = np.dstack((self.TA[1],self.TA[0] ,self.ImageZ)) #azimuth, 2-theta, intensity order1664 self.TA = np.dstack((self.TA[1],self.TA[0])) #azimuth, 2-theta 1665 1665 t2 = time.time() 1666 1666 print "Elapsed time:","%8.3f"%(t2-t1), "s" … … 1668 1668 print 'Form 1-D histograms for ',numAzms,' azimuthal angles' 1669 1669 print 'Integration limits:',LUtth,LRazm 1670 tax,tay ,taz = np.dsplit(self.TA,3) #azimuth, 2-theta, intensity1670 tax,tay = np.dsplit(self.TA,2) #azimuth, 2-theta, intensity 1671 1671 NST = np.histogram2d(tax.flatten(),tay.flatten(),normed=False, \ 1672 1672 bins=(numAzms,numChans),range=[LRazm,LUtth]) 1673 1673 HST = np.histogram2d(tax.flatten(),tay.flatten(),normed=False, \ 1674 bins=(numAzms,numChans),weights= taz.flatten(),range=[LRazm,LUtth])1674 bins=(numAzms,numChans),weights=self.ImageZ.flatten(),range=[LRazm,LUtth]) 1675 1675 t3 = time.time() 1676 1676 print "Elapsed time:","%8.3f"%(t3-t2), "s"
Note: See TracChangeset
for help on using the changeset viewer.