Changeset 1626 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Jan 9, 2015 4:00:01 PM (7 years ago)
Author:
vondreele
Message:

Changed "Transform atom " to "Transform draw atom" to fix menu problem
implement a 4D version of findOffset - works OK
implement facility to allow moving map on 4th dimension

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r1625 r1626  
    27982798            Off += 1
    27992799        elif event.key == '-':
    2800             Off -= 1
     2800            Off -= 1
     2801        elif event.key in ['l','r',]:
     2802            roll = 1
     2803            if  event.key == 'l':
     2804                roll = -1
     2805            rho = Map['rho']
     2806            Map['rho'] = np.roll(rho,roll,axis=3)
    28012807        wx.CallAfter(ModulationPlot,G2frame,data,Atom,Ax,Off)
    28022808
     
    28152821        Page.canvas.mpl_connect('key_press_event', OnPlotKeyPress)
    28162822       
    2817     Page.Choice = ['+: shift up','-: shift down','0: reset']
     2823    Page.Choice = ['+: shift up','-: shift down','0: reset shift','l: move left','r: move right']
    28182824    Page.keyPress = OnPlotKeyPress
    28192825    Page.SetFocus()
     
    28532859    if Ax == 'x':
    28542860        slab = np.sum(np.sum(rho[:,ix[1]-ib:ix[1]+ib,ix[2]-ib:ix[2]+ib,:],axis=2),axis=1)
    2855         Plot.plot(wave[0],tau)
     2861        Plot.plot(tau,wave[0])
    28562862    elif Ax == 'y':
    28572863        slab = np.sum(np.sum(rho[ix[0]-ib:ix[0]+ib,:,ix[2]-ib:ix[2]+ib,:],axis=2),axis=0)
    2858         Plot.plot(wave[1],tau)
     2864        Plot.plot(tau,wave[1])
    28592865    elif Ax == 'z':
    28602866        slab = np.sum(np.sum(rho[ix[0]-ib:ix[0]+ib,ix[1]-ib:ix[1]+ib,:,:],axis=1),axis=0)
    2861         Plot.plot(wave[2],tau)
     2867        Plot.plot(tau,wave[2])
    28622868    Plot.set_title(Title)
    28632869    Plot.set_xlabel('t')
    28642870    Plot.set_ylabel(r'$\mathsf{\Delta}$%s'%(Ax))
    2865     Slab = np.concatenate((slab,slab),axis=1).T
    2866     Plot.contour(Slab,20,extent=(-.5+Off*.005,.5+Off*.005,0.,2.))
    2867    
     2871    Slab = np.concatenate((slab,slab),axis=1)
     2872    Plot.contour(Slab,20,extent=(0.,2.,-.5+Off*.005,.5+Off*.005))
    28682873    Page.canvas.draw()
    28692874   
Note: See TracChangeset for help on using the changeset viewer.