[yt-dev] Issue with PlotWindow and Callbacks

Matthew Turk matthewturk at gmail.com
Wed Jul 11 22:06:25 PDT 2012


Hi Nathan and John,

What if the quiver callback simply popped any newly generated fields
when it was done?  That's what we do for the grids when calculating
derived fields.

-Matt

On Wed, Jul 11, 2012 at 10:05 PM, Nathan Goldbaum <nathan12343 at gmail.com> wrote:
> Hi John,
>
> I haven't tested the quiver callbacks yet and I'm not particularly surprised
> that they're a bit broken.
>
> Your list should probably be attached to every instance PWViewer so that it
> is accessible by the CallbackWrapper.  At line 638 you can set the fields to
> plot to be self._frb.data.keys() minus the fields included in your new list.
>
> It might be a bit tricky to generate the list since the callbacks are
> generated dynamically.  Maybe the thing to do is inspect
> self._frb.data.keys() before and after the callback is called inside
> PWViewerMPL._setup_plots() (line 689 in my version of plot_window.py).
>
> Please let us know if you run into any difficulties.
>
> Cheers,
>
> Nathan
>
>
> On 7/11/12 9:52 PM, John Zuhone wrote:
>>
>> Hi all,
>>
>> I've found an issue with PlotWindow and callbacks. The example script I
>> have included adds velocity vectors on top of a slice:
>>
>> http://paste.yt-project.org/show/2544/
>>
>> Later on in the script, I try to resize the plot, but I get this error:
>>
>> http://paste.yt-project.org/show/2545/
>>
>> This is because the field list now includes x-velocity and y-velocity, but
>> there are not any plots corresponding to these fields in the list. I figure
>> that the answer to this is to retain some sort of field list that
>> corresponds to the fields that are actually being plotted in the colorscale,
>> but I figured before I just went in and dropped it in somewhere I'd ask for
>> opinions as to where it should go.
>>
>> Best,
>>
>> John Z
>>
>> --
>> John ZuHone
>>
>> Postdoctoral Researcher
>> NASA/Goddard Space Flight Center
>>
>> jzuhone at gmail.com <mailto:jzuhone at gmail.com>
>> john.zuhone at nasa.gov <mailto:john.zuhone at nasa.gov>
>>
>>
>>
>> _______________________________________________
>> yt-dev mailing list
>> yt-dev at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>
>
>
> _______________________________________________
> 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