[yt-users] cookbook_hop_mass_sum.py
Matthew Turk
matthewturk at gmail.com
Mon Nov 23 13:51:19 PST 2009
Hi Shankar,
What it's objecting to (and I say "it" to refer to yt, but I confess
that line of code was written by me, and deliberately so) is trying to
look at a sphere that is defined by a radius smaller than a single
cell -- asking for baryon quantities from such a sphere is ill-posed,
and yt will refuse to do it. I wanted to ensure that people would be
informed if there was something fishy going on, rather than just being
given potentially odd or unhelpful data back.
The dark matter mass can be accessed as a function of the halo object,
as described here:
http://yt.enzotools.org/doc/modules/amrdata.html#yt.lagos.Halo.total_mass
.
Best of luck!
-Matt
PS We did end up getting rid of the cookbook_hop_mass_sum.py recipe,
as it was not well commented or described -- I'm going to delete it
from trunk, as it is now supplanted by this in the documentation:
http://yt.enzotools.org/doc/cookbook/recipes.html#halo-mass-info .
On Mon, Nov 23, 2009 at 1:41 PM, Agarwal, Shankar <sagarwal at ku.edu> wrote:
> Hi,
>
> I ran cookbook_hop_mass_sum.py and it gives me this error...
>
>
> Traceback (most recent call last):
> File "cookbook_hop_mass_sum.py", line 19, in <module>
> sphere = halo.get_sphere()
> File "/autohome/u118/agarwa23/enzo1/src/yt/yt/lagos/HaloFinding.py", line 128, in get_sphere
> center, radius=radius)
> File "/autohome/u118/agarwa23/enzo1/src/yt/yt/lagos/BaseDataTypes.py", line 1800, in __init__
> raise SyntaxError("Your radius is smaller than your finest cell!")
> SyntaxError: Your radius is smaller than your finest cell!
>
>
> How does it matter if halo radius is smaller than finest cell ?
>
> cookbook_hop_mass_sum.py should just spit the baryon mass, dark matter mass and total mass.
>
>
> # Group Mass # part max densx y z center-of-mass x y z vx vy vz max_r
> 0 1.009603589e+15 3202 6.803410660e+03 2.691574395e-01 1.892197430e-01 8.293117285e-01 2.701045173e-01 1.889703433e-01 8.276973165e-01 -6.232934392e+06
> -2.872425257e+07 1.526929994e+06 1.886896417e-02
>
>
>
> shankar
> _______________________________________________
> 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