Changeset 529
- Timestamp:
- Apr 4, 2012 1:18:25 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIElemGUI.py
r528 r529 43 43 El = wscs.ColourSelect(label=name[0], parent=self,colour=color, 44 44 pos=pos, size=wx.Size(self.butWid,23), style=wx.RAISED_BORDER) 45 # El.SetLabel(name)46 45 El.Bind(wx.EVT_BUTTON, self.OnElButton) 47 46 else: -
trunk/GSASIIphsGUI.py
r527 r529 3441 3441 print 'Fourier map time: %.4f'%(time.time()-time0),'no. elements: %d'%(Fhkl.size) 3442 3442 mapData['rho'] = np.real(rho) 3443 mapData['rhoMax'] = np.max(np.real(rho))3443 mapData['rhoMax'] = max(np.max(mapData['rho']),-np.min(mapData['rho'])) 3444 3444 data['Drawing']['contourLevel'] = 1. 3445 3445 data['Drawing']['mapSize'] = 10. 3446 print mapData['MapType']+' computed: rhomax = %.3f rhomin = %.3f'%( mapData['rhoMax'],np.min(np.real(rho)))3446 print mapData['MapType']+' computed: rhomax = %.3f rhomin = %.3f'%(np.max(mapData['rho']),np.min(mapData['rho'])) 3447 3447 G2plt.PlotStructure(G2frame,data) 3448 3448 ## map printing for testing purposes -
trunk/GSASIIplot.py
r526 r529 518 518 if G2frame.PatternTree.GetItemText(PickId) in ['Peak List','Limits'] and xpos: 519 519 lines = [] 520 for line in G2frame.Lines: lines.append(line.get_xdata()[0]) 520 for line in G2frame.Lines: 521 lines.append(line.get_xdata()[0]) 522 # print G2frame.itemPicked.get_xdata() 521 523 lineNo = lines.index(G2frame.itemPicked.get_xdata()[0]) 522 524 if lineNo in [0,1]: -
trunk/GSASIIstruct.py
r519 r529 2306 2306 kRatio = parmDict[hfx+'I(L2)/I(L1)'] 2307 2307 x,y,w,yc,yb,yd = Histogram['Data'] 2308 xB = np.searchsorted(x,Limits[0]) 2309 xF = np.searchsorted(x,Limits[1]) 2308 2310 ymb = np.array(y-yb) 2309 2311 ycmb = np.array(yc-yb) 2310 2312 ratio = np.where(ycmb!=0.,ymb/ycmb,0.0) 2311 xB = np.searchsorted(x,Limits[0])2312 xF = np.searchsorted(x,Limits[1])2313 2313 refLists = Histogram['Reflection Lists'] 2314 2314 for phase in refLists: … … 2325 2325 yp = np.zeros_like(yb) 2326 2326 Wd,fmin,fmax = G2pwd.getWidths(refl[5],refl[6],refl[7],shl) 2327 iBeg = np.searchsorted(x[xB:xF],refl[5]-fmin)2328 iFin = np.searchsorted(x[xB:xF],refl[5]+fmax)2327 iBeg = max(xB,np.searchsorted(x,refl[5]-fmin)) 2328 iFin = min(np.searchsorted(x,refl[5]+fmax),xF) 2329 2329 iFin2 = iFin 2330 yp[iBeg:iFin] = refl[13]*refl[9]*G2pwd.getFCJVoigt3(refl[5],refl[6],refl[7],shl,x[iBeg:iFin]) #>90% of time spent here 2330 yp[iBeg:iFin] = refl[13]*refl[9]*G2pwd.getFCJVoigt3(refl[5],refl[6],refl[7],shl,x[iBeg:iFin]) #>90% of time spent here 2331 2331 if Ka2: 2332 2332 pos2 = refl[5]+lamRatio*tand(refl[5]/2.0) # + 360/pi * Dlam/lam * tan(th) 2333 2333 Wd,fmin,fmax = G2pwd.getWidths(pos2,refl[6],refl[7],shl) 2334 iBeg2 = np.searchsorted(x,pos2-fmin)2335 iFin2 = np.searchsorted(x,pos2+fmax)2334 iBeg2 = max(xB,np.searchsorted(x[xB:xF],pos2-fmin)) 2335 iFin2 = min(np.searchsorted(x[xB:xF],pos2+fmax),xF) 2336 2336 yp[iBeg2:iFin2] += refl[13]*refl[9]*kRatio*G2pwd.getFCJVoigt3(pos2,refl[6],refl[7],shl,x[iBeg2:iFin2]) #and here 2337 2337 refl[8] = np.sum(np.where(ratio[iBeg:iFin2]>0.,yp[iBeg:iFin2]*ratio[iBeg:iFin2]/(refl[13]*(1.+kRatio)),0.0))
Note: See TracChangeset
for help on using the changeset viewer.