5 Command-line control and tools

Remote control

The most useful of the remote control scripts are the commands:

splatdisp takes the name of a spectrum and displays it. If a plot identifier is given after the spectrum name (this is the n in any names like <plotn> that you see) then you can add a spectrum to an existing plot.

splatdispmany takes a list of spectra and displays them all in a new plot, much like giving a list of spectra on the command-line when starting SPLAT-VO. The obvious uses of these commands are to have very basic remote control from any scripts that require display facilities.

Both of these commands are available as a standard part of SPLAT-VO i.e. you can just type in their names, just like the splat command. Command-line usage instructions are available either by typing in the command name, or by inspecting the comments in the file. This is true of all the following commands too.

More sophisticated control of how the spectrum, once plotted, can be displayed is provided by the following scripts:

zoomandcentre changes the zoom factor of the wavelength axis and optionally centres it on a given wavelength.

setcolour allows you to change the display colour of a spectrum.

setproperty is quite similar to setcolour but it also allows you to set the line thickness, type and style, as well as whether to display error bars.

Plugins

The one useful example plugin (i.e. code that is loaded into SPLAT-VO when it starts up) provides the ability to name a list of spectra in a directory that should be automatically loaded when SPLAT-VO starts up in that directory (this includes a special indicator to load all spectra).

To use this you need to do the following:

    % setenv SPLAT_PLUGINS $SPLAT_DIR/example_plugin3.bsh

Now when SPLAT-VO starts it will look for a file .splat_autoloads in the current directory and if found it will read the lines (each of which are assumed to contain a file name) from it to construct a list of spectra to display. If the file only has one line “*” then all the NDFs are automatically loaded. If you’d like other types of spectra to be automatically loaded take a copy of example_plugin3.bsh and modify the FILE_PATTERN definition line. Now re-define SPLAT_PLUGINS to point at your copy.

Command-line SPLAT-VO

$SPLAT_DIR also contains several command-line scripts that only make use of SPLAT-VO classes, so don’t need SPLAT-VO to be running. These are:

which as you might expect fit gaussians to lines and just locate accurate line positions from a initial list. Just run the commands without any arguments to get usage instructions. Look at the script headers for more details.

A one-off command that is currently only available as a script, but may become available as part of a proper toolbox is:

This fits a blend of spectral lines using a multi-component model, based on any of the three spectral line profiles supported by SPLAT-VO (Gaussian, Lorentz, Voigt). See the contents of this file for instructions on how to use it.