About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/contour.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 contour Context: chips

Synopsis

Adds a contour plot to a drawing area.

Syntax

chips> [D #] CONTOUR <filename>[<virtual_file_syntax>] [LEVELS] <lev1>
<lev2> ... <levN>

Description

Argument: D #
Description: drawing area number designation
Options: integer number
Default: current drawing area

See the D command for more information about this argument.

Argument: <filename>
Description: name of datafile and path, if necessary.  If the file 
             contains tabulated data, it must be sorted with row
             precedence (see below).  May be filtered data from a
             FITS image file, as shown in the EXAMPLES.
Argument: <virtual_file_syntax>
Description: A filtering and/or binning command argument.  The
             <virtual_file_syntax> must be surrounded by
             quotes (" ").  

See the CURVE command for more information on this argument.

Argument: <lev1> <lev2> ... <levN>
Description: numbers specifying Z axis values of each contour level
Options: real numbers 
Description: the <lev1> value specifies the Z axis data value of 
             the first contour line, <lev2> specifies the value
             of the second contour line, and so on.  

See the LEVELS command for information on setting the levels in the current contour plot.

Contour plots are considered variants of curves, and therefore the attributes of contours (color, linestyle, scale, width) may be changed in the same manner. However, the limits of the x and y axes in a contour plot cannot be modified.

New functionality for plotting contours was added to ChIPS in CIAO 3.0 via the "chips.mingridsize" state object field; see the "Plotting contours" section of "ahelp chips" for more information.

SORTING THE INPUT DATA

The input data file must be sorted with row precedence. For example, the following data:

1 1 1
2 1 -4.97206e-24
3 1 2
4 1 1
5 1 2
1 2 -6.79138e-24
2 2 -2.23247e-23
3 2 1
4 2 -2.1879e-22
5 2 1

Would have to be re-ordered for use in ChIPS:

1 1 1
1 2 -6.79138e-24
2 1 -4.97206e-24
2 2 -2.23247e-23
3 1 2
3 2 1
4 1 1
4 2 -2.1879e-22
5 1 2
5 2 1

Example 1

chips> CONTOUR data/sorted.dat 2 4 20

Plots the ASCII data file data/sorted.dat as a contour plot, with the first contour line at a Z-axis value of 2, the second at a value of 4, and the third at a value of 20.

Example 2

chips> CONTOUR data/exampleImage.fits[10:100,10:100] 2 4 20

Plots the data in the specified ranges from the FITS file. The Z-axis values are the same as in Example 1.

Example 3

chips> C 1 DEL
You have no more curves in this drawing area.
chips> CONTOUR "data/sorted.fits[cols col1, col2, col3]" 2 4 20
chips> C 1 WIDTH 4.0

The existing curve is deleted before the data in the first three columns of data/sorted.fits is plotted; the same Z-axis values as before are used. The final command changes the contour curve to a thicker width.

Example 4

chips> CONTOUR s3_img.fits 10 20 30   

A contour plot is created from the filtered data stored in "s3_img.fits".

Example 5

chips> CONTOUR data/data3D.dat 40 50 60
chips> C 1 DOT
chips> CONTOUR data/data3D.dat 70 80 90
chips> C 2 LONGDASH

Two contour curves are plotted with different Z-axis values. The linestyle of each is changed so that the levels may be differentiated.

Bugs

See the bugs page for ChIPS on the CIAO website for an up-to-date listing of known bugs.

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



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