Changeset 1613 for trunk/GSASIIspc.py


Ignore:
Timestamp:
Dec 19, 2014 9:04:21 AM (8 years ago)
Author:
vondreele
Message:

missing menu items in PDF controls
trap PDF plotting if no PDF to plot
some more on SS refinement constraints
Begin implementation of SStructureFactor & SStructureFactorDerv

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIspc.py

    r1612 r1613  
    14261426        'Sadp':[[0,1,2,3,4,5, 0,1,2,3,4,5],[1.,1.,1.,1.,1.,1., 1.,1.,1.,1.,1.,1.]],
    14271427        'Smag':[[0,1,2, 0,1,2],[1.,1.,1., 1.,1.,1.]]}
    1428     deltx = np.eye((3))*.001
     1428    deltx = np.ones((3,4))*.01
     1429    deltx[:3,:3] = np.eye((3))*.001
    14291430    deltu = np.eye((6))*.0001
    14301431    xyz = np.array(XYZ)%1.
     1432    xyzt = np.array(XYZ+[0,])%1.
    14311433    uij = np.array(UIJ)
    14321434    SGOps = SGData['SGOps']
     
    15241526#    elif SGData['SGLaue'] in ['6/m','6/mmm']:
    15251527#       
    1526     xsin = np.zeros(3)
    1527     xcos = np.zeros(3)
    1528     usin = np.zeros(6)
    1529     ucos = np.zeros(6)
     1528    xsin = np.zeros(3,dtype='i')
     1529    xcos = np.zeros(3,dtype='i')
     1530    usin = np.zeros(6,dtype='i')
     1531    ucos = np.zeros(6,dtype='i')
     1532    csi = np.ones((6),dtype='i')*-1
    15301533    for i,idelt in enumerate(deltx):
    1531         nxyz = (np.inner(sop[0],(xyz+idelt))+sop[1])%1.
    1532         print 'nxyz',i,nxyz
    1533         xsin[i] = np.equal((xyz-idelt)%1.,nxyz)[i]
    1534         print 'sin',(xyz-idelt)%1.
    1535         xcos[i] = np.equal((xyz+idelt)%1.,nxyz)[i]
    1536         print 'cos',(xyz+idelt)%1.
     1534        print 'idelt:',idelt
     1535        nxyzt = np.inner(ssop[0],(xyzt+idelt))+ssop[1]
     1536        nxyzt[3] -= ssop[1][3]
     1537        print 'nxyz',nxyzt
     1538        xsin[i] = np.allclose((xyzt-idelt),nxyzt,1.e-6)
     1539        print 'sin ',(xyzt-idelt),xsin[i]
     1540        xcos[i] = np.allclose((xyzt+idelt),nxyzt,1.e-6)
     1541        print 'cos ',(xyzt+idelt),xcos[i]
     1542    n = -1
     1543    for i,isin in enumerate(xsin):
     1544        if isin:
     1545            n += 1
     1546            csi[i] = n
     1547    for i,icos in enumerate(xcos):
     1548        if icos:
     1549            n += 1
     1550            csi[i+3] = n
     1551    print csi
    15371552    print CSI['Spos'][0]
    15381553    print xsin,xcos
Note: See TracChangeset for help on using the changeset viewer.