[Yt-dev] HaloFinding stars/dm
Stephen Skory
stephenskory at yahoo.com
Sat Jun 20 19:53:50 PDT 2009
Yo,
now that I've been playing around with stars and creation_time, I've noticed a bug in HaloFinding. The total_mass line below will include stars regardless of dm_only:
# do it once with no padding so the total_mass is correct (no duplicated particles)
self.padding = 0.0
padded, LE, RE, data_source = self._partition_hierarchy_3d(padding=self.padding)
# For scaling the threshold, note that it's a passthrough
total_mass = self._mpi_allsum(data_source["ParticleMassMsun"].sum())
Is there a better way to fix it than this?
# do it once with no padding so the total_mass is correct (no duplicated particles)
self.padding = 0.0
padded, LE, RE, data_source = self._partition_hierarchy_3d(padding=self.padding)
# For scaling the threshold, note that it's a passthrough
if dm_only:
select = data_source["creation_time"] > 0
total_mass = self._mpi_allsum(data_source["ParticleMassMsun"][select].sum())
else:
total_mass = self._mpi_allsum(data_source["ParticleMassMsun"].sum())
_______________________________________________________
sskory at physics.ucsd.edu o__ Stephen Skory
http://physics.ucsd.edu/~sskory/ _.>/ _Graduate Student
________________________________(_)_\(_)_______________
More information about the yt-dev
mailing list