- Timestamp:
- Mar 24, 2015 4:10:52 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIplot.py
r1744 r1761 3523 3523 return 3524 3524 dsp = G2img.GetDsp(Xpos,Ypos,Data) 3525 StrSta['d-zero'].append({'Dset':dsp,'Dcalc':0.0,'pixLimit':10,'cutoff': 1.0,3525 StrSta['d-zero'].append({'Dset':dsp,'Dcalc':0.0,'pixLimit':10,'cutoff':0.5, 3526 3526 'ImxyObs':[[],[]],'ImtaObs':[[],[]],'ImtaCalc':[[],[]],'Emat':[1.0,1.0,1.0]}) 3527 3527 R,r = G2img.MakeStrStaRing(StrSta['d-zero'][-1],G2frame.ImageZ,Data) -
trunk/GSASIIstrMath.py
r1759 r1761 1316 1316 if 0 < xfac <= 1.: 1317 1317 xn = np.array([xfac**(i+1) for i in range(6)]) 1318 exl = np.sum(xn*coef)1318 exl += np.sum(xn*coef) 1319 1319 elif xfac > 1.: 1320 1320 xfac2 = 1./np.sqrt(xfac) … … 1324 1324 def GetPwdrExtDerv(refl,im,pfx,phfx,hfx,calcControls,parmDict): 1325 1325 '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) 1333 1360 1334 1361 def GetIntensityCorr(refl,im,uniq,G,g,pfx,phfx,hfx,SGData,calcControls,parmDict): … … 1716 1743 elif uniq == 'c': 1717 1744 dDijDict[phfx+'D12'] = h*k 1718 names.append()1719 1745 else: 1720 1746 dDijDict = {phfx+'D11':h**2,phfx+'D22':k**2,phfx+'D33':l**2, -
trunk/exports/G2export_csv.py
r1760 r1761 250 250 fmt = "{:.0f},{:.0f},{:.0f},{:.0f},{:.3f},{:.3f},{:.3f},{:.2f},{:.0f},{:d}" 251 251 refList = phasDict['RefList'] 252 for ( 253 h,k,l,m,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,Icorr,x,x,x 254 ) in refList: 252 for refItem in refList: 253 h,k,l,m,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,Icorr = refItem[:12] 255 254 self.Write(fmt.format(h,k,l,m,pos,Fobs,Fcalc,phase,mult,i)) 256 255 else: … … 258 257 fmt = "{:.0f},{:.0f},{:.0f},{:.3f},{:.3f},{:.3f},{:.2f},{:.0f},{:d}" 259 258 refList = phasDict['RefList'] 260 for ( 261 h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,Icorr,x,x,x 262 ) in refList: 259 for refItem in refList: 260 h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,Icorr = refItem[:11] 263 261 self.Write(fmt.format(h,k,l,pos,Fobs,Fcalc,phase,mult,i)) 264 262 self.CloseFile()
Note: See TracChangeset
for help on using the changeset viewer.