Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: 14 December 2016

How do I create a contour plot of an image?


Contour plots of FITS images can be created using either make_figure or add_contour:

make_figure("img.fits")
make_figure("img.fits", [1,2,3])
make_figure("img.fits", [1,2,3], ["color","red"])

add_contour("img.fits")
add_contour("img.fits", [1,2,3])
add_contour("img.fits", [1,2,3], ["color","red"])

These commands create a contour plot of the image img.fits using: a set of default contour levels calculated from the image, the contour levels 1,2,3, and the contour levels 1,2,3 along with using a red color to draw the contours.

The add_ds9_contour routine can be used to draw contour files created by ds9.

The ChIPS Gallery

More examples can be seen in the ChIPS Gallery.

[NOTE]
Unsupported WCS projections

The add_contour, add_image, and make_figure commands will warn you if given an image with an unsupported WCS projection (that is, everything but a tangent-plane projection), and fall back to using the physical or logical systems. An example of the warning is:

chips WARNING: Unable to use world transform - RA---SIN, DEC--SIN is an unsupported type. Using physical transform.


Last modified: 14 December 2016
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.