Changeset 1339
- Timestamp:
- May 9, 2014 2:56:31 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASII.py
r1334 r1339 1903 1903 self.Contour = False 1904 1904 self.Legend = False 1905 self.SinglePlot = False1905 self.SinglePlot = True 1906 1906 self.SubBack = False 1907 1907 self.seqReverse = False … … 3219 3219 Id = item 3220 3220 item, cookie = self.PatternTree.GetNextChild(self.root, cookie) 3221 if Id: 3222 self.PatternTree.SelectItem(Id) 3221 3223 if parentName: 3222 3224 parentId = G2gd.GetPatternTreeItemId(self, self.root, parentName) … … 3226 3228 itemId = G2gd.GetPatternTreeItemId(self, self.root, oldName) 3227 3229 self.PatternTree.SelectItem(itemId) 3228 elif Id:3229 self.PatternTree.SelectItem(Id)3230 3230 finally: 3231 3231 dlg.Destroy() -
trunk/GSASIIplot.py
r1334 r1339 444 444 newPlot = False 445 445 if event.key == 'w' and 'PWDR' in plottype: 446 G2frame. ErrorBars = not G2frame.ErrorBars446 G2frame.Weight = not G2frame.Weight 447 447 if not G2frame.Weight: 448 448 G2frame.SinglePlot = True … … 928 928 X += G2frame.Offset[1]*.005*N 929 929 Xum = ma.getdata(X) 930 930 931 if ifpicked: 931 932 Z = xye[3]+offset*N 932 if 'PWDR' in plottype: #powder background933 if 'PWDR' in plottype: 933 934 W = xye[4]+offset*N 934 D = xye[5]-Ymax*G2frame.delOffset 935 D = xye[5]-Ymax*G2frame.delOffset #powder background 935 936 elif 'SASD' in plottype: 936 937 if G2frame.sqPlot: … … 947 948 ZB = Z+B 948 949 Plot.set_yscale("log",nonposy='mask') 949 Plot.set_ylim(bottom=np.min(np.trim_zeros(Y ))/2.,top=np.max(Y)*2.)950 Plot.set_ylim(bottom=np.min(np.trim_zeros(YB))/2.,top=np.max(Y)*2.) 950 951 if G2frame.logPlot: 951 952 if 'PWDR' in plottype: … … 1008 1009 Page.canvas.SetToolTipString(tip) 1009 1010 data = G2frame.LimitsTable.GetData() 1010 else: 1011 1012 else: #not picked 1011 1013 if G2frame.logPlot: 1012 1014 if 'PWDR' in plottype: … … 1020 1022 Plot.loglog(X,Y,colors[N%6],picker=False,nonposy='mask') 1021 1023 Plot.set_ylim(bottom=np.min(np.trim_zeros(Y))/2.,top=np.max(Y)*2.) 1022 if G2frame.logPlot: 1024 1025 if G2frame.logPlot and 'PWDR' in plottype: 1023 1026 Plot.set_ylim(bottom=np.min(np.trim_zeros(Y))/2.,top=np.max(Y)*2.) 1024 1027 if PickId and not G2frame.Contour: -
trunk/GSASIIpwdGUI.py
r1337 r1339 84 84 'Thick':1.0,'Contrast':[0.0,0.0], #contrast & anomalous contrast 85 85 'Trans':1.0, #measured transmission 86 'SlitLen':0.0, #Slit length - units?86 'SlitLen':0.0, #Slit length - in Q(A-1) 87 87 } 88 88 def SetupSampleLabels(histName,dataType): … … 108 108 parms.append(['Thick','Sample thickness (mm)',[10,3]]) 109 109 parms.append(['Trans','Transmission (meas)',[10,3]]) 110 parms.append(['SlitLen', 'Slit length',[10,3]])110 parms.append(['SlitLen',u'Slit length (Q,\xc5'+Pwrm1+')',[10,3]]) 111 111 parms.append(['Omega','Goniometer omega:',[10,3]]) 112 112 parms.append(['Chi','Goniometer chi:',[10,3]]) -
trunk/GSASIIsasd.py
r1337 r1339 1001 1001 return (G*P/Rg**P)*np.exp(scsp.gammaln(P/2)) 1002 1002 1003 def SmearData(Ic,Q,slitLength): 1004 return Ic #for now 1003 def SmearData(Ic,Q,slitLen): 1004 Qtemp = np.concatenate([Q,20*Q]) 1005 Ictemp = np.concatenate([Ic,np.zeros_like(Ic)]) 1006 print Ictemp 1007 Icsm = np.zeros_like(Qtemp) 1008 Np = Q.shape[0] 1009 Qsm = 2*slitLen*(np.interp(np.arange(2*Np)/2.,np.arange(Np),Q)-Q[0])/(Q[-1]-Q[0]) 1010 Sp = np.searchsorted(Qsm,slitLen) 1011 for i in range(Np): 1012 Ism = np.interp(np.sqrt(Q[i]**2+Qsm**2),Qtemp,Ictemp) 1013 print Ism 1014 raise Exception 1015 Icsm[i] = np.sum(Ism[:Sp]) 1016 Icsm /= slitLen 1017 return Icsm #for now 1005 1018 1006 1019 ############################################################################### … … 1210 1223 parmDict[cid+'PkSig'],parmDict[cid+'PkGam'],Q) 1211 1224 Ic += parmDict['Back'] #/parmDict['Scale'] 1225 slitLen = Sample['SlitLen'] 1226 if slitLen: 1227 Ic = SmearData(Ic,Q,slitLen) 1212 1228 return Ic 1213 1229 … … 1359 1375 Dist.append([]) 1360 1376 Ic[Ibeg:Ifin] += Back[0] 1377 slitLen = Sample['SlitLen'] 1378 if slitLen: 1379 Ic[Ibeg:Ifin] = SmearData(Ic,Q,slitLen)[Ibeg:Ifin] 1361 1380 sasdData['Size Calc'] = [Rbins,Dist] 1362 1381
Note: See TracChangeset
for help on using the changeset viewer.