Changeset 526 for trunk/GSASIIplot.py
- Timestamp:
- Apr 2, 2012 2:30:28 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIplot.py
r523 r526 753 753 else: 754 754 Plot.plot(peak.T[1],pos,colors[pId%6]+'|',mew=1,ms=8,picker=3.,label=phase) 755 handles,legends = Plot.get_legend_handles_labels() #got double entries in the legends for some reason 756 Plot.legend(handles[::2],legends[::2],title='Phases',loc='best') #skip every other one 755 if len(Phases): 756 handles,legends = Plot.get_legend_handles_labels() #got double entries in the legends for some reason 757 Plot.legend(handles[::2],legends[::2],title='Phases',loc='best') #skip every other one 757 758 758 759 if G2frame.Contour: … … 2731 2732 2732 2733 def Draw(): 2733 if 'Map' in generalData: 2734 mapData = generalData['Map'] 2735 rhoXYZ = [] 2736 if len(mapData['rho']): 2734 2737 VP = np.array(drawingData['viewPoint'][0])-np.array([.5,.5,.5]) 2735 mapData = generalData['Map']2736 2738 contLevel = drawingData['contourLevel']*mapData['rhoMax'] 2737 2739 if 'delt-F' in mapData['MapType']: … … 2739 2741 else: 2740 2742 rho = ma.array(mapData['rho'],mask=(mapData['rho']<contLevel)) 2741 if rho.size > 0: 2742 steps = 1./np.array(rho.shape) 2743 incre = np.where(VP>0,VP%steps,VP%steps-steps) 2744 Vsteps = -np.array(VP/steps,dtype='i') 2745 rho = np.roll(np.roll(np.roll(rho,Vsteps[0],axis=0),Vsteps[1],axis=1),Vsteps[2],axis=2) 2746 indx = np.array(ma.nonzero(rho)).T 2747 rhoXYZ = indx*steps+VP-incre 2748 Nc = len(rhoXYZ) 2749 rcube = 2000.*Vol/(ForthirdPI*Nc) 2750 rmax = math.exp(math.log(rcube)/3.)**2 2751 radius = min(drawingData['mapSize']**2,rmax) 2752 view = np.array(drawingData['viewPoint'][0]) 2753 Rok = np.sum(np.inner(Amat,rhoXYZ-view).T**2,axis=1)>radius 2754 else: 2755 rhoXYZ = [] 2743 steps = 1./np.array(rho.shape) 2744 incre = np.where(VP>0,VP%steps,VP%steps-steps) 2745 Vsteps = -np.array(VP/steps,dtype='i') 2746 rho = np.roll(np.roll(np.roll(rho,Vsteps[0],axis=0),Vsteps[1],axis=1),Vsteps[2],axis=2) 2747 indx = np.array(ma.nonzero(rho)).T 2748 rhoXYZ = indx*steps+VP-incre 2749 Nc = len(rhoXYZ) 2750 rcube = 2000.*Vol/(ForthirdPI*Nc) 2751 rmax = math.exp(math.log(rcube)/3.)**2 2752 radius = min(drawingData['mapSize']**2,rmax) 2753 view = np.array(drawingData['viewPoint'][0]) 2754 Rok = np.sum(np.inner(Amat,rhoXYZ-view).T**2,axis=1)>radius 2756 2755 Ind = GetSelectedAtoms() 2757 2756 VS = np.array(Page.canvas.GetSize())
Note: See TracChangeset
for help on using the changeset viewer.