Changeset 1278 for trunk/GSASIIsasd.py


Ignore:
Timestamp:
Apr 16, 2014 4:04:22 PM (8 years ago)
Author:
vondreele
Message:

add Rgco to all Unified levels, remove Refine from MinSize?, add estimate of B from G,Rg,& P for unified levels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIsasd.py

    r1277 r1278  
    859859    refsum = np.sum(np.interp(x[iBeg:iFin],rx,ry,0,0))
    860860    Sample['Scale'][0] = refSample['Scale'][0]*refsum/sum
     861   
     862def Bestimate(G,Rg,P):
     863    return (G*P/Rg**P)*np.exp(scsp.gammaln(P/2))
    861864   
    862865###############################################################################
     
    10091012                Ic += np.dot(Gmat,dist)
    10101013            elif 'Unified' in Type:
    1011                 Rg,G,B,P = parmDict[cid+'Rg'],parmDict[cid+'G'],parmDict[cid+'B'],parmDict[cid+'P']
     1014                Rg,G,B,P,Rgco = parmDict[cid+'Rg'],parmDict[cid+'G'],parmDict[cid+'B'], \
     1015                    parmDict[cid+'P'],parmDict[cid+'Cutoff']
    10121016                Qstar = Q/(scsp.erf(Q*Rg/np.sqrt(6)))**3
    10131017                Guin = G*np.exp(-(Q*Rg)**2/3)
    1014                 Porod = (B/Qstar**P)
     1018                Porod = (B/Qstar**P)*np.exp(-(Q*Rgco)**2/3)
    10151019                Ic += Guin+Porod
    10161020            elif 'Porod' in Type:
     
    11041108        elif 'Unified' in distFxn:
    11051109            parmDict = level[controls['DistType']]
    1106             Rg,G,B,P = parmDict['Rg'][0],parmDict['G'][0],parmDict['B'][0],parmDict['P'][0]
     1110            Rg,G,B,P,Rgco = parmDict['Rg'][0],parmDict['G'][0],parmDict['B'][0],    \
     1111                parmDict['P'][0],parmDict['Cutoff'][0]
    11071112            Qstar = Q[Ibeg:Ifin]/(scsp.erf(Q[Ibeg:Ifin]*Rg/np.sqrt(6)))**3
    11081113            Guin = G*np.exp(-(Q[Ibeg:Ifin]*Rg)**2/3)
    1109             Porod = (B/Qstar**P)
     1114            Porod = (B/Qstar**P)*np.exp(-(Q[Ibeg:Ifin]*Rgco)**2/3)
    11101115            Ic[Ibeg:Ifin] += Guin+Porod
    11111116            Rbins.append([])
Note: See TracChangeset for help on using the changeset viewer.