Commits

Shea Garrison-Kimmel committed c673c1c

Give an option to print less output from rockstar2irate

  • Participants
  • Parent commits 17cafad

Comments (0)

Files changed (2)

irate/rockstar.py

     coldata = loadtxt(fname,unpack=True,comments='#')
     nhalos = len(coldata[0])
     
-    print "Read {0} columns of data for {1} halos.  Now collimating.".format(len(columns),nhalos)
+    if verbose:  print "Read {0} columns of data for {1} halos.  Now collimating.".format(len(columns),nhalos)
     
     #Now to do the collimation; each column should be a property, except for the few that are vectors
     #coldata = empty([len(halos[0]),nhalos])

scripts/rockstar2irate

 verbose = not ops.quiet
 
 if ops.binary:
-	print "Reading data from Rockstar binary file "+inname
+	if verbose:  print "Reading data from Rockstar binary file "+inname
 	[halodata,haloheaders,halocomments] = read_rockstar_binary(inname,verbose)
 else:
-	print "Reading data from Rockstar ascii file "+inname
+	if verbose:  print "Reading data from Rockstar ascii file "+inname
 	[halodata,haloheaders,halocomments] = read_rockstar_ascii(inname,verbose)
 	
-print "Writing data to "+outname
+if verbose:  print "Writing data to "+outname
 write_halodata(halodata,haloheaders,halocomments,outname)
 print "Successfully created IRATE file "+outname