Changeset 5016


Ignore:
Timestamp:
Aug 25, 2021 2:37:53 PM (3 months ago)
Author:
vondreele
Message:

Add missing Gonio. Radius to pink beam Sample parms.
Minor fixes to get new data type 'PNB' to work for CW binned POWGEN data.
Fix missing parms for pink beams (DisplX & DisplY)
Get wave in as argument to GetReflPosDerv? for pink beams; now can refine lattice parameters.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r5014 r5016  
    335335    parms = []
    336336    parms.append(['Scale','Histogram scale factor: ',[10,7]])
    337     if 'C' in histType:
     337    if 'C' in histType or 'B' in histType:
    338338        parms.append(['Gonio. radius','Goniometer radius (mm): ',[10,3]])
    339339    if 'PWDR' in histName:
     
    29782978        nameSizer.Add(wx.StaticText(G2frame.dataWindow,wx.ID_ANY,' Diffractometer type: '),
    29792979                    0,WACV)
    2980         if 'T' in Inst['Type'][0]:
     2980        if 'T' in Inst['Type'][0] or 'B' in Inst['Type'][0]:
    29812981            choices = ['Debye-Scherrer',]
    29822982        else:
  • trunk/GSASIIstrMath.py

    r5015 r5016  
    26112611    parmDict[hfx+'Scale'] = max(1.e-12,parmDict[hfx+'Scale'])                        #put floor on histogram scale
    26122612    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']:
    26142614        Icorr *= G2pwd.Polarization(parmDict[hfx+'Polariz.'],refl[5+im],parmDict[hfx+'Azimuth'])[0]
    26152615    POcorr = 1.0
     
    26322632    dIdsh = 1./parmDict[hfx+'Scale']
    26332633    dIdsp = 1./parmDict[phfx+'Scale']
    2634     if 'X' in parmDict[hfx+'Type']:
     2634    if 'XC' in parmDict[hfx+'Type']:
    26352635        pola,dIdPola = G2pwd.Polarization(parmDict[hfx+'Polariz.'],refl[5+im],parmDict[hfx+'Azimuth'])
    26362636        dIdPola /= pola
     
    32173217    yb,Histogram['sumBk'] = G2pwd.getBackground(hfx,parmDict,bakType,calcControls[hfx+'histType'],x,fixback)
    32183218    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])
    32213221       
    32223222    if 'C' in calcControls[hfx+'histType']:   
     
    32513251            SSGData = Phase['General']['SSGData']
    32523252            im = 1  #offset in SS reflection list
    3253             #??
    32543253        Dij = GetDij(phfx,SGData,parmDict)
    32553254        A = [parmDict[pfx+'A%d'%(i)]+Dij[i] for i in range(6)]  #TODO: need to do something if Dij << 0.
     
    33783377                else:
    33793378                    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
    33813384        elif 'T' in calcControls[hfx+'histType']:
    33823385            for iref,refl in enumerate(refDict['RefList']):
     
    35043507    if hfx+'BF mult' in varylist:
    35053508        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])
    35083511    Ka2 = False #also for TOF!
    35093512    if 'C' in calcControls[hfx+'histType']:   
     
    36733676                    hfx+'sig-2':[refl[4+im]**4,'sig'],hfx+'sig-q':[refl[4+im],'sig'],
    36743677                    hfx+'Absorption':[dFdAb,'int'],phfx+'Extinction':[dFdEx,'int'],}
    3675             elif 'B' in calcControls[hfx+'histType']:   #'T'OF
    3676                 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)
    36773680                names = {hfx+'Scale':[dIdsh,'int'],phfx+'Scale':[dIdsp,'int'],hfx+'Lam':[dpdw,'pos'],
    36783681                    hfx+'Zero':[dpdZ,'pos'],hfx+'X':[1.0/costh,'gam'],hfx+'Y':[tanth,'gam'],hfx+'Z':[1.0,'gam'],
    36793682                    hfx+'U':[tanth**2,'sig'],hfx+'V':[tanth,'sig'],hfx+'W':[1.0,'sig'],hfx+'Polariz.':[dIdpola,'int'],
    36803683                    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']}
    36823685            for name in names:
    36833686                item = names[name]
Note: See TracChangeset for help on using the changeset viewer.