Changeset 1014
 Timestamp:
 Aug 1, 2013 2:22:05 PM (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/exports/G2cif.py
r1013 r1014 245 245 terms = fxn[2] 246 246 txt = 'Background function: "'+fxn[0]+'" function with '+str(terms)+' terms:\n' 247 l = " "247 l = " " 248 248 for i,v in enumerate(fxn[3:]): 249 249 name = '%sBack:%d'%(hfx,i) … … 251 251 if len(l) > 60: 252 252 txt += l + '\n' 253 l = ' '253 l = ' ' 254 254 l += G2mth.ValEsd(v,sig)+', ' 255 255 txt += l 256 if bkgdict['nDebye']: 257 txt += '\n Background Debye function parameters: A, R, U:' 258 names = ['A:','R:','U:'] 259 for i in range(bkgdict['nDebye']): 260 txt += '\n ' 261 for j in range(3): 262 name = hfx+'Debye'+names[j]+str(i) 263 sig = self.sigDict.get(name,0.009) 264 txt += G2mth.ValEsd(bkgdict['debyeTerms'][i][2*j],sig)+', ' 265 if bkgdict['nPeaks']: 266 txt += '\n Background peak parameters: pos, int, sig, gam:' 267 names = ['pos:','int:','sig:','gam:'] 268 for i in range(bkgdict['nPeaks']): 269 txt += '\n ' 270 for j in range(4): 271 name = hfx+'BkPk'+names[j]+str(i) 272 sig = self.sigDict.get(name,0.009) 273 txt += G2mth.ValEsd(bkgdict['peaksList'][i][2*j],sig)+', ' 256 274 return txt 257 275 … … 267 285 s += ' peak variance(Gauss) = Utan(Th)^2+Vtan(Th)+W:\n' 268 286 s += ' peak HW(Lorentz) = X/cos(Th)+Ytan(Th); SH/L = S/L+H/L\n' 269 s += ' U, V, W in (centideg)^2, X & Y in centideg\n '287 s += ' U, V, W in (centideg)^2, X & Y in centideg\n ' 270 288 for item in ['U','V','W','X','Y','SH/L']: 271 289 name = hfx+item … … 274 292 elif 'T' in inst['Type'][0]: #to be tested after TOF Rietveld done 275 293 s = 'Von DreeleJorgensonWindsor function parameters\n'+ \ 276 ' alpha, beta0, beta1, betaq, sig0, sig1, sigq, X, Y:\n '294 ' alpha, beta0, beta1, betaq, sig0, sig1, sigq, X, Y:\n ' 277 295 for item in ['alpha','bet0','bet1','betq','sig0','sig1','sigq','X','Y']: 278 296 name = hfx+item … … 301 319 mustrain = hapData['Mustrain'] 302 320 hstrain = hapData['HStrain'] 303 s = ' Crystallite size model "%s" for %s (microns)\n '%(size[0],phasenam)321 s = ' Crystallite size model "%s" for %s (microns)\n '%(size[0],phasenam) 304 322 names = ['Size;i','Size;mx'] 305 323 if 'uniax' in size[0]: 306 324 names = ['Size;i','Size;a','Size;mx'] 307 s += ' 308 s += ' parameters: equatorial size, axial size, G/L mix\n'325 s += 'anisotropic axis is %s\n '%(str(size[3])) 326 s += 'parameters: equatorial size, axial size, G/L mix\n ' 309 327 for i,item in enumerate(names): 310 328 name = phfx+item … … 312 330 s += G2mth.ValEsd(size[1][i],sig)+', ' 313 331 elif 'ellip' in size[0]: 314 s += ' parameters: S11, S22, S33, S12, S13, S23, G/L mix\n'332 s += 'parameters: S11, S22, S33, S12, S13, S23, G/L mix\n ' 315 333 for i in range(6): 316 334 name = phfx+'Size:'+str(i) … … 320 338 s += G2mth.ValEsd(size[1][2],sig)+', ' 321 339 else: #isotropic 322 s += ' parameters: Size, G/L mix\n'340 s += 'parameters: Size, G/L mix\n ' 323 341 i = 0 324 342 for item in names: … … 327 345 s += G2mth.ValEsd(size[1][i],sig)+', ' 328 346 i = 2 #skip the aniso value 329 s += '\n Mustrain model "%s" for %s (10^6)\n '%(mustrain[0],phasenam)347 s += '\n Mustrain model "%s" for %s (10^6)\n '%(mustrain[0],phasenam) 330 348 names = ['Mustrain;i','Mustrain;mx'] 331 349 if 'uniax' in mustrain[0]: 332 350 names = ['Mustrain;i','Mustrain;a','Mustrain;mx'] 333 s += ' 334 s += ' parameters: equatorial mustrain, axial mustrain, G/L mix\n'351 s += 'anisotropic axis is %s\n '%(str(size[3])) 352 s += 'parameters: equatorial mustrain, axial mustrain, G/L mix\n ' 335 353 for i,item in enumerate(names): 336 354 name = phfx+item … … 338 356 s += G2mth.ValEsd(mustrain[1][i],sig)+', ' 339 357 elif 'general' in mustrain[0]: 340 names = ' 358 names = 'parameters: ' 341 359 for i,name in enumerate(G2spc.MustrainNames(SGData)): 342 360 names += name+', ' 343 361 if i == 9: 344 362 names += '\n ' 345 names += 'G/L mix\n '363 names += 'G/L mix\n ' 346 364 s += names 347 365 txt = '' … … 350 368 sig = self.sigDict.get(name,0.009) 351 369 if len(txt) > 60: 352 s += txt+'\n '370 s += txt+'\n ' 353 371 txt = '' 354 372 txt += G2mth.ValEsd(mustrain[4][i],sig)+', ' … … 358 376 359 377 else: #isotropic 360 s += ' parameters: Mustrain, G/L mix\n '378 s += ' parameters: Mustrain, G/L mix\n ' 361 379 i = 0 362 380 for item in names: … … 370 388 for name in names: 371 389 txt += name+', ' 372 s += txt+'\n '390 s += txt+'\n ' 373 391 for i in range(len(names)): 374 392 name = phfx+name[i]
Note: See TracChangeset
for help on using the changeset viewer.