Changeset 2819
- Timestamp:
- May 4, 2017 9:14:19 AM (6 years ago)
- Location:
- trunk/exports
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/exports/G2export_CIF.py
r2738 r2819 2178 2178 except IOError: 2179 2179 dictobj = cif.CifDic(fil) 2180 if DEBUG: print('loaded '+ str(fil))2180 if DEBUG: print('loaded '+fil) 2181 2181 for item in dictobj.keys(): 2182 2182 cifdic[item] = {} … … 2193 2193 cPickle.dump(cifdic,fp) 2194 2194 fp.close() 2195 if DEBUG: print('wrote '+ str(fil))2195 if DEBUG: print('wrote '+fil) 2196 2196 except: 2197 print ('Unable to write '+ str(fil))2197 print ('Unable to write '+fil) 2198 2198 return cifdic 2199 2199 … … 2216 2216 try: 2217 2217 cifdic.update(cPickle.load(fp)) 2218 if DEBUG: print('reloaded '+ str(fil))2218 if DEBUG: print('reloaded '+fil) 2219 2219 break 2220 2220 finally: -
trunk/exports/G2export_FIT2D.py
r2376 r2819 70 70 self.filename = os.path.join(self.dirname,fileroot + self.extension) 71 71 self.Writer(hist) 72 print('Histogram '+ str(hist)+' written to file '+str(self.fullpath))72 print('Histogram '+hist+' written to file '+self.fullpath) 73 73 74 74 class ExportPowderQCHI(G2IO.ExportBaseclass): … … 119 119 self.filename = os.path.join(self.dirname,fileroot + self.extension) 120 120 self.Writer(hist) 121 print('Histogram '+ str(hist)+' written to file '+str(self.fullpath))121 print('Histogram '+hist+' written to file '+self.fullpath) -
trunk/exports/G2export_PDB.py
r1299 r2819 134 134 General = phasedict['General'] 135 135 if General['Type'] != 'macromolecular': 136 print 'phase '+ str(phasenam)+' not macromolecular, skipping'136 print 'phase '+phasenam+' not macromolecular, skipping' 137 137 continue 138 138 i = self.Phases[phasenam]['pId'] … … 197 197 self.Write('END') 198 198 self.CloseFile() 199 print('Phase '+ str(phasenam)+' written to PDB file '+str(self.fullpath))199 print('Phase '+phasenam+' written to PDB file '+self.fullpath) 200 200 201 201 class ExportPhaseCartXYZ(G2IO.ExportBaseclass): … … 232 232 Atoms = phasedict['Atoms'] 233 233 if not len(Atoms): 234 print('**** ERROR - Phase '+ str(phasenam)+' has no atoms! ****')234 print('**** ERROR - Phase '+phasenam+' has no atoms! ****') 235 235 continue 236 236 if len(self.phasenam) > 1: # if more than one filename is included, add a phase # … … 247 247 self.Write(fmt.format(atom[ct],*xyz)) 248 248 self.CloseFile() 249 print('Phase '+ str(phasenam)+' written to XYZ file '+str(self.fullpath))249 print('Phase '+phasenam+' written to XYZ file '+self.fullpath) 250 250 -
trunk/exports/G2export_csv.py
r2433 r2819 97 97 98 98 if mode == 'w': 99 print('Phase '+ str(phasenam)+' written to file '+str(self.fullpath))99 print('Phase '+phasenam+' written to file '+self.fullpath) 100 100 self.CloseFile() 101 101 … … 154 154 line += "," 155 155 self.Write(line) 156 print('Phase '+ str(phasenam)+' written to file '+str(self.fullpath))156 print('Phase '+phasenam+' written to file '+self.fullpath) 157 157 self.CloseFile() 158 158 … … 210 210 self.filename = os.path.join(self.dirname,fileroot + self.extension) 211 211 self.Writer(hist) 212 print('Histogram '+ str(hist)+' written to file '+str(self.fullpath))212 print('Histogram '+hist+' written to file '+self.fullpath) 213 213 214 214 class ExportMultiPowderCSV(G2IO.ExportBaseclass): … … 253 253 digitList += [(13,3),] 254 254 csvData.append(histblk['Data'][1]) 255 print('Histogram '+ str(hist)+' written to file '+str(self.fullpath))255 print('Histogram '+hist+' written to file '+self.fullpath) 256 256 self.OpenFile() 257 257 WriteList(self,headList) … … 338 338 self.Write(fmt.format(h,k,l,pos,Fobs,Fcalc,phase,mult,s,g,FWHM,Prfo,i)) 339 339 self.CloseFile() 340 print( str(hist)+'reflections written to file '+str(self.fullpath))340 print(hist+'reflections written to file '+self.fullpath) 341 341 342 342 class ExportSingleCSV(G2IO.ExportBaseclass): … … 384 384 self.Write(fmt.format(h,k,l,pos,Fobs,Fcalc,phase,mult,i)) 385 385 self.CloseFile() 386 print( str(hist)+' written to file '+str(self.fullname))386 print(hist+' written to file '+self.fullname) 387 387 388 388 class ExportStrainCSV(G2IO.ExportBaseclass): … … 427 427 self.Write(fmt2.format(dat[1],dat[0],dat[2])) 428 428 self.CloseFile() 429 print( str(hist)+' written to file '+str(self.fullpath))429 print(hist+' written to file '+self.fullpath) -
trunk/exports/G2export_examples.py
r2136 r2819 114 114 vals.append(G2mth.ValEsd(val,sig)) 115 115 self.Write(fmt.format(*vals)) 116 print('Phase '+ str(phasenam)+' written to file '+str(self.fullpath))116 print('Phase '+phasenam+' written to file '+self.fullpath) 117 117 self.CloseFile() 118 118 … … 164 164 hist = self.histnam[0] # there should only be one histogram, in any case take the 1st 165 165 self.Writer(hist) 166 print( str(hist)+' written to file '+str(self.fullpath))166 print(hist+' written to file '+self.fullpath) 167 167 168 168 class ExportPowderReflText(G2IO.ExportBaseclass): … … 244 244 s,g,FWHM,prfo)) 245 245 self.CloseFile() 246 print( str(hist)+'reflections written to file '+str(self.fullpath))246 print(hist+'reflections written to file '+self.fullpath) 247 247 248 248 class ExportSingleText(G2IO.ExportBaseclass): … … 287 287 self.Write(fmt.format(hklfmt.format(h,k,l),dsp,Fobs,sigFobs,Fcalc,phase,twin)) 288 288 self.CloseFile() 289 print( str(hist)+' written to file '+str(self.fullpath))290 289 print(hist+' written to file '+self.fullpath) 290 -
trunk/exports/G2export_image.py
r1261 r2819 20 20 GSASIIpath.SetVersionNumber("$Revision$") 21 21 import GSASIIIO as G2IO 22 import GSASIImath as G2mth23 22 24 23 class ExportImagePNG(G2IO.ExportBaseclass): … … 53 52 Comments,Data,Npix,Image = G2IO.GetImageData(self.G2frame,imgFile) 54 53 scipy.misc.imsave(filename,Image) 55 print('Image '+ str(imgFile)+' written to file '+str(filename))54 print('Image '+imgFile+' written to file '+filename) 56 55 -
trunk/exports/G2export_map.py
r2779 r2819 59 59 rho = phasedict['General']['Map'].get('rho',[]) 60 60 if not len(rho): 61 print "There is no map for phase "+ str(phasenam)61 print "There is no map for phase "+phasenam 62 62 continue 63 63 if len(self.phasenam) > 1: # if more than one filename is written, add a phase # -- not in use yet … … 118 118 119 119 if not len(rho): 120 print "There is no map for phase "+ str(phasenam)120 print "There is no map for phase "+phasenam 121 121 continue 122 122 if len(self.phasenam) > 1: # if more than one filename is written, add a phase # -- not in use yet -
trunk/exports/G2export_pwdr.py
r2152 r2819 59 59 self.Write(('INS 1PRCF12%15.6e%15.6e%15.6e%15.6e ')%(Inst['X'][1],Inst['Y'][1],Inst['SH/L'][1]/2.,Inst['SH/L'][1]/2.)) 60 60 self.CloseFile() 61 print('Parameters from '+ str(hist)+' written to file '+str(prmname))61 print('Parameters from '+hist+' written to file '+prmname) 62 62 return prmname 63 63 … … 104 104 prmname = self.WriteInstFile(hist,histblk['Instrument Parameters'][0]) 105 105 self.Writer(hist,prmname=prmname) 106 print('Histogram '+ str(hist)+' written to file '+str(self.fullpath))106 print('Histogram '+hist+' written to file '+self.fullpath) 107 107 108 108 class ExportPowderXYE(G2IO.ExportBaseclass): … … 156 156 self.filename = os.path.join(self.dirname,fileroot + self.extension) 157 157 self.Writer(hist) 158 print('Histogram '+ str(hist)+' written to file '+str(self.fullpath))158 print('Histogram '+hist+' written to file '+self.fullpath) -
trunk/exports/G2export_shelx.py
r1618 r2819 121 121 self.Write('END') 122 122 self.CloseFile() 123 print('Phase '+ str(phasenam)+' written to file '+str(self.fullpath))123 print('Phase '+phasenam+' written to file '+self.fullpath)
Note: See TracChangeset
for help on using the changeset viewer.