Changeset 2052


Ignore:
Timestamp:
Nov 14, 2015 4:13:43 PM (6 years ago)
Author:
vondreele
Message:

relax cell order rules for C- ortho & C-mono cell indexing
change default view of modulation plot
work on powder incommensurate fxn & derivs.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIindex.py

    r2050 r2052  
    146146    elif Bravais in [7,8,9,10]:       #orthorhombic - F,I,C,P - a<b<c convention
    147147        abc = [ranaxis(dmin,dmax),ranaxis(dmin,dmax),ranaxis(dmin,dmax)]
    148         abc.sort()
     148        if Bravais in [7,8,10]:
     149            abc.sort()
    149150        a = abc[0]
    150151        b = abc[1]
     
    153154    elif Bravais in [11,12]:        #monoclinic - C,P - a<c convention
    154155        ac = [ranaxis(dmin,dmax),ranaxis(dmin,dmax)]
    155         ac.sort()
     156        if Bravais == 12:
     157            ac.sort()
    156158        a = ac[0]
    157159        b = ranaxis(dmin,dmax)
  • trunk/GSASIImath.py

    r2050 r2052  
    10021002    numeric = True   
    10031003    cosHA,sinHA = Modulation(waveTypes,np.array([H,]),np.array([HP,]),FSSdata,XSSdata,USSdata,Mast)
    1004     Mf = [H.shape[0],]+list(FSSdata.T.shape)    #ops x atoms x waves x 2 (sin+cos frac mods)
     1004    Mf = [H.shape[0],]+list(FSSdata.T.shape)    #=[ops,atoms,waves,2] (sin+cos frac mods)
    10051005    dGdMfC = np.zeros(Mf)
    10061006    dGdMfS = np.zeros(Mf)
    1007     Mx = [H.shape[0],]+list(XSSdata.T.shape)   #ops x atoms x waves x 6 (sin+cos pos mods)
     1007    Mx = [H.shape[0],]+list(XSSdata.T.shape)   #=[ops,atoms,waves,6] (sin+cos pos mods)
    10081008    dGdMxC = np.zeros(Mx)
    10091009    dGdMxS = np.zeros(Mx)
    1010     Mu = [H.shape[0],]+list(USSdata.T.shape)    #ops x atoms x waves x 12 (sin+cos Uij mods)
     1010    Mu = [H.shape[0],]+list(USSdata.T.shape)    #=[ops,atoms,waves,12] (sin+cos Uij mods)
    10111011    dGdMuC = np.zeros(Mu)
    10121012    dGdMuS = np.zeros(Mu)
     
    10341034            #XmodZ = 0   replace
    10351035    tauX = np.arange(1.,Ax.shape[1]+1-nx)[:,nxs]*glTau  #Xwaves x 32
    1036     StauX = np.ones_like(Ax)[:,nx:,:,nxs]*np.sin(twopi*tauX)[nxs,:,nxs,:]   #atoms X waves X pos X 32
     1036    StauX = np.ones_like(Ax)[:,nx:,:,nxs]*np.sin(twopi*tauX)[nxs,:,nxs,:]   #atoms X waves X 3(xyz) X 32
    10371037    CtauX = np.ones_like(Bx)[:,nx:,:,nxs]*np.cos(twopi*tauX)[nxs,:,nxs,:]   #ditto
    10381038    XmodA = Ax[:,nx:,:,nxs]*StauX #atoms X waves X pos X 32
  • trunk/GSASIIplot.py

    r2050 r2052  
    10411041    global DifLine
    10421042    global Ymax
     1043    global Pattern
    10431044    plottype = plotType
    10441045    if not G2frame.PatternId:
     
    12481249            Page.figure.gca().draw_artist(G2frame.itemPicked)
    12491250            Page.canvas.blit(Page.figure.gca().bbox)
     1251           
    12501252        def OnDragLine(event):
    12511253            '''Respond to dragging of a plot line
     
    31243126    ix = rhoSize[:3]/2
    31253127    ib = 4
    3126     hdx = [0,0,0]       #this needs to be something for an offset correction on atom positions
     3128    hdx = [2,2,2]       #this needs to be something for an offset correction on atom positions
    31273129    if Ax == 'x':
    31283130        Doff = (hdx[0]+Off)*.005
     
    31463148    else:
    31473149        Plot.contour(Slab[:,:21],20,extent=(0.,2.,-.5+Doff,.5+Doff))
     3150    Plot.set_ylim([-0.25,0.25])
    31483151    Page.canvas.draw()
    31493152   
  • trunk/GSASIIstrMath.py

    r2046 r2052  
    10831083#        GSASIIpath.IPyBreak()
    10841084        if 'P' in calcControls[hfx+'histType']:
    1085             refl.T[10] = np.sum(fas**2,axis=0)+np.sum(fbs**2,axis=0)
     1085            refl.T[10] = np.sum(fas,axis=0)**2+np.sum(fbs,axis=0)**2    #square of sums
     1086#            refl.T[10] = np.sum(fas**2,axis=0)+np.sum(fbs**2,axis=0)
    10861087            refl.T[11] = atan2d(fbs[0],fas[0])  #ignore f' & f"
    10871088        else:
     
    12651266            dfbdfl = 1.0
    12661267        #NB: the above have been checked against PA(1:10,1:2) in strfctr.for for Al2O3!   
     1268        SA = fas[0]+fas[1]      #float = A+A' (might be array[nTwin])
     1269        SB = fbs[0]+fbs[1]      #float = B+B' (might be array[nTwin])
    12671270        if 'P' in calcControls[hfx+'histType']: #checked perfect for centro & noncentro
    1268             dFdfr[iref] = 2.*(fas[0]*dfadfr[0]+fas[1]*dfadfr[1])*Mdata/len(Uniq)+   \
    1269                 2.*(fbs[0]*dfbdfr[0]-fbs[1]*dfbdfr[1])*Mdata/len(Uniq)
    1270             dFdx[iref] = 2.*(fas[0]*dfadx[0]+fas[1]*dfadx[1])+  \
    1271                 2.*(fbs[0]*dfbdx[0]+fbs[1]*dfbdx[1])
    1272             dFdui[iref] = 2.*(fas[0]*dfadui[0]+fas[1]*dfadui[1])+   \
    1273                 2.*(fbs[0]*dfbdui[0]-fbs[1]*dfbdui[1])
    1274             dFdua[iref] = 2.*(fas[0]*dfadua[0]+fas[1]*dfadua[1])+   \
    1275                 2.*(fbs[0]*dfbdua[0]+fbs[1]*dfbdua[1])
    1276             dFdGx[iref] = 2.*(fas[0]*dfadGx[0]+fas[1]*dfadGx[1])+  \
    1277                 2.*(fbs[0]*dfbdGx[0]+fbs[1]*dfbdGx[1])
    1278             dFdGu[iref] = 2.*(fas[0]*dfadGu[0]+fas[1]*dfadGu[1])+  \
    1279                 2.*(fbs[0]*dfbdGu[0]+fbs[1]*dfbdGu[1])
     1271            dFdfr[iref] = 2.*(SA*dfadfr[0]+SA*dfadfr[1]+SB*dfbdfr[0]+SB*dfbdfr[1])*Mdata/len(Uniq) #array(nRef,nAtom)
     1272            dFdx[iref] = 2.*(SA*dfadx[0]+SA*dfadx[1]+SB*dfbdx[0]+SB*dfbdx[1])    #array(nRef,nAtom,3)
     1273            dFdui[iref] = 2.*(SA*dfadui[0]+SA*dfadui[1]+SB*dfbdui[0]+SB*dfbdui[1])   #array(nRef,nAtom)
     1274            dFdua[iref] = 2.*(SA*dfadua[0]+SA*dfadua[1]+SB*dfbdua[0]+SB*dfbdua[1])    #array(nRef,nAtom,6)
     1275            dFdfl[iref] = -SA*dfadfl-SB*dfbdfl                  #array(nRef,)
     1276                           
     1277            dFdGf[iref] = 2.*(SA*dfadGf[0]+SB*dfbdGf[1])      #array(nRef,natom,nwave,2)
     1278            dFdGx[iref] = 2.*(SA*dfadGx[0]+SB*dfbdGx[1])      #array(nRef,natom,nwave,6)
     1279            dFdGu[iref] = 2.*(SA*dfadGu[0]+SB*dfbdGu[1])      #array(nRef,natom,nwave,12)
     1280#            dFdfr[iref] = 2.*(fas[0]*dfadfr[0]+fas[1]*dfadfr[1])*Mdata/len(Uniq)+   \
     1281#                2.*(fbs[0]*dfbdfr[0]-fbs[1]*dfbdfr[1])*Mdata/len(Uniq)
     1282#            dFdx[iref] = 2.*(fas[0]*dfadx[0]+fas[1]*dfadx[1])+  \
     1283#                2.*(fbs[0]*dfbdx[0]+fbs[1]*dfbdx[1])
     1284#            dFdui[iref] = 2.*(fas[0]*dfadui[0]+fas[1]*dfadui[1])+   \
     1285#                2.*(fbs[0]*dfbdui[0]-fbs[1]*dfbdui[1])
     1286#            dFdua[iref] = 2.*(fas[0]*dfadua[0]+fas[1]*dfadua[1])+   \
     1287#                2.*(fbs[0]*dfbdua[0]+fbs[1]*dfbdua[1])
     1288#            dFdGf[iref] = 2.*(fas[0]*dfadGf[0]+fas[1]*dfadGf[1])+  \
     1289#                2.*(fbs[0]*dfbdGf[0]+fbs[1]*dfbdGf[1])
     1290#            dFdGx[iref] = 2.*(fas[0]*dfadGx[0]+fas[1]*dfadGx[1])+  \
     1291#                2.*(fbs[0]*dfbdGx[0]+fbs[1]*dfbdGx[1])
     1292#            dFdGu[iref] = 2.*(fas[0]*dfadGu[0]+fas[1]*dfadGu[1])+  \
     1293#                2.*(fbs[0]*dfbdGu[0]+fbs[1]*dfbdGu[1])
    12801294        else:
    1281             SA = fas[0]+fas[1]      #float = A+A' (might be array[nTwin])
    1282             SB = fbs[0]+fbs[1]      #float = B+B' (might be array[nTwin])
    12831295            if nTwin > 1:
    12841296                dFdfr[iref] = [2.*TwMask[it]*(SA[it]*dfadfr[0][it]+SA[it]*dfadfr[1][it]+SB[it]*dfbdfr[0][it]+SB[it]*dfbdfr[1][it])*Mdata/len(Uniq[it]) for it in range(nTwin)]
     
    26242636                        try:
    26252637                            aname = name.split(pfx)[1][:2]
    2626                             if aname not in ['Af','dA','AU','RB']: continue # skip anything not an atom or rigid body param
     2638                            if aname not in ['Af','dA','AU','RB','Xs','Xc','Ys','Yc','Zs','Zc','U1','U2','U3']: continue # skip anything not an atom or rigid body param
    26272639                        except IndexError:
    26282640                            continue
Note: See TracChangeset for help on using the changeset viewer.