Changeset 942 for trunk/GSASIIstrIO.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/GSASIIstrIO.py

    r939 r942  
    483483    print >>pFile,' Initial shift factor: ','%.3f'%(Controls['shift factor'])
    484484   
    485 def GetFFtable(General):
    486     ''' returns a dictionary of form factor data for atom types found in General
    487 
    488     :param dict General: dictionary of phase info.; includes AtomTypes
    489     :return: FFtable, dictionary of form factor data; key is atom type
    490 
    491     '''
    492     atomTypes = General['AtomTypes']
    493     FFtable = {}
    494     for El in atomTypes:
    495         FFs = G2el.GetFormFactorCoeff(El.split('+')[0].split('-')[0])
    496         for item in FFs:
    497             if item['Symbol'] == El.upper():
    498                 FFtable[El] = item
    499     return FFtable
    500    
    501 def GetBLtable(General):
    502     ''' returns a dictionary of neutron scattering length data for atom types & isotopes found in General
    503 
    504     :param dict General: dictionary of phase info.; includes AtomTypes & Isotopes
    505     :return: BLtable, dictionary of scattering length data; key is atom type
    506     '''
    507     atomTypes = General['AtomTypes']
    508     BLtable = {}
    509     isotopes = General['Isotopes']
    510     isotope = General['Isotope']
    511     for El in atomTypes:
    512         BLtable[El] = [isotope[El],isotopes[El][isotope[El]]]
    513     return BLtable
    514        
    515485def GetPawleyConstr(SGLaue,PawleyRef,pawleyVary):
    516486    'needs a doc string'
     
    900870        pId = PhaseData[name]['pId']
    901871        pfx = str(pId)+'::'
    902         FFtable = GetFFtable(General)
    903         BLtable = GetBLtable(General)
     872        FFtable = G2el.GetFFtable(General['AtomTypes'])
     873        BLtable = G2el.GetBLtable(General)
    904874        FFtables.update(FFtable)
    905875        BLtables.update(BLtable)
Note: See TracChangeset for help on using the changeset viewer.