
Hi everyone, Stephen Skory has added the Friends-of-friends halo finder to the yt trunk (not yt-1.0) and we've now enabled it as a possibility for finding halos in a simulation. Because there are now two mechanisms for finding halos, we've also changed the API a little bit and made the halo finders available through yt.mods. So to run the HOP halo finder you would do the following: from yt.mods import * pf = load("data0001") halo_list = HaloFinder(pf) and to run FOF you have to call it slightly differently: from yt.mods import * pf = load("data0001") halo_list = FOFHaloFinder(pf) To get FOF to compile, you'll have to rerun "python setup.py develop" or "python setup.py install" depending on how yt was installed initially. (The install_script does the former, but most hand-installs do the latter.) With this new API, both halo finders run in parallel. I'll save any discussion of that for Stephen, however, as there are some caveats to running HOP in parallel. Additionally, as of right now they dont scale as well as we'd like -- but we're working on it. Additionally, as a result of this change we have intentionally broken compatibility by removing the import of the 'hop' module in yt/mods.py. Hopefully this has not caused too many problems; all of the old, largely duplicated-in-multiple-places classes and interfaces have now been consolidated and placed in yt/lagos/HaloFinding.py. Thanks to Stephen for his hard work adding in FOF and working with the parallel interface! Best wishes, and let us know if there are any problems, Matt

Hi, I am a new user of yt and I trying to run the yt-hop Halo Finder to build a merger history of halos. The output "HopAnalysis.out" I get following the instructions on: http://yt.enzotools.org/wiki/Recipes/HOPResults only contains a list of halo properties, not particle IDs. If there a way to access the IDs of particles in the halos, like in the original hop code? I would have expected this to be needed by the Galaxy/Halo Merger Tree code described in http://yt.enzotools.org/wiki/Recipes/GalaxyMerging. Thanks in advance for any suggestion, Michele Michele Trenti Center for Astrophysics and Space Astronomy University of Colorado 389 UCB Phone: +1 303-492-8490 Boulder, Colorado 80309-0389 Fax: +1 303-492-7178 USA E-mail: michele.trenti@colorado.edu "It often happens that a player carries out a deep and complicated calculation, but fails to spot something elementary right at the first move." -- Chess Grandmaster Alexander Kotov

Hi Michele,
I am a new user of yt and I trying to run the yt-hop Halo Finder to build a merger history of halos.
Yes, it is possible. You need to be running out of trunk. The first step is to make a copy of 'examples/fastBuildMerge.py' to your favorite location. This is a Python script that builds a Python script that will drive yt. Got it? Good. In your copy of fastBuildMerge.py, edit the values at the top. It's heavily commented, so I hope you will be able to understand what each does. Reply to the list if you need help understanding them. You'll want to run HOP on the last (z=0?) timestep by hand to find the halo(es) you wish to track back in time, but it sounds like you've already done that. Run Python on this script, which outputs the actual script that drives yt. Run the new script and you should get the merger tree. One final note: as I responded to your email, I noticed I had a typo in the trunk version of fastBuildMerge, which I've updated in r1305, so you should 'svn up' before starting. Good luck! _______________________________________________________ sskory@physics.ucsd.edu o__ Stephen Skory http://physics.ucsd.edu/~sskory/ _.>/ _Graduate Student ________________________________(_)_\(_)_______________

Hi Stephen, Thank you very much for your reply! I apologize if I was not clear in my mail. I am not interested in using fastBuildMerge.py, I am only looking for a list of particles IDs associated to each halo. I have my own code to track mergers. If you can point me to where this information is saved by yt-hop it would be very helpful. Thanks again, Michele Michele Trenti Center for Astrophysics and Space Astronomy University of Colorado 389 UCB Phone: +1 303-492-8490 Boulder, Colorado 80309-0389 Fax: +1 303-492-7178 USA E-mail: michele.trenti@colorado.edu "It often happens that a player carries out a deep and complicated calculation, but fails to spot something elementary right at the first move." -- Chess Grandmaster Alexander Kotov On Wed, 13 May 2009, Stephen Skory wrote:
Hi Michele,
I am a new user of yt and I trying to run the yt-hop Halo Finder to build a merger history of halos.
Yes, it is possible. You need to be running out of trunk.
The first step is to make a copy of 'examples/fastBuildMerge.py' to your favorite location. This is a Python script that builds a Python script that will drive yt. Got it? Good.
In your copy of fastBuildMerge.py, edit the values at the top. It's heavily commented, so I hope you will be able to understand what each does. Reply to the list if you need help understanding them.
You'll want to run HOP on the last (z=0?) timestep by hand to find the halo(es) you wish to track back in time, but it sounds like you've already done that.
Run Python on this script, which outputs the actual script that drives yt. Run the new script and you should get the merger tree.
One final note: as I responded to your email, I noticed I had a typo in the trunk version of fastBuildMerge, which I've updated in r1305, so you should 'svn up' before starting.
Good luck! _______________________________________________________ sskory@physics.ucsd.edu o__ Stephen Skory http://physics.ucsd.edu/~sskory/ _.>/ _Graduate Student ________________________________(_)_\(_)_______________ _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Michele,
I am not interested in using fastBuildMerge.py, I am only looking for a list of particles IDs associated to each halo. I have my own code to track mergers.
There are several ways to get it. If you want them from the interactive console, you can do something like this:
from yt.mods import * pf = load('DD0130') haloes = HaloFinder(pf) particleIDs_biggest_halo = haloes[0]["particle_index"]
If want all the particles saved to disk, once you have the 'haloes' list
haloes.write_paritcle_lists('parts')
This will write out a hdf5 file with the following information per halo: login3% h5ls parts.h5/Halo00000060 particle_index Dataset {171} particle_position_x Dataset {171} particle_position_y Dataset {171} particle_position_z Dataset {171} particle_velocity_x Dataset {171} particle_velocity_y Dataset {171} particle_velocity_z Dataset {171} The name of the hdf5 group uses the same ID as from the text file from .write_out(). Does that help? _______________________________________________________ sskory@physics.ucsd.edu o__ Stephen Skory http://physics.ucsd.edu/~sskory/ _.>/ _Graduate Student ________________________________(_)_\(_)_______________

Hi Stephen, Thanks a lot, it is exactly what I was looking for! Best, Michele
participants (3)
-
Matthew Turk
-
Michele Trenti
-
Stephen Skory