Changeset 3175
 Timestamp:
 Dec 6, 2017 9:19:46 AM (4 years ago)
 Location:
 trunk
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIplot.py
r3156 r3175 71 71 npatand = lambda x: 180.*np.arctan(x)/np.pi 72 72 npatan2d = lambda x,y: 180.*np.arctan2(x,y)/np.pi 73 sq8ln2 = np.sqrt(8.0*np.log(2.0)) 73 74 if '2' in platform.python_version_tuple()[0]: 74 75 GkDelta = unichr(0x0394) 75 76 Gkrho = unichr(0x03C1) 76 77 super2 = unichr(0xb2) 78 Angstr = unichr(0x00c5) 79 Pwrm1 = unichr(0x207b)+unichr(0x0b9) 77 80 else: 78 81 GkDelta = chr(0x0394) 79 82 Gkrho = chr(0x03C1) 80 83 super2 = chr(0xb2) 84 Angstr = chr(0x00c5) 85 Pwrm1 = chr(0x207b)+chr(0x0b9) 81 86 nxs = np.newaxis 82 87 # GSASIIpath.IPyBreak() … … 3417 3422 # gamFW = lambda s,g: np.exp(np.log(s**5+2.69269*s**4*g+2.42843*s**3*g**2+4.47163*s**2*g**3+0.07842*s*g**4+g**5)/5.) 3418 3423 # gamFW2 = lambda s,g: math.sqrt(s**2+(0.4654996*g)**2)+.5345004*g #Ubaldo Bafile  private communication 3424 def OnMotion(event): 3425 xpos = event.xdata 3426 if xpos: #avoid out of frame mouse position 3427 ypos = event.ydata 3428 G2frame.G2plotNB.status.SetStatusText('q =%.3f%s %sq/q =%.4f'%(xpos,Angstr+Pwrm1,GkDelta,ypos),1) 3429 3419 3430 if PatternName: 3420 3431 G2frame.PatternId = G2gd.GetGPXtreeItemId(G2frame, G2frame.root, PatternName) … … 3445 3456 xylim = [] 3446 3457 new,plotNum,Page,Plot,lim = G2frame.G2plotNB.FindPlotTab('Peak Widths','mpl') 3458 Page.canvas.mpl_connect('motion_notify_event', OnMotion) 3447 3459 if not new: 3448 3460 if not G2frame.G2plotNB.allowZoomReset: # save previous limits … … 3472 3484 s = np.sqrt(data[4])*np.pi/18000. #var > sig(radians) 3473 3485 g = data[6]*np.pi/18000. #centideg > radians 3474 G = G2pwd.getgamFW(g,s) /2. #delttheta3475 Y = s /nptand(X/2.)3486 G = G2pwd.getgamFW(g,s) #/2. #delttheta from TCH fxn 3487 Y = sq8ln2*s/nptand(X/2.) 3476 3488 Z = g/nptand(X/2.) 3477 3489 W = G/nptand(X/2.) … … 3483 3495 sf = np.sqrt(fit[4])*np.pi/18000. 3484 3496 gf = fit[6]*np.pi/18000. 3485 Gf = G2pwd.getgamFW(gf,sf) /2.3486 Yf = s f/nptand(X/2.)3497 Gf = G2pwd.getgamFW(gf,sf) #/2. 3498 Yf = sq8ln2*sf/nptand(X/2.) 3487 3499 Zf = gf/nptand(X/2.) 3488 3500 Wf = Gf/nptand(X/2.) … … 3502 3514 s = 0.01 3503 3515 g = peak[6]*math.pi/18000. 3504 G = G2pwd.getgamFW(g,s) /2.3505 Y.append(s /tand(peak[0]/2.))3516 G = G2pwd.getgamFW(g,s) #/2. 3517 Y.append(sq8ln2*s/tand(peak[0]/2.)) 3506 3518 Z.append(g/tand(peak[0]/2.)) 3507 3519 W.append(G/tand(peak[0]/2.)) 
trunk/GSASIIpwdGUI.py
r3173 r3175 1678 1678 updateData(insVal,insRef) 1679 1679 1680 def NewProfile(invalid,value,tc): 1681 if invalid: return 1682 updateData(insVal,insRef) 1683 G2plt.PlotPeakWidths(G2frame) 1684 1680 1685 def OnItemRef(event): 1681 1686 Obj = event.GetEventObject() … … 1804 1809 refFlgElem.append([item,2]) 1805 1810 instSizer.Add(wx.StaticText(G2frame.dataWindow,1,lblWdef(item,nDig[1],insDef[item])),0,WACV) 1806 itemVal = G2G.ValidatedTxtCtrl(G2frame.dataWindow,insVal,item,nDig=nDig,typeHint=float,OnLeave= AfterChange)1811 itemVal = G2G.ValidatedTxtCtrl(G2frame.dataWindow,insVal,item,nDig=nDig,typeHint=float,OnLeave=NewProfile) 1807 1812 instSizer.Add(itemVal,0,WACV) 1808 1813 instSizer.Add(RefineBox(item),0,WACV)
Note: See TracChangeset
for help on using the changeset viewer.