Changeset 1174 for trunk/GSASIIpwd.py
- Timestamp:
- Dec 18, 2013 2:55:50 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIpwd.py
r1131 r1174 98 98 :param float Psi: flat plate tilt axis - future 99 99 ''' 100 101 def muRunder3(Sth2): 102 T0 = 16.0/(3.*np.pi) 103 T1 = (25.99978-0.01911*Sth2**0.25)*np.exp(-0.024551*Sth2)+ \ 104 0.109561*np.sqrt(Sth2)-26.04556 105 T2 = -0.02489-0.39499*Sth2+1.219077*Sth2**1.5- \ 106 1.31268*Sth2**2+0.871081*Sth2**2.5-0.2327*Sth2**3 107 T3 = 0.003045+0.018167*Sth2-0.03305*Sth2**2 108 Trns = -T0*MuR-T1*MuR**2-T2*MuR**3-T3*MuR**4 109 return np.exp(Trns) 110 111 def muRover3(Sth2): 112 T1 = 1.433902+11.07504*Sth2-8.77629*Sth2*Sth2+ \ 113 10.02088*Sth2**3-3.36778*Sth2**4 114 T2 = (0.013869-0.01249*Sth2)*np.exp(3.27094*Sth2)+ \ 115 (0.337894+13.77317*Sth2)/(1.0+11.53544*Sth2)**1.555039 116 T3 = 1.933433/(1.0+23.12967*Sth2)**1.686715- \ 117 0.13576*np.sqrt(Sth2)+1.163198 118 T4 = 0.044365-0.04259/(1.0+0.41051*Sth2)**148.4202 119 Trns = (T1-T4)/(1.0+T2*(MuR-3.0))**T3+T4 120 return Trns/100. 121 100 122 Sth2 = npsind(Tth/2.0)**2 101 123 Cth2 = 1.-Sth2 102 124 if 'Cylinder' in Geometry: #Lobanov & Alte da Veiga for 2-theta = 0; beam fully illuminates sample 103 if MuR < 3.0: 104 T0 = 16.0/(3*np.pi) 105 T1 = (25.99978-0.01911*Sth2**0.25)*np.exp(-0.024551*Sth2)+ \ 106 0.109561*np.sqrt(Sth2)-26.04556 107 T2 = -0.02489-0.39499*Sth2+1.219077*Sth2**1.5- \ 108 1.31268*Sth2**2+0.871081*Sth2**2.5-0.2327*Sth2**3 109 T3 = 0.003045+0.018167*Sth2-0.03305*Sth2**2 110 Trns = -T0*MuR-T1*MuR**2-T2*MuR**3-T3*MuR**4 111 return np.exp(Trns) 112 else: 113 T1 = 1.433902+11.07504*Sth2-8.77629*Sth2*Sth2+ \ 114 10.02088*Sth2**3-3.36778*Sth2**4 115 T2 = (0.013869-0.01249*Sth2)*np.exp(3.27094*Sth2)+ \ 116 (0.337894+13.77317*Sth2)/(1.0+11.53544*Sth2)**1.555039 117 T3 = 1.933433/(1.0+23.12967*Sth2)**1.686715- \ 118 0.13576*np.sqrt(Sth2)+1.163198 119 T4 = 0.044365-0.04259/(1.0+0.41051*Sth2)**148.4202 120 Trns = (T1-T4)/(1.0+T2*(MuR-3.0))**T3+T4 121 return Trns/100. 125 return np.where(MuR <3.0,muRunder3(Sth2),muRover3(Sth2)) 122 126 elif 'Bragg' in Geometry: 123 127 return 1.0
Note: See TracChangeset
for help on using the changeset viewer.