Changeset 1466


Ignore:
Timestamp:
Aug 18, 2014 2:53:26 PM (7 years ago)
Author:
vondreele
Message:

make extinction math use FcTsq? not Fcsq
fix 3D HKL point lighting
fix reflection listing for CW data

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r1462 r1466  
    655655                        ref[4] = np.sqrt(1./G2lat.calc_rDsq2(H,G))
    656656                        iabsnt,ref[3],Uniq,phi = G2spc.GenHKLf(H,SGData)
    657                     UseList[histoName] = SetDefaultDData(refDict['Type'],histoName)
     657                    UseList[histoName] = SetDefaultDData(reflData['Type'],histoName)
    658658                elif histoName in PWDRlist:
    659659                    Id = G2gd.GetPatternTreeItemId(self,self.root,histoName)
     
    782782                Id = G2gd.GetPatternTreeItemId(self,self.root,histoName)
    783783                refDict,reflData = self.PatternTree.GetItemPyData(Id)
    784                 UseList[histoName] = SetDefaultDData(refDict['Type'],histoName)
     784                UseList[histoName] = SetDefaultDData(reflData['Type'],histoName)
    785785                G,g = G2lat.cell2Gmat(generalData['Cell'][1:7])
    786786                for iref,ref in enumerate(reflData['RefList']):
  • trunk/GSASIIplot.py

    r1463 r1466  
    512512            Data['Iscale'] = not Data['Iscale']
    513513        elif key in Choice:
    514             Data['Type'] = Choice[key]           
     514            Data['Type'] = Choice[key]
    515515        Draw('key')
    516516           
     
    723723            x,y,z = xyz
    724724            r,c = rc
    725             glColor3ubv(c)
     725            glMaterialfv(GL_FRONT_AND_BACK,GL_EMISSION,c)
    726726            glPointSize(r*50)
    727727            glBegin(GL_POINTS)
     
    775775        RenderDots(HKL,RC)
    776776        time0 = time.time()
    777 #        glEnable(GL_BLEND)
    778 #        glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA)
    779 #        glDisable(GL_BLEND)
    780777        if Page.context: Page.canvas.SetCurrent(Page.context)    # wx 2.9 fix
    781778        Page.canvas.SwapBuffers()
  • trunk/GSASIIpwdGUI.py

    r1462 r1466  
    25522552    if HKLF:
    25532553        colLabels = ['H','K','L','mul','d','Fosq','sig','Fcsq','FoTsq','FcTsq','phase','ExtC',]
     2554        if 'T' in Inst['Type'][0]:
     2555            colLabels = ['H','K','L','mul','d','Fosq','sig','Fcsq','FoTsq','FcTsq','phase','ExtC','wave','tbar']
     2556            Types += 2*[wg.GRID_VALUE_FLOAT+':10,3',]           
    25542557    else:
    25552558        if 'C' in Inst['Type'][0]:
  • trunk/GSASIIstrMath.py

    r1465 r1466  
    822822            AV = 1.e7/parmDict[pfx+'Vol']**2
    823823            PL = np.sqrt(1.0-cos2T**2)/parmDict[hfx+'Lam']
    824             PLZ = AV*ref[7]*parmDict[hfx+'Lam']**2
     824            PLZ = AV*ref[9]*parmDict[hfx+'Lam']**2      #Fcsq as per GSAS, why not FcTsq (ref[9])?
    825825           
    826826        if 'Primary' in calcControls[phfx+'EType']:
     
    830830                PLZ *= calcControls[phfx+'Tbar']
    831831            else: #'T'
    832                 PLZ *= ref[13]
     832                PLZ *= ref[13]      #t-bar
    833833        if 'Primary' in calcControls[phfx+'EType']:
    834834            PLZ *= 1.5
     
    11271127    return Icorr,POcorr,AbsCorr,ExtCorr
    11281128   
    1129 def GetIntensityDerv(refl,uniq,G,g,pfx,phfx,hfx,SGData,calcControls,parmDict):
     1129def GetIntensityDerv(refl,wave,uniq,G,g,pfx,phfx,hfx,SGData,calcControls,parmDict):
    11301130    'Needs a doc string'    #need powder extinction derivs!
    11311131    dIdsh = 1./parmDict[hfx+'Scale']
     
    11491149        for iPO in dIdPO:
    11501150            dIdPO[iPO] /= POcorr
    1151     dFdAb = GetAbsorbDerv(refl,hfx,calcControls,parmDict)*refl[14]/refl[16] #wave/abs corr
    1152     dFdEx = GetPwdrExtDerv(refl,pfx,phfx,hfx,calcControls,parmDict)/refl[17]    #/ext corr
     1151    if 'T' in parmDict[hfx+'Type']:
     1152        dFdAb = GetAbsorbDerv(refl,hfx,calcControls,parmDict)*wave/refl[16] #wave/abs corr
     1153        dFdEx = GetPwdrExtDerv(refl,pfx,phfx,hfx,calcControls,parmDict)/refl[17]    #/ext corr
     1154    else:
     1155        dFdAb = GetAbsorbDerv(refl,hfx,calcControls,parmDict)*wave/refl[13] #wave/abs corr
     1156        dFdEx = GetPwdrExtDerv(refl,pfx,phfx,hfx,calcControls,parmDict)/refl[14]    #/ext corr       
    11531157    return dIdsh,dIdsp,dIdPola,dIdPO,dFdODF,dFdSA,dFdAb,dFdEx
    11541158       
     
    17771781            h,k,l = refl[:3]
    17781782            Uniq = np.inner(refl[:3],SGMT)
    1779             dIdsh,dIdsp,dIdpola,dIdPO,dFdODF,dFdSA,dFdAb,dFdEx = GetIntensityDerv(refl,Uniq,G,g,pfx,phfx,hfx,SGData,calcControls,parmDict)
     1783            dIdsh,dIdsp,dIdpola,dIdPO,dFdODF,dFdSA,dFdAb,dFdEx = GetIntensityDerv(refl,wave,Uniq,G,g,pfx,phfx,hfx,SGData,calcControls,parmDict)
    17801784            if 'C' in calcControls[hfx+'histType']:        #CW powder
    17811785                Wd,fmin,fmax = G2pwd.getWidthsCW(refl[5],refl[6],refl[7],shl)
     
    20002004                    for j,var in enumerate(varylist):
    20012005                        if var in dFdvDict:
    2002                             dMdvh[j][iref] = w*dFdvDict[var][iref]*parmDict[phfx+'Scale']*dervCor*ref[11]
     2006                            dMdvh[j][iref] = w*dFdvDict[var][iref]*parmDict[phfx+'Scale']*ref[11]   #*dervCor
    20032007                    for var in dependentVars:
    20042008                        if var in dFdvDict:
    2005                             depDerivDict[var][iref] = w*dFdvDict[var][iref]*parmDict[phfx+'Scale']*dervCor*ref[11]
     2009                            depDerivDict[var][iref] = w*dFdvDict[var][iref]*parmDict[phfx+'Scale']*ref[11]  #*dervCor
    20062010                    if phfx+'Scale' in varylist:
    20072011                        dMdvh[varylist.index(phfx+'Scale')][iref] = w*ref[9]*dervCor
     
    20392043                    for item in ['Ep','Es','Eg']:
    20402044                        if phfx+item in varylist and dervDict:
    2041                             dMdvh[varylist.index(phfx+item)][iref] = w*dervDict[phfx+item]/dervCor  #correct
     2045                            dMdvh[varylist.index(phfx+item)][iref] = w*dervDict[phfx+item]/ref[11]  #correct
    20422046                        elif phfx+item in dependentVars and dervDict:
    2043                             depDerivDict[phfx+item][iref] = w*dervDict[phfx+item]/dervCor
     2047                            depDerivDict[phfx+item][iref] = w*dervDict[phfx+item]/ref[11]
    20442048                    for item in ['BabA','BabU']:
    20452049                        if phfx+item in varylist:
Note: See TracChangeset for help on using the changeset viewer.