DS9

CXC Science Data Systems

Reading and writing data - simple FITS files

Command:-
Menu:File - Open
Description:Open a file. Brings up a dialog box in which the user enters the file name to be opened.The left pane of the box shows subdirectories that you can navigate to, and the right paneshows files available in the current directory. You can click on one of these displayed filesor just type the filename in the selection box.By default only filenames ending in .fits, etc, are shown. However in Unix it's perfectly fineto use files with arbitrary suffix or no suffix at all, so you may perfer to click the "All"checkbox below the selection pane.Then click OK to load the selected file. If it is read successfully, a subset of its main image(in fact the first FITS HDU containing a non-null image) willbe displayed in the main image pane and the info panel will be updated appropriately.The FITS OBJECT and UNITS keywords will be used to fill the corresponding entries in the info panel.Keywords BSCALE and BZERO will be used to scale the data as it is read in. Keyword BLANK will beused t

Command:url [value]
Menu:File - Open As - URL
Description:Open an image on a remote site via a URL

Command:save fits [filename]
Menu:File - Save
Description:Save the current image as a FITS file.A file selection dialog appears to pick the output filename. Once thisis chosen, press OK.

Command:save fits [filename] image|table
Menu:File - Save
Description:Save the current event list (table) as a FITS image or FITS table.A file selection dialog appears to pick the output filename. Once thisis chosen, press OK. If the current data is a table (event list), after this a secondsmall dialog appears allowing you to select Image or Table.

Command:saveimage fits [filename]
Menu:File - Save Image - FITS
Description:Saves only the part of the image currently displayed, as a FITS file.

Command:preserve pan yes|no
Menu:File - Preserve during Load - Pan
Description:Preserve the pan attributes while loading a new image

Command:preserve regions yes|no
Menu:File - Preserve during Load - Region
Description:Preserve existing displayed regions while loading a new image

Qualified filenames

DS9 also accepts a 'qualified filename string' of the form

filename[ext][sect]

where [ext] is an extension name (EXTNAME keyword value) or extension number (1 to n) and [sect] defines a subset of the image. The syntax of the [sect] token is

[xspec,yspec,block,zspec]

Each specification is either

Some examples:

foo.fits[10:200,40:100]           # Subset of 2D image
foo.fits[*,40:100]                # 2D image with y subset
foo.fits[*,*,4]                   # Full image blocked by 4
foo.fits[100:200,40:100,5:20]     # Cube subset
foo.fits[100:200,40:100,2,5:20]   # Cube subset, blocked by 2
foo.fits[256@500,256@512]         # 256 x 256 region around 500,512
foo.fits[4][10:200,40:100]        # image subset in HDU extension 4 of the file