Changeset 4206
- Timestamp:
- Dec 16, 2019 8:20:02 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIphsGUI.py
r4202 r4206 4627 4627 # print(data['Histograms'][histoName]['Size']) 4628 4628 # print(data['Histograms'][histoName]['Mustrain']) 4629 print(G2pwd.MakeInst(G2frame,pName, PWId)+ ' written')4629 print(G2pwd.MakeInst(G2frame,pName,data,useSamBrd,PWId)+ ' written') 4630 4630 backfile = G2pwd.MakeBack(G2frame,pName,PWId) 4631 4631 if backfile is None: … … 4764 4764 print('RMCProfile file %s not found'%(pName+item)) 4765 4765 #total result plots 4766 Labels = {'_PDF1.csv':[r'$\mathsf{R,\AA}$','G(R)','RMC profileG(R) for '],4767 '_SQ1.csv':[r'$\mathsf{Q,\AA^-1}$','S(Q)','RMC profileS(Q) for '],4768 '_FQ1.csv':[r'$\mathsf{Q,\AA^-1}$','F(Q)','RMC profileF(Q) for '],4769 '_FT_XFQ1.csv':[r'$\mathsf{R,\AA}$','G(R)','RMC profilex-ray G(R) for '],4770 '_XFQ1.csv':[r'$\mathsf{Q,\AA^-1}$','F(Q)','RMC profilex-ray F(Q) for '],4771 '_bragg.csv':[r'$\mathsf{TOF,\mu s}$','Normalized Intensity','RMC profilebragg for ']}4766 Labels = {'_PDF1.csv':[r'$\mathsf{R,\AA}$','G(R)','RMCP G(R) for '], 4767 '_SQ1.csv':[r'$\mathsf{Q,\AA^-1}$','S(Q)','RMCP S(Q) for '], 4768 '_FQ1.csv':[r'$\mathsf{Q,\AA^-1}$','F(Q)','RMCP F(Q) for '], 4769 '_FT_XFQ1.csv':[r'$\mathsf{R,\AA}$','G(R)','RMCP x-ray G(R) for '], 4770 '_XFQ1.csv':[r'$\mathsf{Q,\AA^-1}$','F(Q)','RMCP x-ray F(Q) for '], 4771 '_bragg.csv':[r'$\mathsf{TOF,\mu s}$','Normalized Intensity','RMCP bragg for ']} 4772 4772 for label in Labels: 4773 4773 X = [] … … 4787 4787 lines=True,names=Names[1:]) 4788 4788 #partials plots 4789 Labels = {'_PDFpartials.csv':[r'$\mathsf{R,\AA}$','G(R)','RMC profileG(R) partials for '],4790 '_SQ1partials.csv':[r'$\mathsf{Q,\AA^-1}$','S(Q)','RMC profileS(Q) partials for '],4791 '_FQ1partials.csv':[r'$\mathsf{Q,\AA^-1}$','F(Q)','RMC profileF(Q) partials for ']}4789 Labels = {'_PDFpartials.csv':[r'$\mathsf{R,\AA}$','G(R)','RMCP G(R) partials for '], 4790 '_SQ1partials.csv':[r'$\mathsf{Q,\AA^-1}$','S(Q)','RMCP S(Q) partials for '], 4791 '_FQ1partials.csv':[r'$\mathsf{Q,\AA^-1}$','F(Q)','RMCP F(Q) partials for ']} 4792 4792 for label in Labels: 4793 4793 X = [] … … 4808 4808 X = [] 4809 4809 Chi = [] 4810 Names = files['.chi2'][0][:-1].split()4811 4810 if len(files['.chi2']) > 2: 4811 Names = files['.chi2'][0][:-1].split() 4812 4812 for line in files['.chi2'][1:]: 4813 4813 items = line[:-1].split() … … 4818 4818 XY = [[X.T,Y.T] for Y in Chi] 4819 4819 G2plt.PlotXY(G2frame,XY,labelX='no. generated', 4820 labelY=r'$\mathsf{\chi^2}$',newPlot=True,Title='RMCP rofileChi^2 for '+pName,4820 labelY=r'$\mathsf{\chi^2}$',newPlot=True,Title='RMCP Chi^2 for '+pName, 4821 4821 lines=True,names=Names[3:]) 4822 4822 -
trunk/GSASIIpwd.py
r4204 r4206 2095 2095 ################################################################################ 2096 2096 2097 def MakeInst(G2frame,Name,P WId):2097 def MakeInst(G2frame,Name,Phase,useSamBrd,PWId): 2098 2098 PWDdata = G2frame.GetPWDRdatafromTree(PWId) 2099 histoName = G2frame.GPXtree.GetItemPyData(PWId)[2] 2100 Size = Phase['Histograms'][histoName]['Size'] 2101 Mustrain = Phase['Histograms'][histoName]['Mustrain'] 2099 2102 inst = PWDdata['Instrument Parameters'][0] 2103 Xsb = 0. 2104 Ysb = 0. 2100 2105 if 'T' in inst['Type'][1]: 2106 difC = inst['DifC'][1] 2107 if useSamBrd[0]: 2108 if 'ellipsoidal' not in Size[0]: #take the isotropic term only 2109 Xsb = 1.e-4*difC/Size[1][0] 2110 if useSamBrd[1]: 2111 if 'generalized' not in Mustrain[0]: #take the isotropic term only 2112 Ysb = 1.e-6*difC*Mustrain[1][0] 2101 2113 prms = ['Bank', 2102 2114 'difC','difA','Zero','2-theta', … … 2111 2123 fl.write('%10.3f%10.6f%10.6f\n'%(inst[prms[5]][1],inst[prms[6]][1],inst[prms[7]][1])) 2112 2124 fl.write('%10.3f%10.3f%10.3f\n'%(inst[prms[8]][1],inst[prms[9]][1],inst[prms[10]][1])) 2113 fl.write('%10.4f%10.3f%10.3f%10.3f%10.3f\n'%(inst[prms[11]][1],inst[prms[12]][1] ,inst[prms[13]][1],0.0,0.0))2125 fl.write('%10.4f%10.3f%10.3f%10.3f%10.3f\n'%(inst[prms[11]][1],inst[prms[12]][1]+Xsb,inst[prms[13]][1]+Ysb,0.0,0.0)) 2114 2126 fl.close() 2115 2127 else: 2128 if useSamBrd[0]: 2129 wave = G2mth.getWave(inst) 2130 if 'ellipsoidal' not in Size[0]: #take the isotropic term only 2131 Xsb = 1.8*wave/(np.pi*Size[1][0]) 2132 if useSamBrd[1]: 2133 if 'generalized' not in Mustrain[0]: #take the isotropic term only 2134 Ysb = 0.018*np.pi*Mustrain[1][0] 2116 2135 prms = ['Bank', 2117 2136 'Lam','Zero','Polariz.', … … 2124 2143 fl.write('%10.5f%10.5f%10.4f%10d\n'%(inst[prms[1]][1],inst[prms[2]][1]/100.,inst[prms[3]][1],0)) 2125 2144 fl.write('%10.3f%10.3f%10.3f\n'%(inst[prms[4]][1],inst[prms[5]][1],inst[prms[6]][1])) 2126 fl.write('%10.3f%10.3f%10.3f\n'%(inst[prms[7]][1] ,inst[prms[8]][1],0.0))2145 fl.write('%10.3f%10.3f%10.3f\n'%(inst[prms[7]][1]+Xsb,inst[prms[8]][1]+Ysb,0.0)) 2127 2146 fl.write('%10.3f%10.3f%10.3f\n'%(0.0,0.0,0.0)) 2128 2147 fl.close()
Note: See TracChangeset
for help on using the changeset viewer.