4 Supported data formats

 4.1 Handling 2 and 3D data

SPLAT-VO can read and write spectra stored in a wide variety of formats, either stored as 1D spectra or as columns in tables. 1D spectral formats supported are Starlink NDF & NDX, FITS and simple TEXT files. Table formats supported are FITS (binary and ascii), VOTable and more complex TEXT files. The 1D data formats currently have the best coordinate system support, so are recommended when a choice can be made. Some support is available for 2 and 3D data, see later).

Normally SPLAT-VO differentiates these types using a preset list of file extensions, for instance NDFs can only be stored in container files that have the extension .sdf, FITS files usually have one of the extensions .fits or .fit and TEXT files .txt or .lis and NDX format spectra, when stored on disk, will have extension .xml. However, you can choose a specific format when opening a file using the File->Open dialogue, so you can ask that a TEXT file is opened as a table, this allows you to select the columns. There is also a special type known as guess. When you choose that attempts to open the spectrum as different types are made until one succeeds, or the possibilities are exhausted.

You can specify a type for all the spectra opened on the command-line using the --type argument. Valid values for --type are:

    fits
    hds
    text
    hdx
    table
    line ids
    guess

You free to truncate these values as long as they remain unique (so --type line will work for line identifiers).

Currently line identifier catalogues represent a special case and currently may have a single format - TEXT based in files with extension .ids.

1D spectra stored in TEXT files must have the format of one, two or three columns of data, separated by whitespace (that is spaces or tabs). Any comments in the file must be indicated by a hash sign, blank lines are also allowed. The three columns should have the following values:

    [wavelength] count [error-in-count]

The wavelength and error columns being optional (if you don’t have a wavelength column a simple row index is used, note you cannot have errors without wavelengths) . If you choose to open a TEXT file as a table you can select which columns should be used for these values, and the following rules apply:

The format of line identification catalogues is like that of simple TEXT spectral files, except the second column contains a string that identifies the line (with no spaces, i.e. H-alpha not H alpha). It is also possible to define the system of the coordinate values in a header section, see the SPLAT-VO built-in catalogues for examples of this.

NDFs stored within container files can be accessed, but only by entering the full HDS path on the command-line or in the File->Open dialogue. FITS extensions may also be open in this fashion (by appending the extension number in square brackets).

An alternative to specifying the component information is to use the component browser window PIC , to see the contents of FITS and NDF files and choose the component to display directly. This uses the same techniques as the special guess type.

Internally all these formats are stored as double precision coordinates and data values. SPLAT-VO only requires that coordinates increase or decrease monotonically when performing any analyses.

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:

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.