Changeset 4485


Ignore:
Timestamp:
Jun 13, 2020 9:44:53 AM (16 months ago)
Author:
vondreele
Message:

fix plotting of BNS centered modulated magnetic moment plotting

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r4483 r4485  
    18021802                drawatom[dcx:dcx+3] = X
    18031803            if generalData['Type'] == 'magnetic':
    1804                 M = G2spc.ApplyStringOpsMom(opr,SGData,atmom+mom)
     1804                M = G2spc.ApplyStringOpsMom(opr,SGData,SSGData,atmom+mom)
    18051805                drawatom[dcx+3:dcx+6] = M
    18061806    return drawAtoms,Fade
  • trunk/GSASIIspc.py

    r4456 r4485  
    35673567        return newX
    35683568       
    3569 def ApplyStringOpsMom(A,SGData,Mom):
    3570     'Needs a doc string'
     3569def ApplyStringOpsMom(A,SGData,SSGData,Mom):
     3570    '''Applies string operations to modulated magnetic moment components used in drawing
     3571    '''
    35713572    SGOps = SGData['SGOps']
     3573    SSGCen = SSGData['SSGCen']
    35723574    Ax = A.split('+')
    35733575    Ax[0] = int(Ax[0])
     
    35823584        NA += len(SGOps)
    35833585    M,T = SGOps[nA]
    3584     if SGData['SGGray']:
    3585         newMom = -np.inner(Mom,M).T*nl.det(M)*SGData['SpnFlp'][NA+nC]
    3586     else:
    3587         newMom = np.inner(Mom,M).T*nl.det(M)*SGData['SpnFlp'][NA+nC]
    3588 #        print(len(SGOps),Ax[0],iAx,nC,nA,NA,MT2text([M,T]).replace(' ',''),SGData['SpnFlp'][NA],Mom,newMom)
    3589 #    print(Mom,newMom,MT2text([M,T]),)
     3586    newMom = np.inner(Mom,M).T*SGData['MagMom'][NA+nC]
     3587    if SSGCen[iAx//100][3]:     #flip spin for BNS centered atoms
     3588        newMom *= -1.
    35903589    return newMom
    35913590       
Note: See TracChangeset for help on using the changeset viewer.