[yt-users] YTSphereTooSmall

Matthew Turk matthewturk at gmail.com
Wed May 23 13:46:37 PDT 2012


Hi Geoffrey,

On Thu, May 24, 2012 at 5:40 AM, Geoffrey So <gsiisg at gmail.com> wrote:
> Stephen,
>
> I'm printing the warning message when along with the halo.id as the
> exception is raised, so it appears that halo 5 in this case has a radius
> smaller than dx, but what it really should be checking is the maximum
> instead of the virial radius instead if I'm not mistaken.
>
> Matt,
>
> I just want the field attributes of where the halo is located, and I'm
> comparing the attributes to the region surrounding the halo (up to 3x the
> virial or maximum radius) to see if there's anything that is substantially
> different.  I want to see what's different in the field quantity that
> suppresses star formation in lower mass haloes.  In this analysis the
> detailed shape and size of the sphere doesn't really matter, I'm just using
> it as a data container.
>
> Right now I'm trying to output Density averaged values of each halo but
> whenever I encounter a halo with radius smaller than a cell (triggering
> YTSphereTooSmall), I output 0 for all attributes.  So I expect lots of zeros
> to occur on the small end.  However I'm seeing some zeros scattered even in
> the high mass end with large maximum radius, and I think the high mass halos
> with zeros is the result of it having a small virial radius, at least that's
> my current hypothesis.
>
> I'm going to try to go down the list from the high mass end to see if the
> second halo giving me zeros on the high end also have a virial radius
> smaller than dx.
>
> I guess a work around for this problem temporarily is to
> use pf.h.sphere(halo.center_of_mass(), halo.maximum_radius()) instead of
> calling halo.get_sphere().

That makes sense!  Good luck.  One other option would be to take the
halo center and construct a region, with:

region = pf.h.region(halo_center, halo_center - dx*n_cells,
halo_center + dx*n_cells)

This will get you a rectangular prism.  (You'll need to set n_cells
and dx.)  A quick way to see how many cells it contains is to take a
look at region["Ones"].size, which should be very fast.

-Matt

>
> From
> G.S.
>
>
> On Tue, May 22, 2012 at 6:16 PM, Stephen Skory <s at skory.us> wrote:
>>
>> Hi Geoffrey and Matt,
>>
>> > While I think Stephen might know why the difference between
>> > maximum_radius / virial_radius is confusing the system here,
>>
>> I don't quite know what's going on. halo.get_sphere() should give you
>> a YT sphere centered on the center of mass of the halo, with radius of
>> .maximum_radius(). Perhaps it's not halo 5 that's giving you the
>> error? Or there's an error in what you're printing?
>>
>> > I want to
>> > suggest you back up a bit.  Do you really want to analyze halos that
>> > are O(dx) across?
>>
>> I agree with Matt that you should take a close look at what you are
>> asking from these halos, and if one or just a few cells are sufficient
>> to give you that.
>>
>> --
>> Stephen Skory
>> s at skory.us
>> 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
>
>
>
> _______________________________________________
> 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