How do I start using Starlink software?

You can download the Starlink suite of data reduction, analysis and visualisation tools from http://starlink.eao.hawaii.edu. Binary installations are produced for Mac OSX and for Linux Centos-6 compatible systems.

Before you can use the Starlink software in a terminal, you will have to set it up in the current terminal session. If you are running a sh derived shell( sh, bash or ksh) please enter the following commands into your current terminal session:

```export STARLINK_DIR=/path/to/your/starlink/installation

If you’re using a csh derived shell (csh or tcsh) please instead run the following commands:

```setenv  STARLINK_DIR /path/to/your/starlink/installation

After running these commands, you will be able to start running Starlink commands in the current terminal. If you switch to a new terminal, you will need to repeat those commands before you can run Starlink software. We do not recommend setting these files up in your standard login configuration scripts, as there are name conflicts between some Starlink software and some commonly used linux software — for example, we have a command named ‘convert’ which allows use of astronomy-specific file format conversions. This would conflict with the common command ‘convert’ from ImageMagick.

Under Linux, the starlink set up will also include Starlink libraries in the  LD_LIBRARY_PATH variable, and these can conflict with other packages such as CASA. By only setting up the software in a specicifc terminal, you can have one terminal running Starlink and another running software such as CASA without any conflicts.

Once Starlink is setup, you can run commands and load the various Starlink packages. For example, to run commands from the package KAPPA you would simply type the command kappa into your terminal, and you would be shown the following output:

```\$ kappa
KAPPA commands are now available -- (Version 2.3)

Type kaphelp for help on KAPPA commands.
Type 'showme sun95' to browse the hypertext documentation.

See the 'Release Notes' section of SUN/95 for details of the

Converting frequency and velocity frames

For details on the various frequency and velocity definitions and rest frames used in JCMT heterodyne observations, please see our Velocity Considerations page.

Common requests:

1. to convert processed data from the JCMT Science Archive, which is in Barycentric frequency, into radio line-of-sight velocity ($v_{lsr}$) in LSRK. You can use the following Starlink commands to do this, assuming you have started with a file named ‘archive_file.fits’. These would be copied into a terminal, after setting up the Starlink software within that terminal. The lines starting with a # symbol are comments.
```# Load the convert package to enable conversion from FITS to NDF
convert

fits2ndf archive_file.fits archive_file.sdf

# Load the KAPPA package (contains many useful routines)
kappa

# Set the 3rd axis of the coordinate system to be in units of radio velocity

# Set the standard of rest to be the LSRK
wcsattrib ndf=archive_file.sdf mode=set name=StdofRest newval=LSRK

# OPTIONAL: if fits output is required, convert the file back to fits
```makecube <rawdatafile00099> system=GAPPT alignsys=TRUE out=out99.sdf