Changeset 3800
- Timestamp:
- Jan 26, 2019 3:46:41 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/exports/G2export_CIF.py
r3796 r3800 71 71 if name.strip(): 72 72 fp.write(name+'\n') 73 fp.write('; 74 fp.write('; 73 fp.write(';\n'+value+'\n') 74 fp.write(';'+'\n') 75 75 elif " " in value: 76 76 if len(name)+len(value) > 65: … … 753 753 mustrain = hapData['Mustrain'] 754 754 hstrain = hapData['HStrain'] 755 if len(self.powderDict) > 1: 756 if s: 757 s += '\n' 758 else: 759 s += ' Crystallite size model "%s" for %s (microns)\n '%(size[0],phasenam) 760 s += ' Parameters for histogram #'+str(hId)+' '+str(histogram)+'\n' 761 else: 762 s += ' Crystallite size model "%s" for %s (microns)\n '%(size[0],phasenam) 763 755 if s: s += '\n' 756 if len(self.powderDict) > 1: # if one histogram, no ambiguity 757 s += ' Parameters for histogram #{:} {:} & phase {:}\n'.format( 758 str(hId),str(histogram),phasenam) 759 s += ' Crystallite size in microns with "%s" model:\n '%(size[0]) 764 760 names = ['Size;i','Size;mx'] 765 761 if 'uniax' in size[0]: … … 787 783 s += G2mth.ValEsd(size[1][i],sig)+', ' 788 784 i = 2 #skip the aniso value 789 s += '\n M ustrain model "%s" for %s (10^6^)\n '%(mustrain[0],phasenam)785 s += '\n Microstrain, "%s" model (10^6^ * delta Q/Q)\n '%(mustrain[0]) 790 786 names = ['Mustrain;i','Mustrain;mx'] 791 787 if 'uniax' in mustrain[0]: … … 1467 1463 #CALL WRVAL(IUCIF,'_gsas_exptl_extinct_corr_T_max',TEXT(11:20)) 1468 1464 1469 if not oneblock: # instrumental profile terms go here 1470 WriteCIFitem(self.fp, '_pd_proc_ls_profile_function', 1471 FormatInstProfile(histblk["Instrument Parameters"],histblk['hId'])) 1465 # code removed because it is causing duplication in histogram block 1/26/19 BHT 1466 #if not oneblock: # instrumental profile terms go here 1467 # WriteCIFitem(self.fp, '_pd_proc_ls_profile_function', 1468 # FormatInstProfile(histblk["Instrument Parameters"],histblk['hId'])) 1472 1469 1473 1470 #refprx = '_refln.' # mm … … 2298 2295 # report the phase info 2299 2296 WritePhaseInfo(phasenam) 2300 if hist.startswith("PWDR"): 2297 if hist.startswith("PWDR"): # this is invoked for single-block CIFs 2301 2298 # preferred orientation 2302 2299 SH = FormatSH(phasenam) … … 2308 2305 else: 2309 2306 WriteCIFitem(self.fp, '_pd_proc_ls_pref_orient_corr', 'none') 2310 # report profile, since one-block: include both histogram and phase info2307 # report profile, since one-block: include both histogram and phase info (N.B. there is only 1 of each) 2311 2308 WriteCIFitem(self.fp, '_pd_proc_ls_profile_function', 2312 2309 FormatInstProfile(histblk["Instrument Parameters"],histblk['hId']) 2313 2310 +'\n'+FormatPhaseProfile(phasenam)) 2311 2314 2312 histblk = self.Histograms[hist]["Sample Parameters"] 2315 2313 writeCIFtemplate(histblk,'powder',histblk['InstrName']) # write powder template … … 2405 2403 else: 2406 2404 WriteCIFitem(self.fp, '_pd_proc_ls_pref_orient_corr', 'none') 2407 # report sample profile terms 2405 # report sample profile terms for all histograms with current phase 2408 2406 PP = FormatPhaseProfile(phasenam) 2409 2407 if PP:
Note: See TracChangeset
for help on using the changeset viewer.