Changeset 2369


Ignore:
Timestamp:
Jul 11, 2016 1:52:10 PM (5 years ago)
Author:
vondreele
Message:

revisions to inverse pole figure calcs - now close to correct symmetry

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r2367 r2369  
    401401    """
    402402    A,B = cell2AB(cell)
    403     xH = np.inner(B,H)
     403    xH = np.inner(B.T,H)
    404404    r = np.sqrt(np.sum(xH**2,axis=0))
    405405    phi = acosd(xH[2]/r)
  • trunk/GSASIIplot.py

    r2368 r2369  
    31803180        Beta = []
    31813181        Rmd = []
    3182         refSets = [G2spc.GenHKLf(hkl,SGData)[2] for hkl in Refs[:3].T]
    3183         refSets = [[np.fromstring(item.strip('[]').replace('-0','0'),sep=' ')    \
    3184             for item in list(set([str(ref) for ref in refSet]))] for refSet in refSets]
     3182        Ops = np.array([Op[0].T for Op in SGData['SGOps']])
     3183        refSets = [np.inner(Ops,hkl) for hkl in Refs[:3].T]
    31853184        for ir,refSet in enumerate(refSets):
    3186             refSet = [np.where(ref[2]<0,-1*ref,ref) for ref in refSet]
     3185            refSet = np.vstack((refSet,-refSet))    #add Friedel pairs
     3186            refSet = [np.where(ref[2]<0,-1.*ref,ref) for ref in refSet] #take +l of each pair then remove duplicates
     3187            refSet = set([str(ref).strip('[]').replace('-0',' 0') for ref in refSet])
     3188            refSet = [np.fromstring(item,sep=' ') for item in refSet]
    31873189            refSets[ir] = refSet
     3190        for ir,refSet in enumerate(refSets):
    31883191            r,beta,phi = G2lat.HKL2SpAng(refSet,cell[:6],SGData)    #radius, inclination, azimuth
    3189 #            beta,phi = G2lat.CrsAng(np.array(refSet),cell[:6],SGData)
    31903192            phi *= np.pi/180.
    31913193            beta *= np.pi/180.
     
    32143216                    break
    32153217                except ValueError:
    3216                     sfac *= 1.2
     3218                    sfac *= 1.05
    32173219            Z = [lut(r*np.pi/180.,p*np.pi/180.) for r,p in zip(list(R),list(P))]
    32183220        except AttributeError:
Note: See TracChangeset for help on using the changeset viewer.