- Timestamp:
- Nov 26, 2019 3:18:38 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASIIphsGUI.py ¶
r4193 r4194 4394 4394 4395 4395 ################################################################################ 4396 #### fullrmcData page4396 #### RMC Data page 4397 4397 ################################################################################ 4398 4398 … … 4541 4541 dlg = wx.FileDialog(G2frame, 'Choose fullrmc python file to execute', 4542 4542 wildcard='fullrmc python file (*.py)|*.py',style=wx.FD_CHANGE_DIR) 4543 4543 4544 else: 4544 4545 wx.MessageBox(''' For use of RMCProfile, please cite: -
TabularUnified trunk/GSASIIpwd.py ¶
r4193 r4194 189 189 if 'Cylinder' in Geometry: #Lobanov & Alte da Veiga for 2-theta = 0; beam fully illuminates sample 190 190 if 'array' in str(type(MuR)): 191 MuRSTh2 = np. concatenate((MuR,Sth2))191 MuRSTh2 = np.vstack((MuR,Sth2)) 192 192 AbsCr = np.where(MuRSTh2[0]<=3.0,muRunder3(MuRSTh2[0],MuRSTh2[1]),muRover3(MuRSTh2[0],MuRSTh2[1])) 193 193 return AbsCr … … 298 298 ''' 299 299 auxPlot = [] 300 qLimits = data['QScaleLim'] 301 Ibeg = np.searchsorted(xydata['Sample'][1][0],limits[0]) 302 Ifin = np.searchsorted(xydata['Sample'][1][0],limits[1])+1 300 if 'T' in inst['Type'][0]: 301 Ibeg = 0 302 Ifin = len(xydata['Sample'][1][0]) 303 else: 304 Ibeg = np.searchsorted(xydata['Sample'][1][0],limits[0]) 305 Ifin = np.searchsorted(xydata['Sample'][1][0],limits[1])+1 303 306 #subtract backgrounds - if any & use PWDR limits 304 307 IofQ = copy.deepcopy(xydata['Sample']) … … 315 318 #get element data & absorption coeff. 316 319 ElList = data['ElList'] 317 Abs = G2lat.CellAbsorption(ElList,data['Form Vol']) 318 #Apply angle dependent corrections 319 Tth = IofQ[1][0] 320 MuR = Abs*data['Diam']/20.0 321 IofQ[1][1] /= Absorb(data['Geometry'],MuR,Tth) 320 Tth = IofQ[1][0] #2-theta or TOF! 322 321 if 'X' in inst['Type'][0]: 322 Abs = G2lat.CellAbsorption(ElList,data['Form Vol']) 323 #Apply angle dependent corrections 324 MuR = Abs*data['Diam']/20.0 325 IofQ[1][1] /= Absorb(data['Geometry'],MuR,Tth) 323 326 IofQ[1][1] /= Polarization(inst['Polariz.'][1],Tth,Azm=inst['Azimuth'][1])[0] 324 if data['DetType'] == 'Image plate': 325 IofQ[1][1] *= Oblique(data['ObliqCoeff'],Tth) 327 if data['DetType'] == 'Image plate': 328 IofQ[1][1] *= Oblique(data['ObliqCoeff'],Tth) 329 elif 'T' in inst['Type'][0]: #neutron TOF normalized data - needs wavelength dependent absorption 330 wave = 2.*G2lat.TOF2dsp(inst,IofQ[1][0])*npsind(inst['2-theta'][1]/2.) 331 Els = ElList.keys() 332 Isotope = {El:'Nat. abund.' for El in Els} 333 GD = {'AtomTypes':ElList,'Isotope':Isotope} 334 BLtables = G2elem.GetBLtable(GD) 335 FP,FPP = G2elem.BlenResTOF(Els,BLtables,wave) 336 Abs = np.zeros(len(wave)) 337 for iel,El in enumerate(Els): 338 BL = BLtables[El][1] 339 SA = BL['SA']*wave/1.798197+4.0*np.pi*FPP[iel]**2 #+BL['SL'][1]? 340 SA *= ElList[El]['FormulaNo']/data['Form Vol'] 341 Abs += SA 342 MuR = Abs*data['Diam']/2. 343 IofQ[1][1] /= Absorb(data['Geometry'],MuR,inst['2-theta'][1]*np.ones(len(wave))) 326 344 XY = IofQ[1] 327 345 #convert to Q … … 346 364 Qdata -= np.min(Qdata)*data['BackRatio'] 347 365 366 qLimits = data['QScaleLim'] 348 367 maxQ = np.searchsorted(Qpoints,min(Qpoints[-1],qLimits[1]))+1 349 368 minQ = np.searchsorted(Qpoints,min(qLimits[0],0.90*Qpoints[-1])) -
TabularUnified trunk/GSASIIpwdGUI.py ¶
r4193 r4194 1951 1951 rd = G2obj.ImportPowderData('Dummy') 1952 1952 rd.Sample = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId,'Sample Parameters')) 1953 data = GetDefaultParms(rd)[0] 1953 try: 1954 data = GetDefaultParms(rd)[0] 1955 except TypeError: #Cancel - got None 1956 pass 1954 1957 UpdateInstrumentGrid(G2frame,data) 1955 1958 G2plt.PlotPeakWidths(G2frame)
Note: See TracChangeset
for help on using the changeset viewer.