Changeset 3164


Ignore:
Timestamp:
Nov 28, 2017 11:32:31 AM (6 years ago)
Author:
vondreele
Message:

fix neutron resonant scattering factor calcs. - neglected constant term
put tyr/except around import pypowder in G2pwd & G2math - to allow testing

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIElem.py

    r3136 r3164  
    396396            D1 = T1**2+gam**2
    397397            D2 = T2**2+gam**2
    398             FP[i] = Re*(T0/D0+A*T1/D1+B*T2/D2)
    399             FPP[i] = Im*(1/D0+A/D1+B/D2)
     398            FP[i] = Re*(T0/D0+A*T1/D1+B*T2/D2)+BL[i]['BW-LS'][0]
     399            FPP[i] = -Im*(1/D0+A/D1+B/D2)
    400400        else:
    401401            FPP[i] = BL['SL'][1]    #for Li, B, etc.
     
    416416            D1 = T1**2+gam**2
    417417            D2 = T2**2+gam**2
    418             FP[i] = Re*(T0/D0+A*T1/D1+B*T2/D2)
    419             FPP[i] = Im*(1/D0+A/D1+B/D2)
     418            FP[i] = Re*(T0/D0+A*T1/D1+B*T2/D2)+BL[i]['BW-LS'][0]
     419            FPP[i] = -Im*(1/D0+A/D1+B/D2)
    420420        else:
    421421            FPP[i] = np.ones(len(wave))*BL[i]['SL'][1]    #for Li, B, etc.
  • trunk/GSASIImath.py

    r3157 r3164  
    3131import numpy.fft as fft
    3232import scipy.optimize as so
    33 import pypowder as pwd
     33try:
     34    import pypowder as pyd
     35except ImportError:
     36    print ('pypowder is not available - profile calcs. not allowed')
    3437
    3538sind = lambda x: np.sin(x*np.pi/180.)
  • trunk/GSASIIpwd.py

    r3157 r3164  
    3737import GSASIIElem as G2elem
    3838import GSASIImath as G2mth
    39 import pypowder as pyd
     39try:
     40    import pypowder as pyd
     41except ImportError:
     42    print ('pypowder is not available - profile calcs. not allowed')
    4043try:
    4144    import pydiffax as pyx
Note: See TracChangeset for help on using the changeset viewer.