Changeset 2630
- Timestamp:
- Jan 14, 2017 9:00:40 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIimage.py
r2627 r2630 23 23 import polymask as pm 24 24 from scipy.optimize import leastsq 25 import scipy.signal as scsg26 25 import copy 27 26 import GSASIIpath … … 31 30 import GSASIIpwd as G2pwd 32 31 import GSASIIspc as G2spc 33 import GSASIImath as G2mth34 32 35 33 # trig functions in degrees … … 887 885 nXBlks = (Nx-1)/blkSize+1 888 886 nYBlks = (Ny-1)/blkSize+1 889 Nup = nXBlks*nYBlks*3+3890 887 tbeg = time.time() 891 Nup = 0892 888 times = [0,0,0,0,0] 893 889 for iBlk in range(nYBlks): … … 899 895 # next is most expensive step! 900 896 TA,tam = Make2ThetaAzimuthMap(data,masks,(iBeg,iFin),(jBeg,jFin),times) #2-theta & azimuth arrays & create position mask 901 Nup += 1902 897 Block = image[iBeg:iFin,jBeg:jFin] 903 898 t0 = time.time() … … 905 900 del TA; del tam 906 901 times[2] += time.time()-t0 907 Nup += 1908 902 tax = np.where(tax > LRazm[1],tax-360.,tax) #put azm inside limits if possible 909 903 tax = np.where(tax < LRazm[0],tax+360.,tax) … … 924 918 numAzms,numChans,LRazm,lutth,Dazm,dtth,NST,H0) 925 919 times[3] += time.time()-t0 926 Nup += 1927 920 del tax; del tay; del taz; del tad; del tabs 928 921 t0 = time.time() … … 947 940 #NB: in G2pwd.Polarization azm is defined from plane of polarization, not image x axis! 948 941 H0 /= np.array([G2pwd.Polarization(data['PolaVal'][0],H2[:-1],Azm=azm-90.)[0] for azm in (H1[:-1]+np.diff(H1)/2.)]) 949 Nup += 1950 942 times[4] += time.time()-t0 951 943 print 'Step times: \n apply masks %8.3fs xy->th,azm %8.3fs fill map %8.3fs \ … … 1148 1140 #should be able to filter out spotty Bragg rings here 1149 1141 PeaksList = np.array(PeaksList) 1150 # Peakarray = np.vstack((tth,peaks.T)).T1151 # Peakarray = np.array(G2mth.sortArray(Peakarray,0)) #now in 2theta1152 # if peaks.shape[0] > 100:1153 # txt = 'More than 100 spots found: %d. Are rings spotty?'%(len(jndx))1154 # return txt1155 1142 Points = np.ones((PeaksList.shape[0],3)) 1156 # Points[:,:2] = Peakarray[:,1:]1157 1143 Points[:,:2] = PeaksList 1158 1144 Masks['Points'] = list(Points) -
trunk/GSASIIimgGUI.py
r2627 r2630 2393 2393 mnsizer.Add(lblsizr,0,wx.ALIGN_CENTER,1) 2394 2394 2395 #put automatic PDF controls here? 2395 2396 # buttons on bottom 2396 2397 mnsizer.Add(wx.StaticText(mnpnl, wx.ID_ANY,'AutoIntegration controls'),0,wx.TOP,5) … … 2409 2410 sizer.Add((20,-1)) 2410 2411 mnsizer.Add(sizer,0,wx.EXPAND|wx.BOTTOM|wx.TOP,5) 2411 2412 '''or put automatic PDF controls here? 2413 Auto PDF check box - if True: 2414 chemical formula needed - or maybe fake it? 2415 2416 ''' 2412 2417 # finish up window 2413 2418 mnpnl.SetSizer(mnsizer) … … 2522 2527 if sys.platform != "win32": 2523 2528 for item in (self.btnstart,self.btnreset,self.btnclose): item.Enable(flag) 2524 if flag: 2525 self.btnstart.SetLabel('Pause') 2526 else: 2527 self.btnstart.SetLabel('(running)') 2529 self.btnstart.SetLabel('Pause') 2528 2530 wx.Yield() 2529 2531 -
trunk/GSASIIpwd.py
r2614 r2630 341 341 maxQ = np.searchsorted(Qpoints,qLimits[1]) 342 342 newdata = [] 343 xydata['IofQ'] = [IofQ[0],[Qpoints,Qdata],IofQ[2]] 343 if len(IofQ) < 3: 344 xydata['IofQ'] = [IofQ[0],[Qpoints,Qdata],''] 345 else: 346 xydata['IofQ'] = [IofQ[0],[Qpoints,Qdata],IofQ[2]] 344 347 for item in xydata['IofQ'][1]: 345 348 newdata.append(item[:maxQ])
Note: See TracChangeset
for help on using the changeset viewer.