Changeset 942 for trunk/GSASIIstrMath.py


Ignore:
Timestamp:
Jun 5, 2013 9:26:36 AM (9 years ago)
Author:
vondreele
Message:

mods for MC/SA:
moved scat fac routines from GSASIIstrIO.py & GSASIIstrMath.py to GSASIIElem.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMath.py

    r939 r942  
    516516    return Tdata,Mdata,Fdata,Xdata,dXdata,IAdata,Uisodata,Uijdata
    517517   
    518 def getFFvalues(FFtables,SQ):
    519     'Needs a doc string'
    520     FFvals = {}
    521     for El in FFtables:
    522         FFvals[El] = G2el.ScatFac(FFtables[El],SQ)[0]
    523     return FFvals
    524    
    525 def getBLvalues(BLtables):
    526     'Needs a doc string'
    527     BLvals = {}
    528     for El in BLtables:
    529         BLvals[El] = BLtables[El][1][1]
    530     return BLvals
    531        
    532518def StructureFactor(refList,G,hfx,pfx,SGData,calcControls,parmDict):
    533519    ''' Compute structure factors for all h,k,l for phase
     
    557543        FP = np.array([FFtables[El][hfx+'FP'] for El in Tdata])
    558544        FPP = np.array([FFtables[El][hfx+'FPP'] for El in Tdata])
    559     maxPos = len(SGData['SGOps'])
    560545    Uij = np.array(G2lat.U6toUij(Uijdata))
    561546    bij = Mast*Uij.T
     
    568553        if not len(refl[-1]):                #no form factors
    569554            if 'N' in parmDict[hfx+'Type']:
    570                 refl[-1] = getBLvalues(BLtables)
     555                refl[-1] = G2el.getBLvalues(BLtables)
    571556            else:       #'X'
    572                 refl[-1] = getFFvalues(FFtables,SQ)
     557                refl[-1] = G2el.getFFvalues(FFtables,SQ)
    573558        for i,El in enumerate(Tdata):
    574559            FF[i] = refl[-1][El]           
     
    611596        FP = np.array([FFtables[El][hfx+'FP'] for El in Tdata])
    612597        FPP = np.array([FFtables[El][hfx+'FPP'] for El in Tdata])
    613     maxPos = len(SGData['SGOps'])       
    614598    Uij = np.array(G2lat.U6toUij(Uijdata))
    615599    bij = Mast*Uij.T
Note: See TracChangeset for help on using the changeset viewer.