#### 4.1 Handling 2 and 3D data

If you have images or cubes that contain data that you want to view as spectra in some fashion, then SPLAT-VO will attempt to do this for you. There are three fundamental modes for doing this:

• Collapsing images into a spectrum or the planes of a cube into a set of spectra by adding together all values that lie perpendicular to the dispersion axis (so the spectra run along this axis, what a good spectral displaying tool should do).
• Extracting all spectra from each data line running along the dispersion axis of images and cubes.
• Vectorizing the whole data set into a single data line without any reference to its dimensionality (in effect mapping the whole image/cube as a single contiguous data line).

The default is to collapse. When collapsing cubes you have the option of which axis to step along selecting image planes, this is known as the select axis. To determine which option is used to handle your cubes or images you can either set values on the command-line, along with your spectra, or choose options in the open file dialogue. A command line that uses axis 3 as the dispersion axis and steps along axis 2 when choosing image planes might look like:

% splat --ndaction collapse --dispax 3 --selectax 2 <spectral_cube> &

or in shorthand:

% splat -n c -d 3 -s 2 <spectral_cube> &

If you don’t choose a dispersion axis SPLAT-VO will make a good intelligent guess about this and step along the first axis that isn’t the dispersion axis. The other possible values for ndaction are extract and vectorize. These are described as extract all spectra and open whole as 1D, respectively, in the open file dialogue.