Changeset 522 for trunk/GSASIIplot.py
 Timestamp:
 Mar 20, 2012 1:38:12 PM (10 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIplot.py
r521 r522 2267 2267 thermal motion ellipsoids and polyhedra 2268 2268 ''' 2269 ForthirdPI = 4.0*math.pi/3.0 2269 2270 generalData = data['General'] 2270 2271 cell = generalData['Cell'][1:7] 2272 Vol = generalData['Cell'][7:8][0] 2271 2273 Amat,Bmat = G2lat.cell2AB(cell) #Amat  crystal to cartesian, Bmat  inverse 2272 2274 A4mat = np.concatenate((np.concatenate((Amat,[[0],[0],[0]]),axis=1),[[0,0,0,1],]),axis=0) … … 2726 2728 def Draw(): 2727 2729 if 'Map' in generalData: 2730 VP = np.array(drawingData['viewPoint'][0])np.array([.5,.5,.5]) 2728 2731 mapData = generalData['Map'] 2729 2732 contLevel = drawingData['contourLevel']*mapData['rhoMax'] … … 2732 2735 else: 2733 2736 rho = ma.array(mapData['rho'],mask=(mapData['rho']<contLevel)) 2737 steps = 1./np.array(rho.shape) 2738 incre = np.where(VP>0,VP%steps,VP%stepssteps) 2739 Vsteps = np.array(VP/steps,dtype='i') 2740 rho = np.roll(np.roll(np.roll(rho,Vsteps[0],axis=0),Vsteps[1],axis=1),Vsteps[2],axis=2) 2734 2741 indx = np.array(ma.nonzero(rho)).T 2735 steps = 1./np.array(rho.shape) 2736 rhoXYZ = indx*steps 2737 radius = drawingData['mapSize']**2 2742 rhoXYZ = indx*steps+VPincre 2743 Nc = len(rhoXYZ) 2744 rcube = 2000.*Vol/(ForthirdPI*Nc) 2745 rmax = math.exp(math.log(rcube)/3.)**2 2746 radius = min(drawingData['mapSize']**2,rmax) 2738 2747 view = np.array(drawingData['viewPoint'][0]) 2739 2748 Rok = np.sum(np.inner(Amat,rhoXYZview).T**2,axis=1)>radius
Note: See TracChangeset
for help on using the changeset viewer.