Ignore:
Timestamp:
Sep 24, 2017 8:02:10 PM (4 years ago)
Author:
vondreele
Message:

fix origin shift transformation & vec,matrix, vec transformations; now works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r3092 r3097  
    229229    return UijtoU6(Uij)
    230230   
    231 def TransformPhase(oldPhase,newPhase,Trans,Vec,ifMag):
     231def TransformPhase(oldPhase,newPhase,Trans,Uvec,Vvec,ifMag):
    232232    '''Transform atoms from oldPhase to newPhase by Trans & Vec
    233233   
     
    286286        newPhase['Draw Atoms'] = []
    287287    for atom in newAtoms:
    288         atom[cx:cx+3] = TransformXYZ(atom[cx:cx+3],invTrans.T,Vec)%1.
     288        atom[cx:cx+3] = TransformXYZ(atom[cx:cx+3]-Uvec,invTrans,Vvec)%1.
    289289        if atom[cia] == 'A':
    290290            atom[cia+2:cia+8] = TransformU6(atom[cia+2:cia+8],invTrans)
     
    306306   
    307307def FillUnitCell(Phase):
    308     Atoms = Phase['Atoms']
     308    Atoms = copy.deepcopy(Phase['Atoms'])
    309309    atomData = []
    310310    atCodes = []
Note: See TracChangeset for help on using the changeset viewer.