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
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
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@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Yeah. That makes sense. Question though.
This is the first line of hop_mass_info.txt...
Total mass in HOP group 0 is 1.65889e+15 (gas = 2.61466e+14 / particles = 1.39743e+15)
Question : This is in units of solar masses (without any h factors). Right ?
This is the first line of Hop_Analysis.out...
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
Question : Why is 1.009603589e+15 different from 1.39743e+15 ? In fact, why is it less ?
shankar
-----Original Message-----
From: yt-users-bounces@lists.spacepope.org on behalf of Matthew Turk
Sent: Mon 11/23/2009 3:51 PM
To: Discussion of the yt analysis package
Subject: Re: [yt-users] cookbook_hop_mass_sum.py
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
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@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Shankar,
This is the first line of hop_mass_info.txt...
Total mass in HOP group 0 is 1.65889e+15 (gas = 2.61466e+14 / particles = 1.39743e+15)
Question : This is in units of solar masses (without any h factors). Right ?
Yes, Msol, not Msol/h.
This is the first line of Hop_Analysis.out...
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
Question : Why is 1.009603589e+15 different from 1.39743e+15 ? In fact, why is it less ?
The mass provided by HOP is the simple sum of the mass of the particles that make up the halo as defined by HOP. The halo profiler finds mass in a completely different way. It finds the mass inside of spherical shells centered on the halo, and adds that up out to the radius provided by HOP for that halo. This will include the dark matter particles in the halo, but also particles not in the halo (because the HOP halo isn't necessarily spherical), and baryons. The mass that is reported by the profiler is the virial mass of the halo at whatever value you set the virial threshold, which is probably the typical value of 200 times the average density. So the numbers are different because they are measuring different things. Good luck! _______________________________________________________ sskory@physics.ucsd.edu o__ Stephen Skory http://physics.ucsd.edu/~sskory/ _.>/ _Graduate Student ________________________________(_)_\(_)_______________
participants (3)
-
Agarwal, Shankar
-
Matthew Turk
-
Stephen Skory