Changeset 1766 for trunk/GSASIIlattice.py
 Timestamp:
 Mar 27, 2015 2:46:30 PM (7 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIlattice.py
r1598 r1766 47 47 rdsq2d = lambda x,p: round(1.0/np.sqrt(x),p) 48 48 rpd = np.pi/180. 49 RSQ2PI = 1./np.sqrt(2.*np.pi) 50 SQ2 = np.sqrt(2.) 51 RSQPI = 1./np.sqrt(np.pi) 49 52 50 53 def sec2HMS(sec): … … 1039 1042 1040 1043 BD = 1.0BC**2 1041 if BD > 0.:1044 if BD > 1.e6: 1042 1045 C = rpd/math.sqrt(BD) 1043 1046 else: … … 1061 1064 dBBdF = BC1*SComegBC3*SSomeg*SCchi 1062 1065 1063 if BD > 0.:1066 if BD > 1.e6: 1064 1067 dGMdA = [(BA*dBBdOBB*dBAdO)/BD,(BA*dBBdCBB*dBAdC)/BD,(BA*dBBdFBB*dBAdF)/BD] 1065 1068 else: … … 1110 1113 'needs doc string' 1111 1114 import pytexture as ptx 1112 RSQ2PI = 0.39894228040141113 SQ2 = 1.4142135623731114 1115 if SGLaue in ['m3','m3m']: 1115 1116 Kcl = 0.0 … … 1138 1139 'needs doc string' 1139 1140 import pytexture as ptx 1140 RSQPI = 0.56418958354781141 SQ2 = 1.4142135623731142 1141 psrs,dpdps = ptx.pyplmpsi(L,M,1,psi) 1143 psrs *= RSQ PI1144 dpdps *= RSQ PI1145 if M == 0:1146 psrs /= SQ21147 dpdps /= SQ21142 psrs *= RSQ2PI 1143 dpdps *= RSQ2PI 1144 if M: 1145 psrs *= SQ2 1146 dpdps *= SQ2 1148 1147 if SamSym in ['mmm',]: 1149 1148 dum = cosd(M*gam) … … 1164 1163 """ 1165 1164 import pytexture as ptx 1166 RSQ2PI = 0.39894228040141167 SQ2 = 1.4142135623731168 1165 Ksl,x = ptx.pyplmpsi(L,0,1,psi) 1169 1166 Ksl *= RSQ2PI … … 1194 1191 'needs doc string' 1195 1192 import pytexture as ptx 1196 RSQPI = 0.56418958354781197 SQ2 = 1.4142135623731198 1193 1199 1194 if Start: … … 1219 1214 import pytexture as ptx 1220 1215 1221 FORPI = 12.56637061435921222 RSQPI = 0.56418958354781223 SQ2 = 1.4142135623731224 1225 1216 if Start: 1226 1217 ptx.pyqlmninit() … … 1260 1251 ''' 1261 1252 import pytexture as ptx 1262 RSQPI = 0.56418958354781263 SQ2 = 1.4142135623731264 1253 PolVal = np.ones_like(psi) 1265 1254 for term in ODFln: … … 1268 1257 psrs,dum = ptx.pyplmpsi(l,m,len(psi),psi) 1269 1258 if SamSym in ['1','2/m']: 1270 if m != 0:1259 if m: 1271 1260 Ksl = RSQPI*psrs*(cosd(m*gam)+sind(m*gam)) 1272 1261 else: 1273 1262 Ksl = RSQPI*psrs/SQ2 1274 1263 else: 1275 if m != 0:1264 if m: 1276 1265 Ksl = RSQPI*psrs*cosd(m*gam) 1277 1266 else: … … 1284 1273 import pytexture as ptx 1285 1274 1286 FORPI = 12.56637061435921287 RSQPI = 0.56418958354781288 SQ2 = 1.4142135623731289 1290 1275 invPolVal = np.ones_like(beta) 1291 1276 for term in ODFln:
Note: See TracChangeset
for help on using the changeset viewer.