Changeset 1623
 Timestamp:
 Jan 5, 2015 3:32:57 PM (7 years ago)
 Location:
 trunk
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIphsGUI.py
r1622 r1623 5605 5605 pgbar.Destroy() 5606 5606 mapData.update(newMap) 5607 print newMap['rho'].shape,mapData['rho'].shape5608 5607 map4DData.update(new4Dmap) 5609 print newMap['rho'].shape,mapData['rho'].shape5610 5608 mapData['Flip'] = True 5611 5609 mapSig = np.std(mapData['rho']) … … 5615 5613 data['Drawing']['mapSize'] = 10. 5616 5614 print ' 4D Charge flip map computed: rhomax = %.3f rhomin = %.3f sigma = %.3f'%(np.max(mapData['rho']),np.min(mapData['rho']),mapSig) 5617 print mapData['rho'].shape5618 5615 if mapData['Rcf'] < 99.: 5619 5616 OnSearchMaps(event) #does a plot structure at end 
trunk/GSASIIplot.py
r1622 r1623 2776 2776 def ModulationPlot(G2frame,data,atom,Ax): 2777 2777 2778 print 'modulation plot for',atom[0]2779 2778 try: 2780 2779 plotNum = G2frame.G2plotNB.plotList.index('Modulation') … … 2801 2800 ix += (rhoSize[:3]/2) 2802 2801 ix = ix%rhoSize[:3] 2803 print 'roll',ix,atxyz2804 2802 rho = np.roll(np.roll(np.roll(Map['rho'],ix[0],axis=0),ix[1],axis=1),ix[2],axis=2) 2805 2803 ix = rhoSize[:3]/2 2806 print 'slab',ix,rhoSize2807 2804 ib = 4 2808 2805 if Ax == 'x': … … 2815 2812 Plot.set_xlabel('t') 2816 2813 Plot.set_ylabel(r'$\mathsf{\Delta}$%s'%(Ax)) 2817 Plot.contour(slab,20,extent=(0.,1.,.5,.5)) 2814 Slab = np.concatenate((slab,slab),axis=1) 2815 Plot.contour(Slab,20,extent=(0.,2.,.5,.5)) 2818 2816 Page.canvas.draw() 2819 2817 … … 4153 4151 dirDict = {'U':[0,1],'D':[0,1],'L':[1,0],'R':[1,0]} 4154 4152 SetMapRoll(dirDict[key]) 4153 if 'rho' in generalData.get('4DmapData',{}): 4154 Set4DMapRoll(dirDict[key]) 4155 4155 SetPeakRoll(dirDict[key]) 4156 4156 SetMapPeaksText(mapPeaks) … … 4345 4345 glLightfv(GL_LIGHT0,GL_DIFFUSE,[1,1,1,1]) 4346 4346 4347 def GetRoll(newxy,rho ):4347 def GetRoll(newxy,rhoshape): 4348 4348 Q = drawingData['Quaternion'] 4349 4349 dxy = G2mth.prodQVQ(G2mth.invQ(Q),np.inner(Bmat,newxy+[0,])) 4350 dxy = np.array(dxy*rho .shape)4350 dxy = np.array(dxy*rhoshape) 4351 4351 roll = np.where(dxy>0.5,1,np.where(dxy<.5,1,0)) 4352 4352 return roll … … 4354 4354 def SetMapRoll(newxy): 4355 4355 rho = mapData['rho'] 4356 roll = GetRoll(newxy,rho )4356 roll = GetRoll(newxy,rho.shape) 4357 4357 mapData['rho'] = np.roll(np.roll(np.roll(rho,roll[0],axis=0),roll[1],axis=1),roll[2],axis=2) 4358 4358 drawingData['oldxy'] = list(newxy) 4359 4359 4360 def Set4DMapRoll(newxy): 4361 rho = generalData['4DmapData']['rho'] 4362 roll = GetRoll(newxy,rho.shape[:3]) 4363 generalData['4DmapData']['rho'] = np.roll(np.roll(np.roll(rho,roll[0],axis=0),roll[1],axis=1),roll[2],axis=2) 4364 4360 4365 def SetPeakRoll(newxy): 4361 4366 rho = mapData['rho'] 4362 roll = GetRoll(newxy,rho )4367 roll = GetRoll(newxy,rho.shape) 4363 4368 steps = 1./np.array(rho.shape) 4364 4369 dxy = roll*steps 
trunk/GSASIIpwdGUI.py
r1622 r1623 2970 2970 print phases 2971 2971 raise Exception("how did we not find a phase name?") 2972 G2plt.PlotPatterns(G2frame) # replot, to activate phase's reflection tooltips2973 2972 2974 2973 def OnPageChanged(event):
Note: See TracChangeset
for help on using the changeset viewer.