GNU Astronomy Utilities


Previous: , Up: SAO ds9   [Contents][Index]


B.1.1 Viewing multiextension FITS images

The FITS definition allows for multiple extensions inside a FITS file, each extension can have a completely independent data set inside of it. If you ordinarily open a multi-extension FITS file with SAO ds9, for example by double clicking on the file or running $ds9 foo.fits, SAO ds9 will only show you the first extension. To be able to switch between the extensions you have to follow these menus in the SAO ds9 window: File→Open Other→Open Multi Ext Cube and then choose the Multi extension FITS file in your computer’s file structure.

The method above is a little tedious to do every time you want view a multi-extension FITS file. Fortunately SAO ds9 also provides options that you can use to specify a particular behavior. One of those options is -mecube which opens a FITS image as a multi-extension data cube. So on the command-line, if you run $ds9 -mecube foo.fits a small window will also be opened, which allows you to switch between the image extensions that foo.fits might have. If foo.fits only consists of one extension, then SAO ds9 will open as usual.

Just to avoid confusion, note that SAO ds9 does not follow the GNU style of separating long and short options as explained in Arguments and options. In the GNU style, this ‘long’ option should have been called like --mecube, but SAO ds9 does follow those conventions and has its own.

It is really convenient if you set ds9 to always run with the -mecube option on your graphical display. On GNOME 3 (the most popular graphic user interface for GNU/Linux systems) you can do this by taking the following steps:

In case you are using GNOME 2 you can take the following steps: right click on a FITS file and choose Properties→Open With→Add button. A list of applications will show up, ds9 might already be present in the list, but don’t choose it because it will run with no options. Below the list is an option “Use a custom command”. Click on it and write the following command: ds9 -mecube in the box and click “Add”. Then finally choose the command you just added as the default and click the “Close” button.


Previous: , Up: SAO ds9   [Contents][Index]