Changeset 1175 for trunk/GSASIIpwd.py


Ignore:
Timestamp:
Dec 19, 2013 9:37:07 AM (8 years ago)
Author:
vondreele
Message:

add surface roughness (Surotti model) to Bragg-Brentano sample parameters
seems to work OK but I don't have a good test data set.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwd.py

    r1174 r1175  
    8989    elif 'Bragg' in Geometry:
    9090        return 0.0
     91       
     92def SurfaceRough(SRA,SRB,Tth):
     93    ''' Suortti surface roughness correction
     94    '''
     95    sth = npsind(Tth/2.)
     96    T1 = np.exp(-SRB/sth)
     97    T2 = SRA+(1.-SRA)*np.exp(-SRB)
     98    return (SRA+(1.-SRA)*T1)/T2
     99   
     100def SurfaceRoughDerv(SRA,SRB,Tth):
     101    ''' Suortti surface roughness correction derivatives
     102    '''
     103    sth = npsind(Tth/2.)
     104    T1 = np.exp(-SRB/sth)
     105    T2 = SRA+(1.-SRA)*np.exp(-SRB)
     106    Trans = (SRA+(1.-SRA)*T1)/T2
     107    dydSRA = ((1.-T1)*T2-(1.-np.exp(-SRB))*Trans)/T2**2
     108    dydSRB = ((SRA-1.)*T1*T2/sth-Trans*(SRA-T2))/T2**2
     109    return [dydSRA,dydSRB]
    91110
    92111def Absorb(Geometry,MuR,Tth,Phi=0,Psi=0):
Note: See TracChangeset for help on using the changeset viewer.