Changeset 1623


Ignore:
Timestamp:
Jan 5, 2015 3:32:57 PM (9 years ago)
Author:
vondreele
Message:

remove stray prints
double up modulation plot
set roll of 4D map to match that for 3D map
remove PlotPattern? call after reflection list selection - not needed & crashes for single crystal data
4D charge flipping reproduces J2K modulation maps!

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r1622 r1623  
    56055605            pgbar.Destroy()
    56065606        mapData.update(newMap)
    5607         print newMap['rho'].shape,mapData['rho'].shape
    56085607        map4DData.update(new4Dmap)
    5609         print newMap['rho'].shape,mapData['rho'].shape
    56105608        mapData['Flip'] = True       
    56115609        mapSig = np.std(mapData['rho'])
     
    56155613        data['Drawing']['mapSize'] = 10.
    56165614        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'].shape
    56185615        if mapData['Rcf'] < 99.:
    56195616            OnSearchMaps(event)             #does a plot structure at end
  • trunk/GSASIIplot.py

    r1622 r1623  
    27762776def ModulationPlot(G2frame,data,atom,Ax):
    27772777   
    2778     print 'modulation plot for',atom[0]
    27792778    try:
    27802779        plotNum = G2frame.G2plotNB.plotList.index('Modulation')
     
    28012800    ix += (rhoSize[:3]/2)
    28022801    ix = ix%rhoSize[:3]
    2803     print 'roll',ix,atxyz
    28042802    rho = np.roll(np.roll(np.roll(Map['rho'],ix[0],axis=0),ix[1],axis=1),ix[2],axis=2)
    28052803    ix = rhoSize[:3]/2
    2806     print 'slab',ix,rhoSize
    28072804    ib = 4
    28082805    if Ax == 'x':
     
    28152812    Plot.set_xlabel('t')
    28162813    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))
    28182816    Page.canvas.draw()
    28192817   
     
    41534151            dirDict = {'U':[0,1],'D':[0,-1],'L':[-1,0],'R':[1,0]}
    41544152            SetMapRoll(dirDict[key])
     4153            if 'rho' in generalData.get('4DmapData',{}):
     4154                Set4DMapRoll(dirDict[key])
    41554155            SetPeakRoll(dirDict[key])
    41564156            SetMapPeaksText(mapPeaks)
     
    43454345        glLightfv(GL_LIGHT0,GL_DIFFUSE,[1,1,1,1])
    43464346       
    4347     def GetRoll(newxy,rho):
     4347    def GetRoll(newxy,rhoshape):
    43484348        Q = drawingData['Quaternion']
    43494349        dxy = G2mth.prodQVQ(G2mth.invQ(Q),np.inner(Bmat,newxy+[0,]))
    4350         dxy = np.array(dxy*rho.shape)       
     4350        dxy = np.array(dxy*rhoshape)       
    43514351        roll = np.where(dxy>0.5,1,np.where(dxy<-.5,-1,0))
    43524352        return roll
     
    43544354    def SetMapRoll(newxy):
    43554355        rho = mapData['rho']
    4356         roll = GetRoll(newxy,rho)
     4356        roll = GetRoll(newxy,rho.shape)
    43574357        mapData['rho'] = np.roll(np.roll(np.roll(rho,roll[0],axis=0),roll[1],axis=1),roll[2],axis=2)
    43584358        drawingData['oldxy'] = list(newxy)
    43594359       
     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       
    43604365    def SetPeakRoll(newxy):
    43614366        rho = mapData['rho']
    4362         roll = GetRoll(newxy,rho)
     4367        roll = GetRoll(newxy,rho.shape)
    43634368        steps = 1./np.array(rho.shape)
    43644369        dxy = roll*steps
  • trunk/GSASIIpwdGUI.py

    r1622 r1623  
    29702970            print phases
    29712971            raise Exception("how did we not find a phase name?")
    2972         G2plt.PlotPatterns(G2frame) # replot, to activate phase's reflection tooltips
    29732972       
    29742973    def OnPageChanged(event):
Note: See TracChangeset for help on using the changeset viewer.