Last modified: 12 December 2018

Can I use a contour file created by ds9?


The CIAO scripts package, available from the Scripts page, provides the add_ds9_contours routine as part of the chips_contrib.utils module. This command will plot up the contours from a DS9 contours file (e.g. ds9.con) with optional coordinate conversion (for example, to allow you to display contours saved in equatorial coordinates on an image displayed in physical coordinates.

from chips_contrib.utils import *
clear()
add_image("img.fits")
add_ds9_contours("ds9.con")

One reason for doing this is that it lets you use ds9 to create contours for an image with a WCS projection that is not supported by ChIPS (e.g. SIN), and then display them directly, or on top of an image in ChIPS.

Examples: Displaying contours from DS9; Reading in data from FITS and ASCII files.