Changeset 1981 for trunk/GSASIIplot.py
- Timestamp:
- Sep 29, 2015 3:04:45 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIplot.py
r1979 r1981 64 64 npatan2d = lambda x,y: 180.*np.arctan2(x,y)/np.pi 65 65 GkDelta = unichr(0x0394) 66 Gkrho = unichr(0x03C1) 66 67 67 68 class G2PlotMpl(wx.Panel): … … 2991 2992 2992 2993 def ModulationPlot(G2frame,data,atom,ax,off=0): 2993 global Off,Atom,Ax 2994 global Off,Atom,Ax,Slab,Off 2994 2995 Off = off 2995 2996 Atom = atom 2996 2997 Ax = ax 2998 2997 2999 def OnMotion(event): 2998 3000 xpos = event.xdata 2999 3001 if xpos: #avoid out of frame mouse position 3000 3002 ypos = event.ydata 3003 ix = int(round(xpos*10)) 3004 iy = int(round((Slab.shape[0]-1)*(ypos+0.5-Off*0.005))) 3001 3005 Page.canvas.SetCursor(wx.CROSS_CURSOR) 3002 3006 try: 3003 G2frame.G2plotNB.status.SetStatusText('t =%9.3f %s =%9.3f'%(xpos,GkDelta+Ax,ypos),1) 3007 G2frame.G2plotNB.status.SetStatusText('t =%9.3f %s =%9.3f %s=%9.3f'%(xpos,GkDelta+Ax,ypos,Gkrho,Slab[iy,ix]/8.),1) 3008 # GSASIIpath.IPyBreak() 3004 3009 except TypeError: 3005 3010 G2frame.G2plotNB.status.SetStatusText('Select '+Title+' pattern first',1) … … 3046 3051 Page.keyPress = OnPlotKeyPress 3047 3052 Map = General['4DmapData'] 3048 MapType = Map['MapType']3053 MapType = mapData['MapType'] 3049 3054 rhoSize = np.array(Map['rho'].shape) 3050 3055 atxyz = np.array(atom[cx:cx+3]) … … 3067 3072 scof.append(spos[0][:3]) 3068 3073 ccof.append(spos[0][3:]) 3069 wave += G2mth.posFourier(tau,np.array(scof),np.array(ccof),1) #hmm, why -1 work for Na2CO3?3074 wave += G2mth.posFourier(tau,np.array(scof),np.array(ccof),1) 3070 3075 if mapData['Flip']: 3071 3076 Title = 'Charge flip' … … 3093 3098 Plot.set_ylabel(r'$\mathsf{\Delta}$%s'%(Ax)) 3094 3099 Slab = np.hstack((slab,slab,slab)) 3095 Plot.contour(Slab[:,:21],20,extent=(0.,2.,-.5+Off*.005,.5+Off*.005)) 3100 acolor = mpl.cm.get_cmap('RdYlGn') 3101 if 'delt' in MapType: 3102 Plot.contour(Slab[:,:21],20,extent=(0.,2.,-.5+Off*.005,.5+Off*.005),cmap=acolor) 3103 else: 3104 Plot.contour(Slab[:,:21],20,extent=(0.,2.,-.5+Off*.005,.5+Off*.005)) 3096 3105 Page.canvas.draw() 3097 3106
Note: See TracChangeset
for help on using the changeset viewer.