<div dir="ltr">Hi Jingjing,<div><br></div><div>It's 500 times the critical density.</div><div><br></div><div>Britton</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 22, 2015 at 8:41 PM, Chen Jingjing <span dir="ltr"><<a href="mailto:chenjj235@gmail.com" target="_blank">chenjj235@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Britton,<div>When I set critical_density=500, does it mean 500 times of the average density, or 500 times of the critical density?</div><div><br></div><div>Thanks,</div><div>Jingjing</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2015-03-20 4:22 GMT-04:00 Britton Smith <span dir="ltr"><<a href="mailto:brittonsmith@gmail.com" target="_blank">brittonsmith@gmail.com</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi Reju,<div><br></div><div>It looks like the version of the notebook you are working from is a little out of date as the syntax for some of those callbacks has changed.  Please, have a look here for an updated version:</div><div><a href="http://yt-project.org/doc/cookbook/halo_analysis_example.html" target="_blank">http://yt-project.org/doc/cookbook/halo_analysis_example.html</a></div><div>I just ran this myself and confirmed everything to be working.</div><div><br></div><div>As for your other questions:</div><div><br></div><div class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>1) How to find the center of mass of the halos( hc.add_quantity('center_of_mass') is not working )</div></div></blockquote><div><br></div></span><div>By default, the halo catalog is storing the center of the halo as calculated by the halo finder that you used.  If you reload the halo catalog that you produce, the x, y, and z position of each halo are the "particle_position_x", "particle_position_y", "particle_position_z" fields.  For example, you could do:</div><div>ds = yt.load(your_halo_catalog)</div><div>ad = ds.all_data()</div><div>print ad["particle_position_x"]</div><div><br></div><div>Additionally, the halo catalog has a callback called "iterative_center_of_mass" which starts from the original center and iteratively recalculates the center of mass while reducing the radius of the sphere.  I have found this to work very well for calculating halo centers.  If you use this callback, it will rewrite the particle_position fields to contain the new center for each halo.  To get more information on this callback, do the following:</div><div><br></div><div><font face="monospace, monospace">from yt.analysis_modules.halo_analysis.halo_callbacks import *<br></font></div><div><font face="monospace, monospace">help(iterative_center_of_mass)</font></div><span><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>2) How to find virial mass (both M_500 and M_200 ) of the halas</div></div></blockquote><div><br></div></span><div>You can find these using the virial_quantities callback.  In the example you are working from, you can add another field to the virial_quantities callback you use and it would calculate the value of that field where the overdensity = 200.  For total mass, the field you want is called "matter_mass".  To get M_500 instead of M_200, you can call the virial_quantities callback again and give the keyword argument critical_density=500.</div><span><font color="#888888"><div><br></div><div>Britton</div></font></span></div></div></div>
<br></div></div><span class="">_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><pre>Jingjing Chen [ <a href="mailto:chenjj235@gmail.com" target="_blank">chenjj235@gmail.com</a> ]
Department of Astronomy
Columbia University
550 West 120th Street
New York, New York 10027<br>Cell Phone: <a href="tel:%2B1%28347%295746709" value="+13475746709" target="_blank">+1(347)5746709</a><br></pre></div></div>
</font></span></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>