[yt-users] Phase plot question
David Collins
dcollins at physics.ucsd.edu
Thu Jul 7 11:20:51 PDT 2011
> Would you mind checking if BinnedProfile2D._data['zfield'][512,:] and
> [:,512] has non-zero values for your data? I just checked with one of mine
It is. That's what I sort of expected, but wanted to double check.
Thanks a ton!
d.
> and it seems to be zeros. Looking at the source in
> yt/data_objects/profiles.py, I think this is just a bug of creating the
> fields one too large.
> def _get_empty_field(self):
> return na.zeros((self[self.x_bin_field].size,
> self[self.y_bin_field].size), dtype='float64')
> and it should be:
> def _get_empty_field(self):
> return na.zeros((self[self.x_bin_field].size-1,
> self[self.y_bin_field].size-1), dtype='float64')
>
> since the x_bin_field has the end values. That said I believe Xbins[I] <
> Xvalue <
> Xbins[I+1] is correct, and until we verify and get rid of the last bin in
> the zfield you can just ignore it.
> Sam
>
>
> On Thu, Jul 7, 2011 at 11:25 AM, david collins <antpuncher at gmail.com> wrote:
>>
>> Hi --
>>
>> I have a dumb question about the contents of the _data member of a
>> BinnedProfile2D. I feel like I may have asked this question before,
>> but I didn't see it in my archive, sorry if this is a dumb one.
>>
>> Why is the size of the Z array the same as Xbins \cross Ybins? For
>> instance, I asked for 512 bins in both X and Y between X1,X2 and
>> Y1,Y2. This gives me 513 bins in the Xbins array, as I expect (same
>> for Y). But the Z array is also 513x513. My assumption has been that
>> in Zarrray[I,J] is the value of Zvalue with Xbins[I] < Xvalue <
>> Xbins[I+1], but that should give me 512 bins for the Z array. What's
>> the extra bin for?
>>
>> Thanks,
>> d.
>>
>> --
>> Sent from my computer.
>> _______________________________________________
>> 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
>
>
--
Sent from my computer.
More information about the yt-users
mailing list