class sunpy.visualization.animator.ImageAnimatorWCS(data, wcs=None, image_axes=[-1, -2], unit_x_axis=None, unit_y_axis=None, axis_ranges=None, **kwargs)[source] [edit on github]

Bases: sunpy.visualization.animator.ImageAnimator

Animates N-dimensional data with the associated astropy.wcs.WCS information.

The following keyboard shortcuts are defined in the viewer:

  • ‘left’: previous step on active slider.

  • ‘right’: next step on active slider.

  • ‘top’: change the active slider up one.

  • ‘bottom’: change the active slider down one.

  • ‘p’: play/pause active slider.

This viewer can have user defined buttons added by specifying the labels and functions called when those buttons are clicked as keyword arguments.

  • data (numpy.ndarray) – The data to be visualized.

  • image_axes (list, optional) – A list of the axes order that make up the image.

  • unit_x_axis (astropy.units.Unit) – The unit of X axis.

  • unit_y_axis (astropy.units.Unit) – The unit of Y axis.

  • axis_ranges (list of physical coordinates for the numpy.ndarray, optional) – Defaults to None and array indices will be used for all axes. The list should contain one element for each axis of the numpy.ndarray. For the image axes a [min, max] pair should be specified which will be passed to matplotlib.pyplot.imshow as an extent. For the slider axes a [min, max] pair can be specified or an array the same length as the axis which will provide all values for that slider.


Extra keywords are passed to ArrayAnimator.

Methods Summary


Sets up a plot of initial image.

update_plot(val, im, slider)

Updates plot based on slider/array dimension being iterated.

Methods Documentation

plot_start_image(ax)[source] [edit on github]

Sets up a plot of initial image.

update_plot(val, im, slider)[source] [edit on github]

Updates plot based on slider/array dimension being iterated.