Changeset 5016
- Timestamp:
- Aug 25, 2021 2:37:53 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIpwdGUI.py
r5014 r5016 335 335 parms = [] 336 336 parms.append(['Scale','Histogram scale factor: ',[10,7]]) 337 if 'C' in histType :337 if 'C' in histType or 'B' in histType: 338 338 parms.append(['Gonio. radius','Goniometer radius (mm): ',[10,3]]) 339 339 if 'PWDR' in histName: … … 2978 2978 nameSizer.Add(wx.StaticText(G2frame.dataWindow,wx.ID_ANY,' Diffractometer type: '), 2979 2979 0,WACV) 2980 if 'T' in Inst['Type'][0] :2980 if 'T' in Inst['Type'][0] or 'B' in Inst['Type'][0]: 2981 2981 choices = ['Debye-Scherrer',] 2982 2982 else: -
trunk/GSASIIstrMath.py
r5015 r5016 2611 2611 parmDict[hfx+'Scale'] = max(1.e-12,parmDict[hfx+'Scale']) #put floor on histogram scale 2612 2612 Icorr = parmDict[phfx+'Scale']*parmDict[hfx+'Scale']*refl[3+im] #scale*multiplicity 2613 if 'X ' in parmDict[hfx+'Type']:2613 if 'XC' in parmDict[hfx+'Type']: 2614 2614 Icorr *= G2pwd.Polarization(parmDict[hfx+'Polariz.'],refl[5+im],parmDict[hfx+'Azimuth'])[0] 2615 2615 POcorr = 1.0 … … 2632 2632 dIdsh = 1./parmDict[hfx+'Scale'] 2633 2633 dIdsp = 1./parmDict[phfx+'Scale'] 2634 if 'X ' in parmDict[hfx+'Type']:2634 if 'XC' in parmDict[hfx+'Type']: 2635 2635 pola,dIdPola = G2pwd.Polarization(parmDict[hfx+'Polariz.'],refl[5+im],parmDict[hfx+'Azimuth']) 2636 2636 dIdPola /= pola … … 3217 3217 yb,Histogram['sumBk'] = G2pwd.getBackground(hfx,parmDict,bakType,calcControls[hfx+'histType'],x,fixback) 3218 3218 yc = np.zeros_like(yb) 3219 #cw = np.diff(ma.getdata(x))3220 #cw = np.append(cw,cw[-1])3219 cw = np.diff(ma.getdata(x)) 3220 cw = np.append(cw,cw[-1]) 3221 3221 3222 3222 if 'C' in calcControls[hfx+'histType']: … … 3251 3251 SSGData = Phase['General']['SSGData'] 3252 3252 im = 1 #offset in SS reflection list 3253 #??3254 3253 Dij = GetDij(phfx,SGData,parmDict) 3255 3254 A = [parmDict[pfx+'A%d'%(i)]+Dij[i] for i in range(6)] #TODO: need to do something if Dij << 0. … … 3378 3377 else: 3379 3378 fp = G2pwd.getEpsVoigt(refl[5+im],refl[12+im],refl[13+im],refl[6+im]/1.e4,refl[7+im]/100.,ma.getdata(x[iBeg:iFin]))[0] 3380 yc[iBeg:iFin] += refl[11+im]*refl[9+im]*fp #*cw[iBeg:iFin] 3379 # if 'NB' in calcControls[hfx+'histType']: 3380 # yc[iBeg:iFin] += refl[11+im]*refl[9+im]*fp*.001/cw[iBeg:iFin] 3381 # else: 3382 # yc[iBeg:iFin] += refl[11+im]*refl[9+im]*fp 3383 yc[iBeg:iFin] += refl[11+im]*refl[9+im]*fp 3381 3384 elif 'T' in calcControls[hfx+'histType']: 3382 3385 for iref,refl in enumerate(refDict['RefList']): … … 3504 3507 if hfx+'BF mult' in varylist: 3505 3508 dMdv[varylist.index(hfx+'BF mult')] += dMdfb 3506 #cw = np.diff(ma.getdata(x))3507 #cw = np.append(cw,cw[-1])3509 cw = np.diff(ma.getdata(x)) 3510 cw = np.append(cw,cw[-1]) 3508 3511 Ka2 = False #also for TOF! 3509 3512 if 'C' in calcControls[hfx+'histType']: … … 3673 3676 hfx+'sig-2':[refl[4+im]**4,'sig'],hfx+'sig-q':[refl[4+im],'sig'], 3674 3677 hfx+'Absorption':[dFdAb,'int'],phfx+'Extinction':[dFdEx,'int'],} 3675 elif 'B' in calcControls[hfx+'histType']: #'T'OF3676 dpdA,dpdw,dpdZ,dpdSh,dpdTr,dpdX,dpdY,dpdV = GetReflPosDerv(refl,im, 0.0,A,pfx,hfx,phfx,calcControls,parmDict)3678 elif 'B' in calcControls[hfx+'histType']: 3679 dpdA,dpdw,dpdZ,dpdSh,dpdTr,dpdX,dpdY,dpdV = GetReflPosDerv(refl,im,wave,A,pfx,hfx,phfx,calcControls,parmDict) 3677 3680 names = {hfx+'Scale':[dIdsh,'int'],phfx+'Scale':[dIdsp,'int'],hfx+'Lam':[dpdw,'pos'], 3678 3681 hfx+'Zero':[dpdZ,'pos'],hfx+'X':[1.0/costh,'gam'],hfx+'Y':[tanth,'gam'],hfx+'Z':[1.0,'gam'], 3679 3682 hfx+'U':[tanth**2,'sig'],hfx+'V':[tanth,'sig'],hfx+'W':[1.0,'sig'],hfx+'Polariz.':[dIdpola,'int'], 3680 3683 hfx+'alpha-0':[1.0,'alp'],hfx+'alpha-1':[tanth,'alp'],hfx+'beta-0':[1.0,'bet'],hfx+'beta-1':[tanth,'bet'], 3681 hfx+'Absorption':[dFdAb,'int'],phfx+'Extinction':[dFdEx,'int'], }3684 hfx+'Absorption':[dFdAb,'int'],phfx+'Extinction':[dFdEx,'int'],hfx+'DisplaceX':[dpdX,'pos'],hfx+'DisplaceY':[dpdY,'pos']} 3682 3685 for name in names: 3683 3686 item = names[name]
Note: See TracChangeset
for help on using the changeset viewer.