ImageAnimatorWCS

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

Bases: sunpy.visualization.animator.ImageAnimator

Deprecated since version 1.1: The ImageAnimatorWCS class is deprecated and may be removed in version 2.1. Use sunpy.visualization.animator.ArrayAnimatorWCS instead.

Animates N-dimensional data with an associated World Coordinate System.

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.

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

  • wcs (BaseLowLevelWCS) – The WCS object describing the physical coordinates of the data.

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

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

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

  • axis_ranges (list, optional) – Defaults to None and array indices will be used for all axes. The list should contain one element for each axis of the input data array. 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.

Notes

Extra keywords are passed to ArrayAnimator.

Methods Summary

plot_start_image(ax)

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]

Sets up a plot of initial image.

update_plot(val, im, slider)[source]

Updates plot based on slider/array dimension being iterated.