[yt-users] halos

Matthew Turk matthewturk at gmail.com
Fri Mar 4 13:16:39 PST 2011


Hi Stephen and Geoffrey,

On Fri, Mar 4, 2011 at 4:12 PM, Stephen Skory <stephenskory at yahoo.com> wrote:
> 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.
>

I did write up a short description of how to do this:

http://yt.enzotools.org/doc/advanced/creating_datatypes.html

I think I have the start of an ellipsoidal container from last fall,
when Geoffrey was originally thinking about doing this.  It wasn't
very much, however, as the project got sidelined by some other things.

> 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.

I agree; this is going to be the rate-limiting step, even if you do
have the three vectors, three axis values and center corresponding to
the description of the ellipse.

It's probably best if you think about it in two stages:

1) How to tell if a grid intersects an ellipse
2) How to tell if a grid is completely enclosed in an ellipse
3) How to tell if a given x,y,z value is enclosed in an ellipse

Once you have these written out, like Stephen says you should fork yt
on BitBucket, add the code to the data_containers.py file, and we'll
review it an pull it back in.

Good luck!

-Matt

>
>
> Stephen Skory
> stephenskory at yahoo.com
> http://stephenskory.com/
> 510.621.3687 (google voice)
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list