Changeset 1203
- Timestamp:
- Jan 20, 2014 1:07:50 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIIO.py
r1199 r1203 858 858 Id = item 859 859 item, cookie = G2frame.PatternTree.GetNextChild(G2frame.root, cookie) 860 if 'PWDR' in name:861 parms = ['PXC',data['wavelength'],0.0,0.99,1.0,-0.10,0.4,0.30,1.0,0.0001,Azms[i]] #set polarization for synchrotron radiation!862 elif 'SASD' in name:863 parms = ['LXC',data['wavelength'],0.0,Azms[i]]864 Y = G2frame.Integrate[0][i]865 W = 1./Y #probably not true866 860 Sample = G2pdG.SetDefaultSample() 867 861 Sample['Gonio. radius'] = data['distance'] … … 869 863 Sample['Chi'] = data['GonioAngles'][1] 870 864 Sample['Phi'] = data['GonioAngles'][2] 865 if 'PWDR' in name: 866 parms = ['PXC',data['wavelength'],0.0,0.99,1.0,-0.10,0.4,0.30,1.0,0.0001,Azms[i]] #set polarization for synchrotron radiation! 867 elif 'SASD' in name: 868 parms = ['LXC',data['wavelength'],0.0,Azms[i]] 869 Y = G2frame.Integrate[0][i] 870 W = 1./Y #probably not true 871 871 if Id: 872 872 G2frame.PatternTree.SetItemPyData(G2gd.GetPatternTreeItemId(G2frame,Id, 'Comments'),Comments) -
trunk/GSASIIgrid.py
r1202 r1203 2303 2303 self.PrefillDataMenu(self.SampleMenu,helpType='Sample Parameters') 2304 2304 self.SampleEdit = wx.Menu(title='') 2305 self.SampleMenu.Append(menu=self.SampleEdit, title=' File')2305 self.SampleMenu.Append(menu=self.SampleEdit, title='Command') 2306 2306 self.SampleEdit.Append(id=wxID_SAMPLELOAD, kind=wx.ITEM_NORMAL,text='Load', 2307 2307 help='Load sample parameters from file') -
trunk/GSASIIimage.py
r1199 r1203 797 797 muT = data['SampleAbs'][0] 798 798 if 'SASD' in data['type']: 799 muT = np.log(muT)799 muT = -np.log(muT)/2. #Transmission to 1/2 thickness muT 800 800 NST = np.zeros(shape=(numAzms,numChans),order='F',dtype=np.float32) 801 801 H0 = np.zeros(shape=(numAzms,numChans),order='F',dtype=np.float32) -
trunk/GSASIIimgGUI.py
r1199 r1203 278 278 data['type'] = typeSel.GetValue()[:4] 279 279 if 'SASD' in data['type'] and not data['SampleAbs'][0]: 280 data['SampleAbs'][0] = 1.0 #switch from muT to trans!280 data['SampleAbs'][0] = 1.0 #switch from muT=0 to trans=1! 281 281 wx.CallAfter(UpdateImageControls,G2frame,data,masks) 282 282 -
trunk/GSASIIphsGUI.py
r1183 r1203 4858 4858 ref[6] = FWHM*(xdata[1][indx]-xdata[4][indx])*cosd(pos/2.)**3/dx 4859 4859 Lorenz = 1./(2.*sind(xdata[0][indx]/2.)**2*cosd(xdata[0][indx]/2.)) #Lorentz correction 4860 pola,dIdPola = G2pwd.Polarization(Inst['Polariz.'][1],xdata[0][indx],Inst['Azimuth'][1]) 4860 pola = 1.0 4861 if 'X' in Inst['Type']: 4862 pola,dIdPola = G2pwd.Polarization(Inst['Polariz.'][1],xdata[0][indx],Inst['Azimuth'][1]) 4861 4863 ref[6] /= (Lorenz*pola*ref[3]) 4862 4864 except IndexError: -
trunk/GSASIIplot.py
r1201 r1203 508 508 if abs(xpos) > 0.: #avoid possible singularity at beam center 509 509 dsp = wave/(2.*sind(abs(xpos)/2.0)) 510 q = 2.*np.pi/dsp 510 511 if G2frame.Contour: 511 G2frame.G2plotNB.status.SetStatusText('2-theta =%9.3f d =%9.5f pattern ID =%5d'%(xpos,dsp,int(ypos)),1)512 G2frame.G2plotNB.status.SetStatusText('2-theta =%9.3f d =%9.5f q = %9.5f pattern ID =%5d'%(xpos,dsp,q,int(ypos)),1) 512 513 else: 513 G2frame.G2plotNB.status.SetStatusText('2-theta =%9.3f d =%9.5f Intensity =%9.1f'%(xpos,dsp,ypos),1)514 G2frame.G2plotNB.status.SetStatusText('2-theta =%9.3f d =%9.5f q = %9.5f Intensity =%9.2f'%(xpos,dsp,q,ypos),1) 514 515 else: #TOF neutrons 515 516 dsp = 0.0 516 517 difC = Parms['difC'][1] 517 518 dsp = xpos/difC #rough approx.! 519 q = 2.*np.pi/dsp 518 520 if G2frame.Contour: 519 G2frame.G2plotNB.status.SetStatusText('TOF =%9.3f d =%9.5f pattern ID =%5d'%(xpos,dsp,int(ypos)),1)521 G2frame.G2plotNB.status.SetStatusText('TOF =%9.3f d =%9.5f q = %9.5f pattern ID =%5d'%(xpos,dsp,q,int(ypos)),1) 520 522 else: 521 G2frame.G2plotNB.status.SetStatusText('TOF =%9.3f d =%9.5f Intensity =%9.1f'%(xpos,dsp,ypos),1)523 G2frame.G2plotNB.status.SetStatusText('TOF =%9.3f d =%9.5f q = %9.5f Intensity =%9.2f'%(xpos,dsp,q,ypos),1) 522 524 if G2frame.itemPicked: 523 525 Page.canvas.SetToolTipString('%9.3f'%(xpos)) … … 706 708 Sample = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,G2frame.PatternId, 'Sample Parameters')) 707 709 ParmList = [Parms,] 710 SampleList = [Sample,] 708 711 Title = Pattern[-1] 709 712 else: … … 751 754 Plot.set_title(Title) 752 755 if G2frame.qPlot: 753 Plot.set_xlabel(r'$Q, \AA^{-1}$',fontsize=1 4)756 Plot.set_xlabel(r'$Q, \AA^{-1}$',fontsize=16) 754 757 else: 755 758 if 'C' in ParmList[0]['Type'][0]: 756 Plot.set_xlabel(r'$\mathsf{2\theta}$',fontsize=1 4)759 Plot.set_xlabel(r'$\mathsf{2\theta}$',fontsize=16) 757 760 else: 758 Plot.set_xlabel(r' TOF, $\mathsf{\mu}$s',fontsize=14)761 Plot.set_xlabel(r'$TOF, \mathsf{\mu}$s',fontsize=16) 759 762 if G2frame.Weight: 760 Plot.set_ylabel(r'$\mathsf{I/\sigma(I)}$',fontsize=1 4)763 Plot.set_ylabel(r'$\mathsf{I/\sigma(I)}$',fontsize=16) 761 764 else: 762 765 if 'C' in ParmList[0]['Type'][0]: 763 766 if 'PWDR' in plottype: 764 Plot.set_ylabel(' Intensity',fontsize=14)767 Plot.set_ylabel('$Intensity$',fontsize=16) 765 768 elif 'SASD' in plottype: 766 Plot.set_ylabel(' Intensity, cm-1',fontsize=14)769 Plot.set_ylabel('$Intensity, cm^{-1}$',fontsize=16) 767 770 else: 768 Plot.set_ylabel('Normalized intensity',fontsize=1 4)771 Plot.set_ylabel('Normalized intensity',fontsize=16) 769 772 if G2frame.Contour: 770 773 ContourZ = [] -
trunk/GSASIIpwdGUI.py
r1201 r1203 64 64 'Needs a doc string' 65 65 return { 66 'InstrName':'', 66 67 'ranId':ran.randint(0,sys.maxint), 67 68 'Scale':[1.0,True],'Type':'Debye-Scherrer','Absorption':[0.0,False], … … 1142 1143 finally: 1143 1144 dlg.Destroy() 1144 1145 1145 1146 1146 def OnSampleLoad(event): 1147 1147 '''Loads sample parameters from a G2 .samprm file
Note: See TracChangeset
for help on using the changeset viewer.