[yt-users] Recenter Halo

Britton Smith brittonsmith at gmail.com
Mon Mar 30 12:08:06 PDT 2015


Hi Jingjing,

To add that function to the HaloCatalog analysis, you need to do the
following:

hc.add_callback("sphere_field_max_recenter", "density")

Note, this callback recenters an existing sphere, so you will need to have
added a sphere with:

hc.add_callback("sphere")

Make sure you add the sphere first.  Additionally, you might try the
"iterative_center_of_mass" callback, which will calculate new centers by
calculating the center of mass on a continually smaller sphere.  This one
does not require a sphere callback and will actually write out the
recentered positions.

Britton

On Mon, Mar 30, 2015 at 7:27 PM, Chen Jingjing <chenjj235 at gmail.com> wrote:

> Dear yt-users,
> I am having a little problem on finding the exact center of a halo. I used
> to do
>
> "hc = HaloCatalog(data_ds=data_ds, finder_method='hop')"
>
> to create a halo catalog. But I think the position in the catalog is a
> little bit off the exact center judging from the plots I made. I need the
> exact center to compute the angular momentum so the off-center result could
> cause some problem. I tried to recenter at the maximum gas density by
> adding this line
>
> "hc.sphere_field_max_recenter('density')"
>
> But I got an error, AttributeError: 'HaloCatalog' object has no attribute
> 'sphere_field_max_recenter'.
>
> Can anyone tell me what is the right way to find the center as the
> location of maximum gas density?
>
> Thanks,
> Jingjing
>
>
>
> --
>
> Jingjing Chen [ chenjj235 at gmail.com ]
> Department of Astronomy
> Columbia University
> 550 West 120th Street
> New York, New York 10027
> Cell Phone: +1(347)5746709
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150330/3cd6da13/attachment.htm>
-------------- next part --------------
_______________________________________________
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