Exploring Data Cubes

Immediately after your data reduction it is useful to explore your data before starting the analysis. Are the observations of what you intended? What are the S/N levels? What kind of things do you data show, and what kind of analysis will need to be done? For this purpose visualisation tools are very useful. Some are quick-look, designed to allow you to see what is going on with your data, others allow for more interactivity (e.g. you can do straightforward mathematics on the spectral or image plane, resample the spaxels…).

It is fairly simple, really, to write a script that will allow you to look at what your data have, but far more useful is to use a ready-written GUI and we list here those we have knowledge of.

CASA Viewer

CASA (Common Astronomy Software Applications) is the software suite being developed for ALMA. Within it is the Viewer application, which is optimised for viewing and exploring data cubes. There has been a project at ESO run by Harald Kuntschner to extend the Viewer to work with optical/near-IR datacubes, and there are now some very nice additions for cube visualisation and basic analysis (gaussian fitting, cube collapsing, etc) that are well worth checking out.
See Chapter 7 of the User Reference and Cookbook for more info.


With version 7, ds9 now contains a new module, encompassed by the new Frame 3D option, which allows users to load and view data cubes in multiple dimensions. Also the area shapes (circle, box, etc) automatically display a summed spectrum over that area.


QFitsView is a FITS file viewer not only for datacube but also 2D images and 1D spectra. It is very easy to install and runs under Microsoft Windows, UNIX and MAC OS-X. It can carry out numerous basic analysis operations. It is a must-have for quick look and analysis of FITS datacube. It can be found here.

Note that for SINFONI data, the reduced science FITS cube provided in the service mode package are already formatted correctly for viewing with QFITSView. Note also that the VIMOS pipeline product cubes need to be reformatted in order to be viewed with this tool.


Aladin now supports cube visualisation, with a suite of tools and options. See here for more info.


This is a package that the wiki maintainers have not yet used, but from its own website it looks like a very handy visualisation and basic analysis tool. It was developed for the PINGS project (PPAK IFS Nearby Galaxies Survey) and the software can be found on this page. (Its documentation seems pretty good; the need for good documentation is often overlooked!) The package, which runs from IDL, reads in RSS format data. You can explore the data spectrally and spatially, extract regions (including radial regions), and a few other things.

PASEO CubeVisualization

This project aims at providing a visualization tool for IFU data cubes (particularly for MUSE cubes with sizes up to 2.4Gb) and their associated parameters (variance, psf,…). QuickViz is a Java prototype for such a datacube viewer. It was designed as a plug-in application of the Aladin VO application.

E3D vistool (now defunct)

The Euro3D RTN (European Research Training Network from 2003-2005) produced a tool called the "E3D visualisation tool", via the AIP (Astrophysical Institut Potsdam). It allows you to view an 2D image of any wavelength slice, view the full spectrum from any spaxel, spatially resample the data and much more. It handles data of RSS or cube format, or E3D formats if the FITS headers conform to Euro3D standards. The definition of these standards were one of the main aims of the E3D RTN, and can be found on the Euro3D website. The one (big!) drawback of this otherwise excellent tool is that it is extremely difficult to install and get working. This is because it requires installation of various libraries of code, which in themselves need certain standard libraries to work. If your flavour of linux is not quite right and the standard libraries are not quite in the right place, the installation fails. The vistool should install on a Mac, although we've not managed to get it working. Our recommendation is that you ask the maintainers of the vistool to help with the installation if you cannot get it working right away, because once it is working you will find it a very useful tool indeed.

You should also look at the P3D software, which is more a data reduction package but is geographically linked to E3D (it was also developed at the AIP).

If you have data in E3D format but you don't want to use the Euro3D vistool then you might have to convert it into a more standard fits format for use with other gui data visualizers. This python script e3d2cube.py may be a helpful starting point. It converts the data from RSS format (row stacked spectrum, which is 2D) to a cube plus a white light image (FITS format both). In order to work the "E3D" FITS headers have to be in the input file, so that the organisation of the spaxels is known (i.e. what spectrum in the RSS image is what sky position in the cube), as well as spectrum dispersion information (noting that all spectra hence must have the same wavelength grid). The spaxels necessarily need to be square and probably also contiguous, or rather if they are not, it will be assumed that they are. Various E3D headers are necessary for this to work—which these are can be found by reading the python script.

Other, more general options

  • GAIA Starlink IFU data product cookbook — a very good resource. Is a general image viewer (e.g. like ds9) but also will load in cubes and allow one to scroll through the wavelength dimension.
  • Starlink DATACUBE package
  • Karma, which not a dedicated IFS package, rather a general cube viewing package.
  • QuickLook2 is an IDL cube viewer originally developed for OSIRIS at Keck, but which can be used to view any X/Y/lambda FITS data cube. Contact Marshall Perrin at UCLA for tips on configuring this to view GMOS-IFU or SINFONI cubes.
  • In-built IDL tools (e.g. slicer3 — a GUI widget based application to visualise 3D data and which comes with the IDL environment)
  • wavextract IRAF task (from Jeremy Walsh). This takes data in standard data cube format and outputs a FITS image of the summed flux between two specified wavelength values. This is a very useful 'quick look' function. Click here for download and instructions page.

A note on cube vs. RSS format

The cube format is much easier to work with because all the hard work of relating individual spectra to a spatial position has been done, but not all IFS data lend themselves immediately to being a cube format.

For the cube format you will simply treat your data as a very fat image, and either display these images slice by slice (wavelength point by wavelength point) or add together many slices (to improve the SNR) and display those. If your data are still in RSS format — maybe because the spaxels are not contiguous and not square (and so make very awkward 2D slices) — then you will need the "position table" as well as the spectra. The position table should have been provided by the observatory from where you got your data (although not always in a very friendly format), and it is a listing of the sky position (usually relative) of each of the spectra. With this you can take wavelength slices along your spectra (thus producing a list of flux values versus spectral number) and rearrange into an image. This was discussed in a little more detail in our Data Reduction pages.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License