# ImageAnimatorWCS¶

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

Animates N-dimensional data with the associated astropy WCS object.

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 >= 2D wcs (astropy.wcs.WCS) – The wcs data. image_axes (list) – The two axes that make the image fig (matplotlib.figure.Figure) – Figure to use axis_ranges (list of physical coordinates for array or None) – If None array indices will be used for all axes. If a list it should contain one element for each axis of the numpy array. For the image axes a [min, max] pair should be specified which will be passed to matplotlib.pyplot.imshow() as 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. If None is specified for an axis then the array indices will be used for that axis. interval (int) – Animation interval in ms colorbar (bool) – Plot colorbar button_labels (list) – List of strings to label buttons button_func (list) – List of functions to map to the buttons unit_x_axis (astropy.units.Unit) – The unit of x axis. unit_y_axis (astropy.units.Unit) – The unit of y axis. keywords are passed to imshow. (Extra) –

Methods Summary

 plot_start_image(ax) Sets up 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 plot of initial image.

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

Updates plot based on slider/array dimension being iterated.