GNU Astronomy Utilities



A.1 SAO DS9

SAO DS9 is not a requirement of Gnuastro, it is a FITS image viewer. It is therefore a useful tool to visually inspect the images/cubes of your Gnuastro inputs or outputs (for tables, see TOPCAT). In Gnuastro we have an installed script to run DS9 or TOPCAT on any number of FITS files (depending on it being an image or table), see Viewing FITS file contents with DS9 or TOPCAT (which also includes a .desktop file for GUI integration). After installing DS9, you can easily use that script to open any FITS file (table, image or cube).

Like the other packages, it might already be available in your distribution’s repositories; but these may be outdated. DS9 is also already pre-compiled for many common operating systems in the download section of its own web page:

  1. Find your operating system in https://ds9.si.edu/download. Here are some tips when trying to find the proper directory:
    • Many GNU/Linux operating systems are compatible with Debian or Fedora, so if you don’t find your operating system’s name, probably the latest Debian or Fedora will also work for you.
    • macOS uses the low-level “Darwin” kernel. Therefore, if you have a macOS, also consider those directories that start with darwin.
    • The CPU architectures (as suffixes) at the end of the directory names can be classified like this:
      x86

      Intel CPUs.

      arm64

      Apple’s M1 CPUs.

  2. With the operating system directories, you will find a compressed tarball that you need to download (choose the latest one).
  3. Unpack the tarball with a command like below:
    $ tar -xf ds9.XXXXXXX.X.X.X.tar.gz
    
  4. This should produce a simple ds9 file. Before installing, it is good to actually test it like below:
    $ ./ds9
    
  5. If the command above opened DS9 with no error, you can safely install it with this command:
    $ rm ds9*.tar.gz
    $ sudo mv ds9* /usr/local/bin
    
  6. Go to your home directory and try running DS9 with the two commands below. If it doesn’t find it, then you need to add /usr/local/bin to your PATH, see Installation directory.
    $ cd
    $ ds9
    

Install without root permissions: If you do not have root permissions, you can simply replace /usr/local/bin in the command above with $HOME/.local/bin. If this directory is not in your PATH, you can simply add it with the command below (in your startup file, e.g., ~/.bashrc). For more on PATH and the startup files, see Installation directory.

export PATH="$HOME/.local/bin:$PATH"

Below you can see a list of known issues in some operating systems that we have found so far. You should be able to identify any potential error when running DS9 from the command-line like above.