Changeset 4206 for trunk/GSASIIpwd.py
- Timestamp:
- Dec 16, 2019 8:20:02 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.