Re: [yt-users] Plot 2D magnetic field lines

Hi, Is there a way to do annotate streamlines and use get_multi_plot with yt 3.1? The single-plot example below works for me, but it doesn't work with this example of get_multi_plot (i.e. annotations are not carried over): http://yt-project.org/docs/3.1/cookbook/complex_plots.html#multipanel-with-a... Sorry if this was already answered in the mailing list archive somewhere, the user discussion archives is still unsearchable: Forbidden You don't have permission to access /pipermail/yt-users-spacepope.org/ on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Thanks! Stella On Tue, Apr 28, 2015 at 9:05 AM, David Collins <dcollins4096@gmail.com> wrote:
Hi, Dominik--
What was the yt command you used to make the streamlines and generate the error you sent? I used the following and it was successful:
ds = yt.load('DD0004/data0004') proj = yt.ProjectionPlot(ds,2,'density') proj.annotate_streamlines('Bx','By')
and it made this image: http://imgur.com/eZQmqTB Can you try the above and let me know if it works?
d.
On Tue, Apr 28, 2015 at 2:58 AM, Dominik Derigs <derigs@ph1.uni-koeln.de> wrote:
Hi together,
I want to use yt for plotting magnetic field lines in FLASH simulations from 2D simulations and slices from 3D simulations. An example of what it could look like can be seen here: http://aprg.mae.ufl.edu/wp-content/uploads/2014/07/tang_51.png
I tried to use yt's streamline function, but this does not work for me: http://yt-project.org/doc/visualizing/streamlines.html
The error shown is: ValueError: operands could not be broadcast together with shapes (9,9,2) (9,9,95) (9,9,2)
The used FLASH file is attached.
Thanks a lot
Dominik
-- Dominik Derigs I. Physikalisches Institut Universität zu Köln Zülpicher Straße 77 50937 Köln GERMANY
Tel. (+49|0) 221 470-8352 Fax. (+49|0) 221 470-5162
Diese Email ist vertraulich und nur für den angegebenen Empfänger bestimmt. Zugang, Freigabe, die Kopie, die Verteilung oder Weiterleitung durch jemand anderen außer dem Empfänger selbst ist verboten und kann eine kriminelle Handlung sein. Bitte löschen Sie die Email, wenn Sie sie durch einen Fehler erhalten haben und informieren Sie den Absender.
This email and any files transmitted with it may contain confidential and/or privileged material and is intended only for the person or entity to which it is addressed. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you have received this email in error, please notify the sender immediately and delete this material from all known records.
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- -- Sent from a computer.
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

On Mon, May 4, 2015 at 11:43 AM, Stella Offner <offner@gmail.com> wrote:
Hi,
Is there a way to do annotate streamlines and use get_multi_plot with yt 3.1? The single-plot example below works for me, but it doesn't work with this example of get_multi_plot (i.e. annotations are not carried over):
http://yt-project.org/docs/3.1/cookbook/complex_plots.html#multipanel-with-a...
Hi Stella, With a bit of fiddling, I was able to get this to work in the latest development version of yt, although I think it should work in 3.1 as well, see: http://paste.yt-project.org/show/5532/ This is a bit tricky, since it depends sensitively on details of how matplotlib stores imshow plots and that way we interface with that in the streamline callback. It might be worthwhile to add a new cookbook script using this example - we'd be very grateful for any docs improvements you might want to make!
Sorry if this was already answered in the mailing list archive somewhere, the user discussion archives is still unsearchable: Forbidden
You don't have permission to access /pipermail/yt-users-spacepope.org/ on this server.
Additionally, a 404 Not Found error was encountered while trying to use an
ErrorDocument to handle the request.
This has come up a few times before although the lack of mailing list archives might make that hard to discover! It's an issue with our ISP. Matt has been sending them angry e-mails for a while now.... -Nathan
Thanks! Stella
On Tue, Apr 28, 2015 at 9:05 AM, David Collins <dcollins4096@gmail.com> wrote:
Hi, Dominik--
What was the yt command you used to make the streamlines and generate the error you sent? I used the following and it was successful:
ds = yt.load('DD0004/data0004') proj = yt.ProjectionPlot(ds,2,'density') proj.annotate_streamlines('Bx','By')
and it made this image: http://imgur.com/eZQmqTB Can you try the above and let me know if it works?
d.
On Tue, Apr 28, 2015 at 2:58 AM, Dominik Derigs <derigs@ph1.uni-koeln.de> wrote:
Hi together,
I want to use yt for plotting magnetic field lines in FLASH simulations from 2D simulations and slices from 3D simulations. An example of what it could look like can be seen here: http://aprg.mae.ufl.edu/wp-content/uploads/2014/07/tang_51.png
I tried to use yt's streamline function, but this does not work for me: http://yt-project.org/doc/visualizing/streamlines.html
The error shown is: ValueError: operands could not be broadcast together with shapes (9,9,2) (9,9,95) (9,9,2)
The used FLASH file is attached.
Thanks a lot
Dominik
-- Dominik Derigs I. Physikalisches Institut Universität zu Köln Zülpicher Straße 77 50937 Köln GERMANY
Tel. (+49|0) 221 470-8352 Fax. (+49|0) 221 470-5162
Diese Email ist vertraulich und nur für den angegebenen Empfänger bestimmt. Zugang, Freigabe, die Kopie, die Verteilung oder Weiterleitung durch jemand anderen außer dem Empfänger selbst ist verboten und kann eine kriminelle Handlung sein. Bitte löschen Sie die Email, wenn Sie sie durch einen Fehler erhalten haben und informieren Sie den Absender.
This email and any files transmitted with it may contain confidential and/or privileged material and is intended only for the person or entity to which it is addressed. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you have received this email in error, please notify the sender immediately and delete this material from all known records.
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- -- Sent from a computer.
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

On Mon, May 4, 2015 at 2:01 PM, Nathan Goldbaum <nathan12343@gmail.com> wrote:
On Mon, May 4, 2015 at 11:43 AM, Stella Offner <offner@gmail.com> wrote:
Hi,
Is there a way to do annotate streamlines and use get_multi_plot with yt 3.1? The single-plot example below works for me, but it doesn't work with this example of get_multi_plot (i.e. annotations are not carried over):
http://yt-project.org/docs/3.1/cookbook/complex_plots.html#multipanel-with-a...
Hi Stella,
With a bit of fiddling, I was able to get this to work in the latest development version of yt, although I think it should work in 3.1 as well, see:
http://paste.yt-project.org/show/5532/
This is a bit tricky, since it depends sensitively on details of how matplotlib stores imshow plots and that way we interface with that in the streamline callback.
It might be worthwhile to add a new cookbook script using this example - we'd be very grateful for any docs improvements you might want to make!
Sorry if this was already answered in the mailing list archive somewhere, the user discussion archives is still unsearchable:
Forbidden
You don't have permission to access /pipermail/yt-users-spacepope.org/ on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
This has come up a few times before although the lack of mailing list archives might make that hard to discover! It's an issue with our ISP. Matt has been sending them angry e-mails for a while now....
I got an email today saying it was resolved, and should be back online today.
-Nathan
Thanks! Stella
On Tue, Apr 28, 2015 at 9:05 AM, David Collins <dcollins4096@gmail.com> wrote:
Hi, Dominik--
What was the yt command you used to make the streamlines and generate the error you sent? I used the following and it was successful:
ds = yt.load('DD0004/data0004') proj = yt.ProjectionPlot(ds,2,'density') proj.annotate_streamlines('Bx','By')
and it made this image: http://imgur.com/eZQmqTB Can you try the above and let me know if it works?
d.
On Tue, Apr 28, 2015 at 2:58 AM, Dominik Derigs <derigs@ph1.uni-koeln.de> wrote:
Hi together,
I want to use yt for plotting magnetic field lines in FLASH simulations from 2D simulations and slices from 3D simulations. An example of what it could look like can be seen here: http://aprg.mae.ufl.edu/wp-content/uploads/2014/07/tang_51.png
I tried to use yt's streamline function, but this does not work for me: http://yt-project.org/doc/visualizing/streamlines.html
The error shown is: ValueError: operands could not be broadcast together with shapes (9,9,2) (9,9,95) (9,9,2)
The used FLASH file is attached.
Thanks a lot
Dominik
-- Dominik Derigs I. Physikalisches Institut Universität zu Köln Zülpicher Straße 77 50937 Köln GERMANY
Tel. (+49|0) 221 470-8352 Fax. (+49|0) 221 470-5162
Diese Email ist vertraulich und nur für den angegebenen Empfänger bestimmt. Zugang, Freigabe, die Kopie, die Verteilung oder Weiterleitung durch jemand anderen außer dem Empfänger selbst ist verboten und kann eine kriminelle Handlung sein. Bitte löschen Sie die Email, wenn Sie sie durch einen Fehler erhalten haben und informieren Sie den Absender.
This email and any files transmitted with it may contain confidential and/or privileged material and is intended only for the person or entity to which it is addressed. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you have received this email in error, please notify the sender immediately and delete this material from all known records.
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- -- Sent from a computer.
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (3)
-
Matthew Turk
-
Nathan Goldbaum
-
Stella Offner