Changeset 166 for trunk/GSASIIElem.py


Ignore:
Timestamp:
Oct 26, 2010 3:09:48 PM (11 years ago)
Author:
vondreele
Message:

fixups of atom editing/atom drawing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIElem.py

    r155 r166  
    207207    return MagFormFactors
    208208
    209 def ScatFac(FormFac, SThL):
     209def ScatFac(FormFac, SQ):
    210210    """compute value of form factor
    211211    @param FormFac: dictionary  defined in GetFormFactorCoeff
    212     @param SThL: sin-theta/lambda
     212    @param SQ: (sin-theta/lambda)**2
    213213    @return: f: real part of form factor
    214214    """
    215     f = FormFac['fc']
    216     fa = FormFac['fa']
    217     fb = FormFac['fb']
    218     for i in range(4):
    219         t = -fb[i]*SThL*SThL
    220         if t > -35.0: f += fa[i]*math.exp(t)
    221     return f
     215    fa = np.array(FormFac['fa'])
     216    fb = np.array(FormFac['fb'])
     217    t = -fb*SQ
     218    return np.sum(fa*np.exp(t))+FormFac['fc']
    222219           
    223220def FPcalc(Orbs, KEv):
Note: See TracChangeset for help on using the changeset viewer.