[yt-users] halos

Stephen Skory stephenskory at yahoo.com
Fri Mar 4 13:12:18 PST 2011


Geoffrey,

> Stephen, I would like to be able to calculate the a, b, c in the eqn of an
> ellipsoid for the stars/dm particles in a Halo, and see how much mass is
> in particles, and how much is in baryons.  If I have the prescription to
> do the calculation, can this be easily achieved if I have access to the
> halo data if it was stored as binary in the .yt file?  Or would this be
> better done while it is still  in memory with the halo profiler running?


This is actually not so easy in yt presently.


First let me correct one of your misconceptions. There is no halo data stored in the .yt file. Halo data is only ever stored in the HopAnalysis.out text file, and the hdf5 .h5 particle data files (called from halos.write_particle_lists()).

What makes your task difficult is that yt has no ellipsoid data container. It has a sphere, cylinder, inclined box, and rectilinear region. You are more than welcome to write one for yourself! It's a bit convoluted where you make the additions, but the trail beings in yt/data_objects/data_containers.py. For example, you can follow how the AMRSphereBase works. If this is something you want to try, I can write a more detailed explanation of how to do this and the files involved. You should also get yourself a bitbucket account and make your own fork of yt if you are up to this challenge.

As I see it you have two tasks. First, is the ability to define, or at least discriminate, cells that are inside your ellipsoid. If you can do this, this will get your baryonic content. Second, you need to decide how you want to deal with particles. Halos are generally not ellipsoidal. Do you want to find the halo, find the ellipsoid for that halo, and then grab the particles inside that region, which will not be completely identical to what the halo finder found? Or do you want to sick with the identified particles?

To answer your specific question, as it stands right now this would be easiest to do as you find the halos. I am currently thinking about how to import previously found halos back into yt. But I think you have bigger challenges to figure out first: namely how to define an ellipsoidal region in yt/python for your baryons.

 
Stephen Skory
stephenskory at yahoo.com
http://stephenskory.com/
510.621.3687 (google voice)




More information about the yt-users mailing list