Changeset 1902
 Timestamp:
 Jun 22, 2015 11:42:30 AM (8 years ago)
 Location:
 trunk
 Files:

 4 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASII.py
r1875 r1902 3087 3087 for peak in peaks: 3088 3088 if len(peak) == 8: #CW 3089 FWHM = G2pwd.getgamFW(peak[6],peak[4])3089 FWHM = 2.*G2pwd.getgamFW(peak[6],peak[4]) #to get delta2theta in deg. from Gam(peak) 3090 3090 file.write("%10.5f %12.2f %10.5f %10.5f %10.5f \n" % \ 3091 3091 (peak[0],peak[2],np.sqrt(max(0.0001,peak[4]))/100.,peak[6]/100.,FWHM/100.)) #convert to deg 3092 3092 else: #TOF  more cols 3093 FWHM = G2pwd.getgamFW(peak[10],peak[8])3093 FWHM = 2.*G2pwd.getgamFW(peak[10],peak[8]) #to get deltaTOF from Gam(peak) 3094 3094 file.write("%10.5f %12.2f %10.3f %10.3f %10.3f %10.3f %10.3f\n" % \ 3095 (peak[0],peak[2], peak[4],peak[6],peak[8],peak[10],FWHM))3095 (peak[0],peak[2],np.sqrt(max(0.0001,peak[4])),peak[6],peak[8],peak[10],FWHM)) 3096 3096 item2, cookie2 = self.PatternTree.GetNextChild(item, cookie2) 3097 3097 item, cookie = self.PatternTree.GetNextChild(self.root, cookie) … … 3126 3126 file.write('%s \n'%(' h k l m dspace 2theta wid F**2')) 3127 3127 for peak in peaks['RefList']: 3128 FWHM = G2pwd.getgamFW(peak[7],peak[6])/50. #to get delta2theta in deg.3128 FWHM = 2.*G2pwd.getgamFW(peak[7],peak[6]) 3129 3129 if 'T' in peaks.get('Type','PXC'): 3130 3130 file.write(" %3d %3d %3d %3d %10.5f %10.2f %10.5f %10.3f \n" % \ … … 3132 3132 else: 3133 3133 file.write(" %3d %3d %3d %3d %10.5f %10.5f %10.5f %10.3f \n" % \ 3134 (int(peak[0]),int(peak[1]),int(peak[2]),int(peak[3]),peak[4],peak[5],FWHM ,peak[8]))3134 (int(peak[0]),int(peak[1]),int(peak[2]),int(peak[3]),peak[4],peak[5],FWHM/100.,peak[8])) 3135 3135 item2, cookie2 = self.PatternTree.GetNextChild(item, cookie2) 3136 3136 item, cookie = self.PatternTree.GetNextChild(self.root, cookie) 
trunk/GSASIIddataGUI.py
r1894 r1902 864 864 valSizer = wx.BoxSizer(wx.HORIZONTAL) 865 865 valSizer.Add(wx.StaticText(DData,1,label=' Twin element fraction:'),0,WACV) 866 twinval = wx.TextCtrl(DData,1,'%.3f'%(TwVal),style=wx.TE_PROCESS_ENTER) 867 Indx[twinval.GetId()] = it 868 twinval.Bind(wx.EVT_TEXT_ENTER,OnTwinVal) 869 twinval.Bind(wx.EVT_KILL_FOCUS,OnTwinVal) 870 if not it: 866 twinval = wx.TextCtrl(DData,1,'%.3f'%(TwVal),style=Style) 867 if it: 868 Indx[twinval.GetId()] = it 869 twinval.Bind(wx.EVT_TEXT_ENTER,OnTwinVal) 870 twinval.Bind(wx.EVT_KILL_FOCUS,OnTwinVal) 871 else: 871 872 twinval.SetBackgroundColour(VERY_LIGHT_GREY) 872 873 valSizer.Add(twinval,0,WACV) 
trunk/GSASIIstrMath.py
r1897 r1902 1027 1027 dFdua[iref] = 2.*SA*(dfadua[0]+dfbdua[1])+2.*SB*(dfbdua[0]+dfadua[1]) 1028 1028 dFdfl[iref] = SA*dfadflSB*dfbdfl 1029 dFdbab[iref] = 2.*fas[0]*np.array([np.sum(dfadba*dBabdA),np.sum(dfadba*parmDict[phfx+'BabA']*SQfactor*dBabdA)]).T+ \1030 2.*fbs[0]*np.array([np.sum(dfbdba*dBabdA),np.sum(dfbdba*parmDict[phfx+'BabA']*SQfactor*dBabdA)]).T1029 dFdbab[iref] = 2.*fas[0]*np.array([np.sum(dfadba*dBabdA),np.sum(dfadba*parmDict[phfx+'BabA']*SQfactor*dBabdA)]).T+ \ 1030 2.*fbs[0]*np.array([np.sum(dfbdba*dBabdA),np.sum(dfbdba*parmDict[phfx+'BabA']*SQfactor*dBabdA)]).T 1031 1031 1032 1032 #loop over atoms  each dict entry is list of derivatives for all the reflections 
trunk/exports/G2export_examples.py
r1836 r1902 209 209 if 'T' in phasDict['Type']: 210 210 h,k,l,m,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,x,x,x,x,prfo = refItem[:17] 211 FWHM = G2pwd.getgamFW(gam,sig)211 FWHM = 2.*G2pwd.getgamFW(gam,sig) 212 212 self.Write(fmt.format(hklfmt.format(h,k,l,m),pos,Fobs,Fcalc,phase,mult,sig,gam,FWHM,prfo)) 213 213 else: 214 214 h,k,l,m,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,x,prfo = refItem[:14] 215 FWHM = G2pwd.getgamFW(gam,sig)215 FWHM = 2.*G2pwd.getgamFW(gam,sig) 216 216 self.Write(fmt.format(hklfmt.format(h,k,l,m),pos,Fobs,Fcalc,phase,mult, \ 217 217 np.sqrt(max(sig,0.0001))/100.,gam/100.,FWHM/100.,prfo)) … … 230 230 if 'T' in phasDict['Type']: 231 231 h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,x,x,x,x,prfo = refItem[:16] 232 FWHM = G2pwd.getgamFW(gam,sig)233 self.Write(fmt.format(hklfmt.format(h,k,l),pos,Fobs,Fcalc,phase,mult, sig,gam,FWHM,prfo))232 FWHM = 2.*G2pwd.getgamFW(gam,sig) 233 self.Write(fmt.format(hklfmt.format(h,k,l),pos,Fobs,Fcalc,phase,mult,np.sqrt(max(sig,0.0001)),gam,FWHM,prfo)) 234 234 else: 235 235 h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,x,prfo = refItem[:13] 236 FWHM = G2pwd.getgamFW(gam,sig)236 FWHM = 2.*G2pwd.getgamFW(gam,sig) 237 237 self.Write(fmt.format(hklfmt.format(h,k,l),pos,Fobs,Fcalc,phase,mult, \ 238 238 np.sqrt(max(sig,0.0001))/100.,gam/100.,FWHM/100.,prfo))
Note: See TracChangeset
for help on using the changeset viewer.