Ignore:
Timestamp:
Mar 24, 2015 4:10:52 PM (9 years ago)
Author:
vondreele
Message:

better fix to export csv reflections
change default I/Ib for strain picking
fix bugs in powder extinction calcs.
remove stray line in G2strMath

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMath.py

    r1759 r1761  
    13161316    if 0 < xfac <= 1.:
    13171317        xn = np.array([xfac**(i+1) for i in range(6)])
    1318         exl = np.sum(xn*coef)
     1318        exl += np.sum(xn*coef)
    13191319    elif xfac > 1.:
    13201320        xfac2 = 1./np.sqrt(xfac)
     
    13241324def GetPwdrExtDerv(refl,im,pfx,phfx,hfx,calcControls,parmDict):
    13251325    'Needs a doc string'
    1326     delt = 0.01
    1327     parmDict[phfx+'Extinction'] += delt
    1328     plus = GetPwdrExt(refl,im,pfx,phfx,hfx,calcControls,parmDict)
    1329     parmDict[phfx+'Extinction'] -= 2.*delt
    1330     minus = GetPwdrExt(refl,im,pfx,phfx,hfx,calcControls,parmDict)
    1331     parmDict[phfx+'Extinction'] += delt
    1332     return (plus-minus)/(2.*delt)   
     1326    coef = np.array([-0.5,0.25,-0.10416667,0.036458333,-0.0109375,2.8497409E-3])
     1327    pi2 = np.sqrt(2./np.pi)
     1328    if 'T' in calcControls[hfx+'histType']:
     1329        sth2 = sind(parmDict[hfx+'2-theta']/2.)**2
     1330        wave = refl[14+im]
     1331    else:   #'C'W
     1332        sth2 = sind(refl[5+im]/2.)**2
     1333        wave = parmDict.get(hfx+'Lam',parmDict.get(hfx+'Lam1',1.0))
     1334    c2th = 1.-2.0*sth2
     1335    flv2 = refl[9+im]*(wave/parmDict[pfx+'Vol'])**2
     1336    if 'X' in calcControls[hfx+'histType']:
     1337        flv2 *= 0.079411*(1.0+c2th**2)/2.0
     1338    xfac = flv2*parmDict[phfx+'Extinction']
     1339    dbde = -500.*flv2
     1340    if xfac > -1.:
     1341        dbde = -flv2/(1.+xfac)**3
     1342    dlde = 0.
     1343    if 0 < xfac <= 1.:
     1344        xn = np.array([i*flv2*xfac**i for i in [1,2,3,4,5,6]])
     1345        dlde = np.sum(xn*coef)
     1346    elif xfac > 1.:
     1347        xfac2 = 1./np.sqrt(xfac)
     1348        dlde = flv2*pi2*xfac2*(-1./xfac+0.375/xfac**2)
     1349       
     1350    return dbde*sth2+dlde*(1.-sth2)
     1351
     1352
     1353#    delt = 0.01
     1354#    parmDict[phfx+'Extinction'] += delt
     1355#    plus = GetPwdrExt(refl,im,pfx,phfx,hfx,calcControls,parmDict)
     1356#    parmDict[phfx+'Extinction'] -= 2.*delt
     1357#    minus = GetPwdrExt(refl,im,pfx,phfx,hfx,calcControls,parmDict)
     1358#    parmDict[phfx+'Extinction'] += delt
     1359#    return (plus-minus)/(2.*delt)   
    13331360   
    13341361def GetIntensityCorr(refl,im,uniq,G,g,pfx,phfx,hfx,SGData,calcControls,parmDict):
     
    17161743        elif uniq == 'c':
    17171744            dDijDict[phfx+'D12'] = h*k
    1718             names.append()
    17191745    else:
    17201746        dDijDict = {phfx+'D11':h**2,phfx+'D22':k**2,phfx+'D33':l**2,
Note: See TracChangeset for help on using the changeset viewer.