SunPy visualization question

55 views
Skip to first unread message

Ellis Avallone

unread,
Jun 26, 2017, 12:30:11 PM6/26/17
to SunPy
Hello,

I'm currently trying to animate MapCube objects  in order to check for coalignment using the MapCubeAnimator class, and I was wondering if there was any way to save the animation as a .mp4?
I also noticed that the documentation wasn't very thorough. Is this class still in the works, and if so, would be easier to just use matplotlib.animate?

Thanks in advance!
-Ellis

Stuart Mumford

unread,
Jun 27, 2017, 5:49:37 AM6/27/17
to su...@googlegroups.com

Hi Ellis,

The animator class is pretty stable, but the documentation could be better!

You can use the MapCubeAnimator to get a matplotlib.animation.FuncAnimator object with the `get_animation` method: http://docs.sunpy.org/en/latest/generated/api/sunpy.visualization.imageanimator.BaseFuncAnimator.html#sunpy.visualization.imageanimator.BaseFuncAnimator.get_animation

If you have a MapCube you can also use the `MapCube.plot()` method which will return (an almost identical) mpl animation object.

Hope that helps,

Stuart

--
You received this message because you are subscribed to the Google Groups "SunPy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sunpy+un...@googlegroups.com.
To post to this group, send email to su...@googlegroups.com.
Visit this group at https://groups.google.com/group/sunpy.
For more options, visit https://groups.google.com/d/optout.

Ellis Avallone

unread,
Jun 27, 2017, 9:34:30 AM6/27/17
to SunPy
Thank you so much!! That helped a ton.
-Ellis

Ellis Avallone

unread,
Jun 28, 2017, 3:09:02 PM6/28/17
to SunPy
I noticed while playing with MapCubeAnimator a bit more that, while it does accept map.plot() kwargs it does not implement them. I've been trying to change the min and max values of the colormaps in my animation and have been unable to do so using MapCubeAnimator. Do you know why that is?

-Ellis

On Tuesday, June 27, 2017 at 4:49:37 AM UTC-5, Stuart Mumford wrote:

Jack Ireland

unread,
Jun 28, 2017, 8:41:42 PM6/28/17
to su...@googlegroups.com
Ellis,

If you are trying to change vmin and vmax for every map in the mapcube, then you have to change vmin and vmax in each map.  This code:

https://github.com/wafels/eitwave/blob/master/mapcube_tools.py#L55

shows one way of doing this.

Hope this helps,

Jack


To unsubscribe from this group and stop receiving emails from it, send an email to sunpy+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages