Changeset 1760 for trunk/exports/G2export_csv.py
- Timestamp:
- Mar 24, 2015 9:05:08 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property
svn:ignore
set to
Exercises
-
Property
svn:ignore
set to
-
trunk/exports/G2export_csv.py
r1630 r1760 244 244 self.Write('') 245 245 # note addition of a phase # flag at end (i) 246 WriteList(self,("h","k","l","2-theta","F_obs","F_calc","phase","mult","phase #"))247 fmt = "{:.0f},{:.0f},{:.0f},{:.3f},{:.3f},{:.3f},{:.2f},{:.0f},{:d}"248 246 for i,phasenam in enumerate(sorted(histblk['Reflection Lists'])): 249 for ( 250 h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,Icorr 251 ) in histblk['Reflection Lists'][phasenam]['RefList']: 252 self.Write(fmt.format(h,k,l,pos,Fobs,Fcalc,phase,mult,i)) 247 phasDict = histblk['Reflection Lists'][phasenam] 248 if phasDict['Super']: 249 WriteList(self,("h","k","l","m","2-theta","F_obs","F_calc","phase","mult","phase #")) 250 fmt = "{:.0f},{:.0f},{:.0f},{:.0f},{:.3f},{:.3f},{:.3f},{:.2f},{:.0f},{:d}" 251 refList = phasDict['RefList'] 252 for ( 253 h,k,l,m,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,Icorr,x,x,x 254 ) in refList: 255 self.Write(fmt.format(h,k,l,m,pos,Fobs,Fcalc,phase,mult,i)) 256 else: 257 WriteList(self,("h","k","l","2-theta","F_obs","F_calc","phase","mult","phase #")) 258 fmt = "{:.0f},{:.0f},{:.0f},{:.3f},{:.3f},{:.3f},{:.2f},{:.0f},{:d}" 259 refList = phasDict['RefList'] 260 for ( 261 h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,Icorr,x,x,x 262 ) in refList: 263 self.Write(fmt.format(h,k,l,pos,Fobs,Fcalc,phase,mult,i)) 253 264 self.CloseFile() 254 265 print(str(hist)+'reflections written to file '+str(self.fullpath))
Note: See TracChangeset
for help on using the changeset viewer.