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@gmail.com john.zuhone@nasa.gov
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@gmail.com <mailto:jzuhone@gmail.com> john.zuhone@nasa.gov <mailto:john.zuhone@nasa.gov>
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
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@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@gmail.com <mailto:jzuhone@gmail.com> john.zuhone@nasa.gov <mailto:john.zuhone@nasa.gov>
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
That would also work ;) I should probably hold off on suggesting solutions until after dinner... Cheers, Nathan On 7/11/12 10:06 PM, Matthew Turk wrote:
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@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@gmail.com <mailto:jzuhone@gmail.com> john.zuhone@nasa.gov <mailto:john.zuhone@nasa.gov>
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
Matt, Can you point to where this is done? John On Jul 12, 2012, at 1:06 AM, Matthew Turk wrote:
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@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@gmail.com <mailto:jzuhone@gmail.com> john.zuhone@nasa.gov <mailto:john.zuhone@nasa.gov>
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
Sure, it's done in restore_grid_state in yt/data_objects/data_containers.py. I looked into this and it looks to me like the recreate frb function, which calls this get_data_source_fields, is the problem. Once the FRB gets invalidated, it looks at this and gets them back. PR # Also, Nathan, what is the exception you're expecting to catch in the naked try/except block there? On Wed, Jul 11, 2012 at 10:19 PM, John ZuHone <jzuhone@gmail.com> wrote:
Matt,
Can you point to where this is done?
John
On Jul 12, 2012, at 1:06 AM, Matthew Turk wrote:
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@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@gmail.com <mailto:jzuhone@gmail.com> john.zuhone@nasa.gov <mailto:john.zuhone@nasa.gov>
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
Hey Matt, I'm not sure, that try/catch block was added by Jeff Oishi in 97c0e3d2c19d back in 2010. It may not be necessary anymore. Cheers, Nathan On 7/12/12 5:52 AM, Matthew Turk wrote:
Sure, it's done in restore_grid_state in yt/data_objects/data_containers.py.
I looked into this and it looks to me like the recreate frb function, which calls this get_data_source_fields, is the problem. Once the FRB gets invalidated, it looks at this and gets them back. PR #
Also, Nathan, what is the exception you're expecting to catch in the naked try/except block there?
On Wed, Jul 11, 2012 at 10:19 PM, John ZuHone <jzuhone@gmail.com> wrote:
Matt,
Can you point to where this is done?
John
On Jul 12, 2012, at 1:06 AM, Matthew Turk wrote:
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@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@gmail.com <mailto:jzuhone@gmail.com> john.zuhone@nasa.gov <mailto:john.zuhone@nasa.gov>
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
Ah, fair point. Maybe we should try to focus on pushing out 2.4 with the cool new plot window stuff, and we can then go back and clean it up once the API is stable and fixed. Great work, Nathan, Jeff and John! This is going to be fun. I showed the PlotWindow at HIPACC this week. Having shown PlotCollection for a while before tha,t I have to say that it was a very nice change. On Thu, Jul 12, 2012 at 9:58 AM, Nathan Goldbaum <nathan12343@gmail.com> wrote:
Hey Matt,
I'm not sure, that try/catch block was added by Jeff Oishi in 97c0e3d2c19d back in 2010. It may not be necessary anymore.
Cheers,
Nathan
On 7/12/12 5:52 AM, Matthew Turk wrote:
Sure, it's done in restore_grid_state in yt/data_objects/data_containers.py.
I looked into this and it looks to me like the recreate frb function, which calls this get_data_source_fields, is the problem. Once the FRB gets invalidated, it looks at this and gets them back. PR #
Also, Nathan, what is the exception you're expecting to catch in the naked try/except block there?
On Wed, Jul 11, 2012 at 10:19 PM, John ZuHone <jzuhone@gmail.com> wrote:
Matt,
Can you point to where this is done?
John
On Jul 12, 2012, at 1:06 AM, Matthew Turk wrote:
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@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@gmail.com <mailto:jzuhone@gmail.com> john.zuhone@nasa.gov <mailto:john.zuhone@nasa.gov>
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
participants (4)
-
John Zuhone
-
John ZuHone
-
Matthew Turk
-
Nathan Goldbaum