# Changeset 4520

Ignore:
Timestamp:
Jul 14, 2020 4:08:55 PM (3 years ago)
Message:

some corrections for pink beam single peak fits
implement pink beam Rietveld refinement; function ok, but all bad derivatives

Location:
trunk
Files:
5 edited

Unmodified
Removed
• ## trunk/GSASIImpsubs.py

 r4021 return sInt,resList def ComputeFobsSqPinkbatch(profList): sInt = 0 resList = [] for refl,iref in profList: icod = ComputeFobsSqPink(refl,iref) if type(icod) is tuple: resList.append((icod[0],iref)) sInt += icod[1] elif icod == -1: resList.append((None,iref)) elif icod == -2: break return sInt,resList def ComputeFobsSqCW(refl,iref): yp = np.zeros(len(x)) # not masked refl8im = np.sum(np.where(ratio[iBeg:iFin]>0.,yp[iBeg:iFin]*ratio[iBeg:iFin]/refl[11+im],0.0)) return refl8im,refl[11+im]*refl[9+im] def ComputeFobsSqPink(refl,iref): yp = np.zeros(len(x)) # not masked refl8im = 0 Wd,fmin,fmax = G2pwd.getWidthsTOF(refl[5+im],refl[12+im],refl[13+im],refl[6+im]/100.,refl[7+im]/1.e4) iBeg = max(xB,np.searchsorted(x,refl[5+im]-fmin)) iFin = max(xB,min(np.searchsorted(x,refl[5+im]+fmax),xF)) if not iBeg+iFin:       #peak below low limit - skip peak return 0 if ma.all(xMask[iBeg:iFin]):    #peak entirely masked - skip peak return -1 elif not iBeg-iFin:     #peak above high limit - done return -2 if iBeg < iFin: yp[iBeg:iFin] = refl[11+im]*refl[9+im]*G2pwd.getEpsVoigt( refl[5+im],refl[12+im],refl[13+im],refl[6+im]/1.e4,refl[7+im]/100.,x[iBeg:iFin]) refl8im = np.sum(np.where(ratio[iBeg:iFin]>0.,yp[iBeg:iFin]*ratio[iBeg:iFin]/refl[11+im],0.0)) return refl8im,refl[11+im]*refl[9+im] ################################################################################ # Powder Profile computation return yc def ComputePwdrProfPink(profList): 'Compute the peaks profile for a set of TOF peaks and add into the yc array' for pos,refl,iBeg,iFin in profList: yc[iBeg:iFin] += refl[11+im]*refl[9+im]*G2pwd.getEpsVoigt( pos,refl[12+im],refl[13+im],refl[6+im]/1.e4,refl[7+im]/100.,x[iBeg:iFin])/cw[iBeg:iFin] return yc
• ## trunk/GSASIIpwd.py

 r4519 alpTOF = lambda dsp,alp: alp/dsp betTOF = lambda dsp,bet0,bet1,betq: bet0+bet1/dsp**4+betq/dsp**2 alpPink = lambda pos,alp0,alp1: alp0+alp1*tand(pos/2.) betPink = lambda pos,bet0,bet1: bet0+bet1*tand(pos/2.) if 'T' in Inst['Type'][0]: dsp = pos/Inst['difC'][0] alp = alpTOF(dsp,Inst['alpha'][0]) bet = betTOF(dsp,Inst['beta-0'][0],Inst['beta-1'][0],Inst['beta-q'][0]) dsp = pos/Inst['difC'][1] alp = alpTOF(dsp,Inst['alpha'][1]) bet = betTOF(dsp,Inst['beta-0'][1],Inst['beta-1'][1],Inst['beta-q'][1]) s = sigTOF(dsp,Inst['sig-0'][1],Inst['sig-1'][1],Inst['sig-2'][1],Inst['sig-q'][1]) g = gamTOF(dsp,Inst['X'][1],Inst['Y'][1],Inst['Z'][1]) return getgamFW(g,s)+np.log(2.0)*(alp+bet)/(alp*bet) else: elif 'C' in Inst['Type'][0]: s = sig(pos/2.,Inst['U'][1],Inst['V'][1],Inst['W'][1]) g = gam(pos/2.,Inst['X'][1],Inst['Y'][1],Inst['Z'][1]) return getgamFW(g,s)/100.  #returns FWHM in deg else:   #'B' alp = alpPink(pos,Inst['alpha-0'][1],Inst['alpha-1'][1]) bet = betPink(pos,Inst['beta-0'][1],Inst['beta-1'][1]) s = sig(pos/2.,Inst['U'][1],Inst['V'][1],Inst['W'][1]) g = gam(pos/2.,Inst['X'][1],Inst['Y'][1],Inst['Z'][1]) return getgamFW(g,s)/100.+np.log(2.0)*(alp+bet)/(alp*bet)  #returns FWHM in deg def getgamFW(g,s): ybi = pkI*getFCJVoigt3(pkP,pkS,pkG,0.002,xdata[iBeg:iFin]) yb[iBeg:iFin] += ybi else:   #'T'OF elif 'T' in dataType: ybi = pkI*getEpsVoigt(pkP,1.,1.,pkS,pkG,xdata[iBeg:iFin]) yb[iBeg:iFin] += ybi elif 'B' in dataType: ybi = pkI*getEpsVoigt(pkP,1.,1.,pkS/100.,pkG/1.e4,xdata[iBeg:iFin]) yb[iBeg:iFin] += ybi sumBk[2] += np.sum(ybi) def InstPrint(Inst,sigDict): print ('Instrument Parameters:') if 'C' in Inst['Type'][0]: if 'C' in Inst['Type'][0] or 'B' in Inst['Type'][0]: ptfmt = "%12.6f" else: if 'C' in dataType: ptfmt = {'pos':"%10.5f",'int':"%10.1f",'sig':"%10.3f",'gam':"%10.3f"} else:   #'T' & 'B' elif 'T' in dataType: ptfmt = {'pos':"%10.2f",'int':"%10.4f",'alp':"%8.3f",'bet':"%8.5f",'sig':"%10.3f",'gam':"%10.3f"} else: #'B' ptfmt = {'pos':"%10.5f",'int':"%10.1f",'alp':"%8.2f",'bet':"%8.4f",'sig':"%10.3f",'gam':"%10.3f"} for i,peak in enumerate(Peaks): ptstr =  ':'
• ## trunk/GSASIIpwdGUI.py

 r4519 elif 'T' in Inst['Type'][0]: refs = np.vstack((refList.T[:18+Super],I100,MuStr,CrSize)).T elif 'B' in Inst['Type'][0]: refs = np.vstack((refList.T[:17+Super],I100,MuStr,CrSize)).T rowLabels = [str(i) for i in range(len(refs))] Types = (4+Super)*[wg.GRID_VALUE_LONG,]+4*[wg.GRID_VALUE_FLOAT+':10,4',]+ \ colLabels = ['H','K','L','mul','d','pos','sig','gam','Fosq','Fcsq','phase','Icorr','Prfo','Trans','ExtP','I100','mustrain','Size'] Types += 6*[wg.GRID_VALUE_FLOAT+':10,3',] else: elif 'T' in Inst['Type'][0]: colLabels = ['H','K','L','mul','d','pos','sig','gam','Fosq','Fcsq','phase','Icorr','alp','bet','wave','Prfo','Abs','Ext','I100','mustrain','Size'] Types += 9*[wg.GRID_VALUE_FLOAT+':10,3',] elif 'B' in Inst['Type'][0]: colLabels = ['H','K','L','mul','d','pos','sig','gam','Fosq','Fcsq','phase','Icorr','alp','bet','Prfo','Abs','Ext','I100','mustrain','Size'] Types += 8*[wg.GRID_VALUE_FLOAT+':10,3',] if Super: colLabels.insert(3,'M')
• ## trunk/GSASIIstrIO.py

 r4509 elif 'T' in inst['Type'][0]: dmin = limits[0]/inst['difC'][1] else: wave = inst['Lam'][1] dmin = wave/(2.0*sind(limits[1]/2.0)) pfx = str(pId)+':'+str(hId)+':' if Phases[phase]['General']['doPawley']: hapDict[pfx+'newLeBail'] = True Tmin = G2lat.Dsp2pos(inst,dmin) if 'C' in inst['Type'][1]: if 'T' in inst['Type'][1]: limits[0] = max(limits[0],Tmin) else: limits[1] = min(limits[1],Tmin) else: limits[0] = max(limits[0],Tmin) else: hapDict[pfx+'LeBail'] = hapData.get('LeBail',False) #                                        Uniq.append(uniq) #                                        Phi.append(phi) elif 'B' in inst['Type'][0]: pos = G2lat.Dsp2pos(inst,d) if limits[0] < pos < limits[1]: refList.append([h,k,l,m,mul,d, pos,0.0,0.0,0.0,1., 0.0,0.0,0.0,0.0, 1.0,1.0,1.0]) # ... sig,gam,fotsq,fctsq, phase,icorr,alp,bet, prfo,abs,ext else: ifSuper = False #                                    Uniq.append(uniq) #                                    Phi.append(phi) elif 'B' in inst['Type'][0]: pos = G2lat.Dsp2pos(inst,d) if limits[0] < pos < limits[1]: refList.append([h,k,l,mul,d, pos,0.0,0.0,0.0,1., 0.0,0.0,0.0,0.0, 1.0,1.0,1.0]) # ... sig,gam,fotsq,fctsq, phase,icorr,alp,bet, prfo,abs,ext Histogram['Reflection Lists'][phase] = {'RefList':np.array(refList),'FF':{},'Type':inst['Type'][0],'Super':ifSuper} elif 'HKLF' in histogram: if not instDict[pfx+'beta-0'] and not instDict[pfx+'beta-1']: instDict[pfx+'beta-1'] = 1.0 elif 'B' in dataType:   #trap zero alp, bet coeff. if not instDict[pfx+'alpha-0'] and not instDict[pfx+'alpha-1']: instDict[pfx+'alpha-1'] = 1.0 if not instDict[pfx+'beta-0'] and not instDict[pfx+'beta-1']: instDict[pfx+'beta-1'] = 1.0 return dataType,instDict,insVary Type,instDict,insVary = GetInstParms(hId,Inst[0]) controlDict[pfx+'histType'] = Type if 'XC' in Type: if 'XC' in Type or 'XB' in Type: if pfx+'Lam1' in instDict: controlDict[pfx+'keV'] = 12.397639/instDict[pfx+'Lam1'] pFile.write('\n Histogram: %s histogram Id: %d\n'%(histogram,hId)) pFile.write(135*'='+'\n') Units = {'C':' deg','T':' msec'} Units = {'C':' deg','T':' msec','B':' deg'} units = Units[controlDict[pfx+'histType'][2]] Limits = controlDict[pfx+'Limits'] histDict[pfx+'Lam'] = Inst['Lam'][1] controlDict[pfx+'keV'] = 12.397639/histDict[pfx+'Lam'] elif 'NC' in Inst['Type'][0]: elif 'NC' in Inst['Type'][0] or 'NB' in Inst['Type'][0]: histDict[pfx+'Lam'] = Inst['Lam'][1] return histVary,histDict,controlDict
• ## trunk/GSASIIstrMath.py

 r4519 if not Xdata.size:          #no atoms in phase! return if 'NC' in calcControls[hfx+'histType']: if 'NC' in calcControls[hfx+'histType'] or 'NB' in calcControls[hfx+'histType']: FP,FPP = G2el.BlenResCW(Tdata,BLtables,parmDict[hfx+'Lam']) elif 'X' in calcControls[hfx+'histType']: mSize = len(Mdata) FF = np.zeros(len(Tdata)) if 'NC' in calcControls[hfx+'histType']: if 'NC' in calcControls[hfx+'histType'] or 'NB' in calcControls[hfx+'histType']: FP,FPP = G2el.BlenResCW(Tdata,BLtables,parmDict[hfx+'Lam']) elif 'X' in calcControls[hfx+'histType']: mSize = len(Mdata) FF = np.zeros(len(Tdata)) if 'NC' in calcControls[hfx+'histType']: if 'NC' in calcControls[hfx+'histType'] or 'NB' in calcControls[hfx+'histType']: FP,FPP = G2el.BlenResCW(Tdata,BLtables,parmDict[hfx+'Lam']) elif 'X' in calcControls[hfx+'histType']: FF = np.zeros(len(Tdata)) if 'NC' in calcControls[hfx+'histType']: if 'NC' in calcControls[hfx+'histType'] or 'NB' in calcControls[hfx+'histType']: FP,FPP = G2el.BlenResCW(Tdata,BLtables,parmDict[hfx+'Lam']) elif 'X' in calcControls[hfx+'histType']: modQ = np.array([parmDict[pfx+'mV0'],parmDict[pfx+'mV1'],parmDict[pfx+'mV2']]) FF = np.zeros(len(Tdata)) if 'NC' in calcControls[hfx+'histType']: if 'NC' in calcControls[hfx+'histType'] or 'NB' in calcControls[hfx+'histType']: FP,FPP = G2el.BlenResCW(Tdata,BLtables,parmDict[hfx+'Lam']) elif 'X' in calcControls[hfx+'histType']: modQ = np.array([parmDict[pfx+'mV0'],parmDict[pfx+'mV1'],parmDict[pfx+'mV2']]) FF = np.zeros(len(Tdata)) if 'NC' in calcControls[hfx+'histType']: if 'NC' in calcControls[hfx+'histType'] or 'NB' in calcControls[hfx+'histType']: FP,FPP = G2el.BlenResCW(Tdata,BLtables,parmDict[hfx+'Lam']) elif 'X' in calcControls[hfx+'histType']: modQ = np.array([parmDict[pfx+'mV0'],parmDict[pfx+'mV1'],parmDict[pfx+'mV2']]) FF = np.zeros(len(Tdata)) if 'NC' in calcControls[hfx+'histType']: if 'NC' in calcControls[hfx+'histType'] or 'NB' in calcControls[hfx+'histType']: FP,FPP = G2el.BlenResCW(Tdata,BLtables,parmDict[hfx+'Lam']) elif 'X' in calcControls[hfx+'histType']: def GetSampleSigGam(refl,im,wave,G,GB,SGData,hfx,phfx,calcControls,parmDict): 'Needs a doc string' if 'C' in calcControls[hfx+'histType']:     #All checked & OK if 'C' in calcControls[hfx+'histType'] or 'B' in calcControls[hfx+'histType']:     #All checked & OK costh = cosd(refl[5+im]/2.) #crystallite size gamDict = {} sigDict = {} if 'C' in calcControls[hfx+'histType']:         #All checked & OK if 'C' in calcControls[hfx+'histType'] or 'B' in calcControls[hfx+'histType']:         #All checked & OK costh = cosd(refl[5+im]/2.) tanth = tand(refl[5+im]/2.) d = 1./np.sqrt(G2lat.calc_rDsq(np.array([h,k,l]),A)) refl[4+im] = d if 'C' in calcControls[hfx+'histType']: if 'C' in calcControls[hfx+'histType'] or 'B' in calcControls[hfx+'histType']: pos = 2.0*asind(wave/(2.0*d))+parmDict[hfx+'Zero'] const = 9.e-2/(np.pi*parmDict[hfx+'Gonio. radius'])                  #shifts in microns dst = np.sqrt(dstsq) dsp = 1./dst if 'C' in calcControls[hfx+'histType']: if 'C' in calcControls[hfx+'histType'] or 'B' in calcControls[hfx+'histType']: pos = refl[5+im]-parmDict[hfx+'Zero'] const = dpr/np.sqrt(1.0-wave**2*dstsq/4.0) Dij = parmDict[phfx+'D11']*h**2+parmDict[phfx+'D22']*k**2+parmDict[phfx+'D33']*l**2+ \ parmDict[phfx+'D12']*h*k+parmDict[phfx+'D13']*h*l+parmDict[phfx+'D23']*k*l if 'C' in calcControls[hfx+'histType']: if 'C' in calcControls[hfx+'histType'] or 'B' in calcControls[hfx+'histType']: return -180.*Dij*refl[4+im]**2*tand(refl[5+im]/2.0)/np.pi else: dDijDict = {phfx+'D11':h**2,phfx+'D22':k**2,phfx+'D33':l**2, phfx+'D12':h*k,phfx+'D13':h*l,phfx+'D23':k*l} if 'C' in calcControls[hfx+'histType']: if 'C' in calcControls[hfx+'histType'] or 'B' in calcControls[hfx+'histType']: for item in dDijDict: dDijDict[item] *= 180.0*refl[4+im]**2*tand(refl[5+im]/2.0)/np.pi if parmDict[phfx+'LeBail']: refDict['RefList'][irefl][9+im] = refDict['RefList'][irefl][8+im] elif 'B' in calcControls[hfx+'histType']: for iref,refl in enumerate(refDict['RefList']): if useMP: profArgs[iref%G2mp.ncores].append((refl,iref)) else: icod= G2mp.ComputeFobsSqPink(refl,iref) if type(icod) is tuple: refl[8+im] = icod[0] sumInt += icod[1] if parmDict[phfx+'LeBail']: refl[9+im] = refl[8+im] elif icod == -1: refl[3+im] *= -1 nExcl += 1 elif icod == -2: break if useMP: for sInt,resList in MPpool.imap_unordered(G2mp.ComputeFobsSqPinkbatch,profArgs): sumInt += sInt for refl8im,irefl in resList: if refl8im is None: refDict['RefList'][irefl][3+im] *= -1 nExcl += 1 else: refDict['RefList'][irefl][8+im] = refl8im if parmDict[phfx+'LeBail']: refDict['RefList'][irefl][9+im] = refDict['RefList'][irefl][8+im] if useMP: MPpool.terminate() sumFo = 0.0 return alp,bet def GetPinkReflAlpBet(refl,im,hfx,parmDict): tanPos = tand(refl[5+im]/2.0) alp = parmDict[hfx+'alpha-0']+parmDict[hfx+'alpha-0']*tanPos bet = parmDict[hfx+'beta-0']+parmDict[hfx+'beta-1']*tanPos return alp,bet hId = Histogram['hId'] hfx = ':%d:'%(hId) kRatio = parmDict[hfx+'I(L2)/I(L1)'] else: wave = parmDict[hfx+'Lam'] elif 'B' in calcControls[hfx+'histType']: wave = parmDict[hfx+'Lam'] else: else: yc[iBeg:iFin] += refl[11+im]*refl[9+im]*kRatio*G2pwd.getFCJVoigt3(pos2,refl[6+im],refl[7+im],shl,ma.getdata(x[iBeg:iFin]))        #and here elif 'B' in calcControls[hfx+'histType']: for iref,refl in enumerate(refDict['RefList']): if im: h,k,l,m = refl[:4] else: h,k,l = refl[:3] Uniq = np.inner(refl[:3],SGMT) refl[5+im] = GetReflPos(refl,im,wave,A,pfx,hfx,phfx,calcControls,parmDict)         #corrected reflection position Lorenz = 1./(2.*sind(refl[5+im]/2.)**2*cosd(refl[5+im]/2.))           #Lorentz correction refl[6+im:8+im] = GetReflSigGamCW(refl,im,wave,G,GB,phfx,calcControls,parmDict)    #peak sig & gam refl[12+im:14+im] = GetPinkReflAlpBet(refl,im,hfx,parmDict)             #TODO - skip if alp, bet tabulated? refl[11+im],refl[14+im],refl[15+im],refl[16+im] = GetIntensityCorr(refl,im,Uniq,G,g,pfx,phfx,hfx,SGData,calcControls,parmDict) refl[11+im] *= Vst*Lorenz if Phase['General'].get('doPawley'): try: if im: pInd = pfx+'PWLref:%d'%(pawleyLookup[pfx+'%d,%d,%d,%d'%(h,k,l,m)]) else: pInd = pfx+'PWLref:%d'%(pawleyLookup[pfx+'%d,%d,%d'%(h,k,l)]) refl[9+im] = parmDict[pInd] except KeyError: #                        print ' ***Error %d,%d,%d missing from Pawley reflection list ***'%(h,k,l) continue Wd,fmin,fmax = G2pwd.getWidthsTOF(refl[5+im],refl[12+im],refl[13+im],refl[6+im]/100.,refl[7+im]/1.e4) iBeg = np.searchsorted(x,refl[5+im]-fmin) iFin = np.searchsorted(x,refl[5+im]+fmax) if not iBeg+iFin:       #peak below low limit - skip peak continue elif not iBeg-iFin:     #peak above high limit - done break elif iBeg > iFin:   #bad peak coeff - skip badPeak = True continue if useMP: profArgs[iref%ncores].append((refl[5+im],refl,iBeg,iFin,1.)) else: yc[iBeg:iFin] += refl[11+im]*refl[9+im]*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])) elif 'T' in calcControls[hfx+'histType']: for iref,refl in enumerate(refDict['RefList']): yc += y MPpool.terminate() elif useMP: elif useMP and 'T' in calcControls[hfx+'histType']: for y in MPpool.imap_unordered(G2mp.ComputePwdrProfTOF,profArgs): yc += y MPpool.terminate() elif useMP and 'B' in calcControls[hfx+'histType']: for y in MPpool.imap_unordered(G2mp.ComputePwdrProfPink,profArgs): yc += y MPpool.terminate() else: wave = parmDict[hfx+'Lam'] elif 'B' in calcControls[hfx+'histType']: wave = parmDict[hfx+'Lam'] for phase in Histogram['Reflection Lists']: refDict = Histogram['Reflection Lists'][phase] if 'C' in calcControls[hfx+'histType']:        #CW powder Wd,fmin,fmax = G2pwd.getWidthsCW(refl[5+im],refl[6+im],refl[7+im],shl) else: #'T'OF elif 'T' in calcControls[hfx+'histType']: Wd,fmin,fmax = G2pwd.getWidthsTOF(refl[5+im],refl[12+im],refl[13+im],refl[6+im],refl[7+im]) elif 'B' in calcControls[hfx+'histType']: Wd,fmin,fmax = G2pwd.getWidthsTOF(refl[5+im],refl[12+im]/100.,refl[13+im]/1.e4,refl[6+im],refl[7+im]) iBeg = np.searchsorted(x,refl[5+im]-fmin) iFin = np.searchsorted(x,refl[5+im]+fmax) dMdpk2[5] = 100.*cw[iBeg2:iFin2]*refl[11+im]*dMdipk2[0] dervDict2 = {'int':dMdpk2[0],'pos':dMdpk2[1],'sig':dMdpk2[2],'gam':dMdpk2[3],'shl':dMdpk2[4],'L1/L2':dMdpk2[5]*refl[9]} else:   #'T'OF elif 'T' in calcControls[hfx+'histType']: lenBF = iFin-iBeg if lenBF < 0:   #bad peak coeff for i in range(6): dMdpk[i] += refl[11+im]*refl[9+im]*dMdipk[i]      #cw[iBeg:iFin]* dervDict = {'int':dMdpk[0],'pos':dMdpk[1],'alp':dMdpk[2],'bet':dMdpk[3],'sig':dMdpk[4],'gam':dMdpk[5]} elif 'B' in calcControls[hfx+'histType']: tanth = tand(pos/2.0) costh = cosd(pos/2.0) lenBF = iFin-iBeg if lenBF < 0:   #bad peak coeff break dMdpk = np.zeros(shape=(6,lenBF)) dMdipk = G2pwd.getdEpsVoigt(refl[5+im],refl[12+im],refl[13+im],refl[6+im]/100.,refl[7+im]/1.e4,ma.getdata(x[iBeg:iFin])) for i in range(6): dMdpk[i] += refl[11+im]*refl[9+im]*dMdipk[i] dervDict = {'int':dMdpk[0],'pos':dMdpk[1],'alp':dMdpk[2],'bet':dMdpk[3],'sig':dMdpk[4],'gam':dMdpk[5]} if Phase['General'].get('doPawley'): else: names.update({hfx+'Absorption':[dFdAb,'int'],}) else:   #'T'OF elif 'T' in calcControls[hfx+'histType']:   #'T'OF dpdA,dpdZ,dpdDC,dpdDA,dpdDB,dpdV = GetReflPosDerv(refl,im,0.0,A,pfx,hfx,phfx,calcControls,parmDict) names = {hfx+'Scale':[dIdsh,'int'],phfx+'Scale':[dIdsp,'int'], hfx+'beta-q':[1./refl[4+im]**2,'bet'],hfx+'sig-0':[1.0,'sig'],hfx+'sig-1':[refl[4+im]**2,'sig'], hfx+'sig-2':[refl[4+im]**4,'sig'],hfx+'sig-q':[refl[4+im],'sig'], hfx+'Absorption':[dFdAb,'int'],phfx+'Extinction':[dFdEx,'int'],} elif 'B' in calcControls[hfx+'histType']:   #'T'OF dpdA,dpdw,dpdZ,dpdSh,dpdTr,dpdX,dpdY,dpdV = GetReflPosDerv(refl,im,0.0,A,pfx,hfx,phfx,calcControls,parmDict) names = {hfx+'Scale':[dIdsh,'int'],phfx+'Scale':[dIdsp,'int'],hfx+'Lam':[dpdw,'pos'], hfx+'Zero':[dpdZ,'pos'],hfx+'X':[1.0/costh,'gam'],hfx+'Y':[tanth,'gam'],hfx+'Z':[1.0,'gam'], hfx+'U':[tanth**2,'sig'],hfx+'V':[tanth,'sig'],hfx+'W':[1.0,'sig'],hfx+'Polariz.':[dIdpola,'int'], hfx+'alpha-0':[1.0,'alp'],hfx+'alpha-1':[tanth,'alp'],hfx+'beta-0':[1.0,'bet'],hfx+'beta-1':[tanth,'bet'], hfx+'Absorption':[dFdAb,'int'],phfx+'Extinction':[dFdEx,'int'],} for name in names: if Ka2 and iFin2-iBeg2: depDerivDict[name][iBeg2:iFin2] += dpdV[i]*dervDict2['pos'] if 'C' in calcControls[hfx+'histType']: if 'C' in calcControls[hfx+'histType'] or 'B' in calcControls[hfx+'histType']: sigDict,gamDict = GetSampleSigGamDerv(refl,im,wave,G,GB,SGData,hfx,phfx,calcControls,parmDict) else:   #'T'OF
Note: See TracChangeset for help on using the changeset viewer.