[Yt-svn] yt-commit r1227 - trunk/yt/extensions
britton at wrangler.dreamhost.com
britton at wrangler.dreamhost.com
Mon Mar 23 17:23:08 PDT 2009
Author: britton
Date: Mon Mar 23 17:23:07 2009
New Revision: 1227
URL: http://yt.spacepope.org/changeset/1227
Log:
Fixed bug causing an error when makeProjections is run without running
makeProfiles first. Fixed virial quantity read so that it gets halo id, and
made mkdir in makeProfiles into a parallel friendly __check_directory.
Modified:
trunk/yt/extensions/HaloProfiler.py
Modified: trunk/yt/extensions/HaloProfiler.py
==============================================================================
--- trunk/yt/extensions/HaloProfiler.py (original)
+++ trunk/yt/extensions/HaloProfiler.py Mon Mar 23 17:23:07 2009
@@ -115,13 +115,7 @@
self._CheckForNeededProfileFields()
outputDir = "%s/%s" % (self.pf.fullpath,self.haloProfilerParameters['ProfileOutputDir'])
-
- if (os.path.exists(outputDir)):
- if not(os.path.isdir(outputDir)):
- mylog.error("Output directory exists, but is not a directory: %s." % outputDir)
- return
- else:
- os.mkdir(outputDir)
+ self.__check_directory(outputDir)
for q,halo in enumerate(self._get_objs('hopHalos', round_robin=True)):
filename = "%s/Halo_%04d_profile.dat" % (outputDir,halo['id'])
@@ -223,7 +217,7 @@
# Create a plot collection.
pc = raven.PlotCollection(self.pf,center=center)
- for halo in self._get_objs('hopHalos', round_robin=True):
+ for halo in self._get_objs('virialQuantities', round_robin=True):
if halo is None:
continue
# Check if region will overlap domain edge.
@@ -519,6 +513,7 @@
onLine = line.split()
index = int(onLine[0])
virial = {}
+ virial['id'] = int(onLine[0])
virial['center'] = [float(onLine[1]),float(onLine[2]),float(onLine[3])]
virial['TotalMassMsun'] = float(onLine[4])
virial['RadiusMpc'] = float(onLine[5])
More information about the yt-svn
mailing list