[yt-dev] summing over phase plot and total quantity discrepancies

Matthew Turk matthewturk at gmail.com
Wed Mar 6 16:41:40 PST 2013


Hi Geoffrey

On Wed, Mar 6, 2013 at 4:38 PM, Geoffrey So <gsiisg at gmail.com> wrote:
> I'm trying to use add_phase_object to get a 2D distribution and summing over
> the y axis to see the total quantity in each x bins.  I am using the old
> plot collection to do the phase distribution because it is parallelized, the
> binned2D is serial I believe.

If you specify lazy_reader = True it will be run in parallel.

>
> I'm checking the numbers by using TotalQuantity which sums all the cells in
> the simulation, and I should get the same number when I sum over the color
> axis of the phase plot (I'm assuming this is true, can someone also verify
> the logic?), but I am getting slightly different number.  More curious, is
> when the y axis is the same as the color axis, I get different numbers as
> when the axis names are different.  I first saw the discrepancy using other
> fields, but in this script I am demonstrating with fields that everyone
> should have access to in an Enzo simulation.
>
> http://paste.yt-project.org/show/3222/
>
> Can someone run the script very quick and verify that they get different
> numbers printed on screen?

I can't right now, but what if you specify a dtype in the call to
sum() ?  For instance:

.sum(dtype="float64")

-Matt

>
> Is there an easier way to do what I'm trying to do in parallel?
>
> From
> G.S.
>
> PS: This issue is in both dev-yt I have on my laptop and on Gordon
>
> my laptop uses:
> changeset:   6566:6794b2798b5a
> branch:      yt
> tag:         tip
> user:        Matthew Turk <matthewturk at gmail.com>
> date:        Wed Oct 24 15:58:34 2012 -0400
> summary:     Swap out get_smallest_dx for 8192.  Should fix the buildbot.
> Gordon I have:
> changeset:   7124:4151cc9ff9b2
> branch:      yt
> tag:         tip
> user:        Kacper Kowalik <xarthisius.kk at gmail.com>
> date:        Sat Feb 02 11:03:07 2013 +0100
> files:       yt/utilities/logger.py
> description:
> Add `NullHandler` to `ytLogger` when stream logging is suppresed. Fixes #492
>
> _______________________________________________
> yt-dev mailing list
> yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>



More information about the yt-dev mailing list