Changeset 3946


Ignore:
Timestamp:
May 2, 2019 2:51:39 PM (2 years ago)
Author:
vondreele
Message:

correction to contouring for cells out side reference; needed a %1. on XYZ(XYZT)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r3945 r3946  
    117117import numpy.ma as ma
    118118import numpy.linalg as nl
     119from scipy.ndimage.interpolation import map_coordinates
    119120# Don't depend on wx/matplotlib for scriptable
    120121try:
     
    77127713        neqv = 0
    77137714        for xyz,atyp in zip(XYZs,Types):
    7714             equiv = G2spc.GenAtom(xyz,SGData,All=True,Move=False)
     7715            equiv = list(G2spc.GenAtom(xyz,SGData,All=True,Move=False))
    77157716            neqv = max(neqv,len(equiv))
    77167717            for item in equiv:
     
    88938894                return
    88948895            Rmax = np.max(rho)*drawingData['contourMax']
    8895             from scipy.ndimage.interpolation import map_coordinates
    88968896            from matplotlib.backends.backend_agg import FigureCanvasAgg
    88978897            import matplotlib.pyplot as plt
     
    89078907            if FourD:
    89088908                SXYZT = np.vstack((SXYZ.T,np.inner(SXYZ,modQ)+G2frame.tau)).T
    8909                 Z = np.reshape(map_coordinates(rho4D,(SXYZT*rho4D.shape).T,order=1,mode='wrap'),(npts,npts))
     8909                Z = np.reshape(map_coordinates(rho4D,(SXYZT%1.*rho4D.shape).T,order=1,mode='wrap'),(npts,npts))
    89108910            else:
    8911                 Z = np.reshape(map_coordinates(rho,(SXYZ*rho.shape).T,order=1,mode='wrap'),(npts,npts))
     8911                Z = np.reshape(map_coordinates(rho,(SXYZ%1.*rho.shape).T,order=1,mode='wrap'),(npts,npts))
    89128912            Z = np.where(Z<=Rmax,Z,Rmax)
    89138913            plt.rcParams['figure.facecolor'] = (1.,1.,1.,.5)
Note: See TracChangeset for help on using the changeset viewer.