Changeset 3402


Ignore:
Timestamp:
May 25, 2018 12:53:10 PM (3 years ago)
Author:
vondreele
Message:

fix missing 'linescan' problem in old files
fix cell/atom transformation issues in Transform
save Parent--> child transformation info in child's SGData as 'fromParent' might be useful later

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r3346 r3402  
    296296    invTrans = nl.inv(Trans)
    297297    newAtoms,atCodes = FillUnitCell(oldPhase)
    298 #    GSASIIpath.IPyBreak()
    299298    Unit =[abs(int(max(unit))-1) for unit in Trans]
    300299    for i,unit in enumerate(Unit):
     
    331330        newPhase['Draw Atoms'] = []
    332331    for atom in newAtoms:
    333         atom[cx:cx+3] = TransformXYZ(atom[cx:cx+3]-Uvec,invTrans,Vvec)%1.
     332        atom[cx:cx+3] = TransformXYZ(atom[cx:cx+3]-Uvec,invTrans.T,Vvec)%1.
    334333        if atom[cia] == 'A':
    335             atom[cia+2:cia+8] = TransformU6(atom[cia+2:cia+8],invTrans)
     334            atom[cia+2:cia+8] = TransformU6(atom[cia+2:cia+8],invTrans.T)
    336335        atom[cs:cs+2] = G2spc.SytSym(atom[cx:cx+3],SGData)[:2]
    337336        atom[cia+8] = ran.randint(0,sys.maxsize)
     
    340339            if mag:
    341340                mom = np.inner(np.array(atom[cm:cm+3]),oBmat)
    342                 mom = np.inner(mom,invTrans.T)
     341                mom = np.inner(mom,invTrans)
    343342                mom = np.inner(mom,nAmat)
    344343                mom /= np.sqrt(np.sum(mom**2))
  • trunk/GSASIIphsGUI.py

    r3397 r3402  
    23972397            generalData = newPhase['General']
    23982398            SGData = generalData['SGData']
     2399            SGData['fromParent'] = [Trans,Uvec,Vvec]        #save these
    23992400            Atoms = newPhase['Atoms']
    24002401            if ifMag:
  • trunk/GSASIIplot.py

    r3396 r3402  
    60676067        except TypeError:
    60686068            return
    6069         if Data['linescan'][0]:
     6069        if Data.get('linescan',[False,0.])[0]:
    60706070            Page.xlim1 = Plot1.get_xlim()
    60716071        new,plotNum,Page,Plot,lim = G2frame.G2plotNB.FindPlotTab('2D Powder Image','mpl',newImage=False)
Note: See TracChangeset for help on using the changeset viewer.