Changeset 3961


Ignore:
Timestamp:
May 8, 2019 6:16:01 PM (6 years ago)
Author:
vondreele
Message:

set self.tutorialPath = '.\G2tutorial' if others fail. Don't know if this is best?
Add S301 to trigonal to 3m1 list of generalized mustrain terms - seems to improve things but plot is weird. Might need more work.
use get to fix missing Z problem
set up getting better map density from density slice instead of 3/4D full map

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/GSASIIctrlGUI.py

    r3938 r3961  
    53685368                      os.path.join('~',p,'G2tutorials')))
    53695369                    return
     5370            self.tutorialPath = '.\G2tutorials'     #would this work as an ultimate default?
    53705371        else:
    53715372            self.tutorialPath = os.path.abspath(os.path.expanduser(
  • TabularUnified trunk/GSASIIddataGUI.py

    r3848 r3961  
    426426       
    427427    def GenStrainDataSizer():
    428         muMean = G2spc.MuShklMean(SGData,Amat,UseList[G2frame.hist]['Mustrain'][4])
    429428        Snames = G2spc.MustrainNames(SGData)
    430429        numb = len(Snames)
    431         if len(UseList[G2frame.hist]['Mustrain'][4]) < numb:
    432             UseList[G2frame.hist]['Mustrain'][4] = numb*[0.0,]
    433             UseList[G2frame.hist]['Mustrain'][5] = numb*[False,]
     430        onumb = len(UseList[G2frame.hist]['Mustrain'][4])
     431        while onumb < numb:
     432            UseList[G2frame.hist]['Mustrain'][4].append(0.0)
     433            UseList[G2frame.hist]['Mustrain'][5].append(False)
     434            onumb += 1
     435        muMean = G2spc.MuShklMean(SGData,Amat,UseList[G2frame.hist]['Mustrain'][4])
    434436        parms = zip(Snames,UseList[G2frame.hist]['Mustrain'][4],UseList[G2frame.hist]['Mustrain'][5],range(numb))
    435437        dataSizer = wx.FlexGridSizer(0,6,5,5)
  • TabularUnified trunk/GSASIImath.py

    r3945 r3961  
    39383938   
    39393939    '''
    3940     return ins['X']/cosd(pos/2.0)+ins['Y']*tand(pos/2.0)+ins['Z']
     3940    return ins['X']/cosd(pos/2.0)+ins['Y']*tand(pos/2.0)+ins.get('Z',0.0)
    39413941   
    39423942def getCWgamDeriv(pos):
  • TabularUnified trunk/GSASIIplot.py

    r3959 r3961  
    76757675
    76767676    # PlotStructure initialization here
    7677     global mcsaXYZ,mcsaTypes,mcsaBonds,txID,contourSet
     7677    global mcsaXYZ,mcsaTypes,mcsaBonds,txID,contourSet,Zslice
    76787678    global cell, Vol, Amat, Bmat, A4mat, B4mat
    76797679    txID = 0
     
    89048904                    RenderPlane(plane,color)
    89058905        if drawingData.get('showSlice',False):
    8906             global contourSet
     8906            global contourSet,Zslice
    89078907            if len(D4mapData.get('rho',[])):        #preferentially select 4D map if there
    89088908                modQ = np.array(generalData['SuperVec'][0])
     
    89268926            if FourD:
    89278927                SXYZT = np.vstack((SXYZ.T,np.inner(SXYZ,modQ)+G2frame.tau)).T
    8928                 Z = np.reshape(map_coordinates(rho,(SXYZT%1.*rho.shape).T,order=1,mode='wrap'),(npts,npts))
     8928                Zslice = np.reshape(map_coordinates(rho,(SXYZT%1.*rho.shape).T,order=1,mode='wrap'),(npts,npts))
    89298929            else:
    8930                 Z = np.reshape(map_coordinates(rho,(SXYZ%1.*rho.shape).T,order=1,mode='wrap'),(npts,npts))
    8931             Z = np.where(Z<=Rmax,Z,Rmax)
     8930                Zslice = np.reshape(map_coordinates(rho,(SXYZ%1.*rho.shape).T,order=1,mode='wrap'),(npts,npts))
     8931            Z = np.where(Zslice<=Rmax,Zslice,Rmax)
    89328932            plt.rcParams['figure.facecolor'] = (1.,1.,1.,.5)
    89338933            oldSize = plt.rcParams['figure.figsize']
  • TabularUnified trunk/GSASIIspc.py

    r3848 r3961  
    30143014    if laue in ['m3','m3m']:
    30153015        return ['S400','S220']
    3016     elif laue in ['6/m','6/mmm','3m1']:
     3016    elif laue in ['6/m','6/mmm']:
    30173017        return ['S400','S004','S202']
    3018     elif laue in ['31m','3']:
    3019         return ['S400','S004','S202','S211']
     3018    elif laue in ['31m','3','3m1']:
     3019        return ['S400','S004','S202','S301']
    30203020    elif laue in ['3R','3mR']:
    30213021        return ['S400','S220','S310','S211']
     
    31023102        Strm.append(h**4+k**4+l**4)
    31033103        Strm.append(3.0*((h*k)**2+(h*l)**2+(k*l)**2))
    3104     elif laue in ['6/m','6/mmm','3m1']:
     3104    elif laue in ['6/m','6/mmm']:
    31053105        Strm.append(h**4+k**4+2.0*k*h**3+2.0*h*k**3+3.0*(h*k)**2)
    31063106        Strm.append(l**4)
    31073107        Strm.append(3.0*((h*l)**2+(k*l)**2+h*k*l**2))
    3108     elif laue in ['31m','3']:
     3108    elif laue in ['31m','3','3m1']:
    31093109        Strm.append(h**4+k**4+2.0*k*h**3+2.0*h*k**3+3.0*(h*k)**2)
    31103110        Strm.append(l**4)
    31113111        Strm.append(3.0*((h*l)**2+(k*l)**2+h*k*l**2))
    3112         Strm.append(4.0*h*k*l*(h+k))
     3112        Strm.append(4.0*l*h**3)
    31133113    elif laue in ['3R','3mR']:
    31143114        Strm.append(h**4+k**4+l**4)
     
    32053205    if laue in ['m3','m3m']:
    32063206        S0 = [1000.,1000.]
    3207     elif laue in ['6/m','6/mmm','3m1']:
     3207    elif laue in ['6/m','6/mmm']:
    32083208        S0 = [1000.,1000.,1000.]
    3209     elif laue in ['31m','3']:
     3209    elif laue in ['31m','3','3m1']:
    32103210        S0 = [1000.,1000.,1000.,1000.]
    32113211    elif laue in ['3R','3mR']:
Note: See TracChangeset for help on using the changeset viewer.