+2

Data cube plot in the python command line

Becky Smethurst 8 years ago updated by Adam Ginsburg 8 years ago 1

Currently, with a data cube (e.g. IFU data) you can open up an ipython notebook and implement a slider widget to slide through your data cube but this is not possible on the python command line. I'd like a function, similar to a matplotlib function that would plot the datacube and provide a slider in the python plot window to move through the cube for ease of visualisaiton.


e.g.


>>> from matplotlib import datacubeplot

>>> from astropy.io import fits


>>> data = fits.open('mydatacube.fits')


>>> plt.figure()

>>> datacubeplot(data)

>>> plt.show()

This belongs in `spectral-cube` and partly exists in `pvextractor`. @astrofrog, should we port the pvextractor viewer into spectral-cube or do something more readily compatible with glue?