[yt-users] Off-axis projections using Homogenized Volumes and a weight field

Matthew Turk matthewturk at gmail.com
Mon May 7 04:44:02 PDT 2012


Hi Cameron,

I think Britton's on the right track -- either it's getting divided by
zero or overflowing during the weight process.  If your fields are 32
bit instead of 64, this is a distinct possibility.  I'd recommend
seeing if casting inside the weight-field-creator inside
off_axis_projection to float64 (with an .astype("float64")) fixes it.

-Matt

On Sun, May 6, 2012 at 4:20 PM, Britton Smith <brittonsmith at gmail.com> wrote:
> Hi Cameron,
>
> I don't know what's going on in that code, but it sounds like maybe the
> projection of the weight field, which goes in the denominator, is
> calculating zeros.  One thing you could do until we find out what's wrong is
> to make unweighted projections of custom fields that are (Field *
> Weight_Field) and Weigh_Field and then do the division on your own.
>
> Britton
>
>
> On Sat, May 5, 2012 at 6:35 PM, Cameron Hummels
> <chummels at astro.columbia.edu> wrote:
>>
>> Hello everyone,
>>
>> I'm currently trying to generate an off-axis projection using a
>> homogenized volume as an input, instead of the default kd-tree method.  I
>> have no problems using this method, until I try to add a weight field to the
>> projection, then it simply returns "Inf" values for each pixel.  I checked,
>> and the exact same source using the kd-tree method works with no problems
>> (it's just slower because I'm running this on a small subset of the overall
>> dataset).  Do I need to do something special when I create the homogenized
>> volume to take into account the additional weighting field?  I didn't see a
>> function parameter for a weight in the constructor for HomogenizedVolume,
>> and looking at the source doesn't provide any obvious clues, but perhaps I
>> just need to code it in.  Suggestions?
>>
>> Cameron
>> _______________________________________________
>> 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