Changeset 2808 for trunk/GSASIIpwd.py


Ignore:
Timestamp:
Apr 25, 2017 2:01:51 PM (5 years ago)
Author:
vondreele
Message:

small fixes to reflectometry calcs.
fix Hessian restraint bug - wrong sign for Vec
add theta, refl, (sig) import option for reflectometry

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwd.py

    r2802 r2808  
    19861986            line = ' '
    19871987            line2 = ' Scattering density: Real %.5g'%(Substances[name]['Scatt density']*parmDict[cid+'DenMul'])
    1988             line2 += ' Imag %.5g'%(Substances[name].get('XImag density',0.)**parmDict[cid+'DenMul'])
     1988            line2 += ' Imag %.5g'%(Substances[name].get('XImag density',0.)*parmDict[cid+'DenMul'])
    19891989            for parm in ['Thick','Rough','DenMul','Mag SLD','iDenMul']:
    19901990                if parm in layer:
     
    21702170            sigma[ilay] = max(0.001,layer['Rough'][0])
    21712171        if name != 'vacuum':
    2172             rho[ilay] = Substances[name]['Scatt density']*layer['DenMul'][0]
     2172            if name == 'unit scatter':
     2173                rho[ilay] = np.sqrt(layer['DenMul'][0]**2+layer['iDenMul'][0]**2)
     2174            else:
     2175                rrho = Substances[name]['Scatt density']
     2176                irho = Substances[name]['XImag density']
     2177                rho[ilay] = np.sqrt(rrho**2+irho**2)*layer['DenMul'][0]
    21732178        if 'Mag SLD' in layer:
    21742179            rho[ilay] += layer['Mag SLD'][0]
Note: See TracChangeset for help on using the changeset viewer.