|
|
|
|
SynopsisCreates a contour. Syntaxadd_contour( [ChipsId,] filename [,attributes]) add_contour( [ChipsId,] IMAGECrate [,attributes]) add_contour( [ChipsId,] data-array, x-dim, y-dim [,levels] [, trans] [,attributes]) Description
The add_contour command creates a contour whose attributes are specified by user preferences or in an attribute list. The new contour becomes current by default; providing a ChipsId overrides the currency state. The data-array is a one-dimensional array of data points to be contoured. The array is treated as a 2D array by using x-dim and y-dim parameters to set the x and y dimensions. If a transform is set to be applied, the data in data-array is first contoured and then the transform is applied to the contours. Customizing the ContourThere are several attributes that control the contour characteristics. The attributes can be set to the ChIPS defaults, values provided in the add_contour command, or values from the user's preference file. The attributes may also be modified with the set_contour command at any time; see "ahelp py.chips set_contour" and "ahelp py.chips setget" for more information. The attributes associated with contours are:
Example 1
chips> add_contour("img.fits")Create contours from the file "img.fits". Equally-spaced levels are generated that cover the fullpixel range of the image. If the image contains WCS information, then it will be used for the X and Y axes; in this case you may wish to change the tick label format to use sexagesimal notation by saying: chips> set_xaxis(["tickformat","ra"]) chips> reverse_axes(X_AXIS) chips> set_yaxis(["tickformat","dec"]) Example 2
chips> add_contour("img.fits", [10,20,30])Create contours from the file "img.fits". Three contours are drawn, at levels of 10, 20, and 30. Example 3
chips> add_contour("img.fits", ["color","green","thickness,2])Create contours from the file "img.fits". Set the contour color to green and the thickness to 2. Example 4
chips> add_contour("img.fits", [10,20,30],
["color","green","thickness,2])Create contours from the file "img.fits". Set the contour levels to 10, 20, 30, the contour color to green, and the thickness to 2. Example 5
chips> add_contour("img.fits", [10,20,30], ["wcs","logical"])Create contours from the file "img.fits" using the specified contour levels. Use the logical coordinate system - namely the pixel numbers - for the axes. Example 6
chips> img = read_file("contours.img")
chips> add_contour(img)Create contours from the file "contours.img" via CRATES. Example 7chips> add_contour([[1,1,1], [1,3,1], [1,1,1]], 3,3) The 3 by 3 array is contoured with equally-spaced levels. Example 8chips> add_contour([[1,1,1], [1,3,1], [1,1,1]], 3,3,["color","lime","style","solid"]) Add a contour with line color and style attributes specified. Example 9chips> ci = ChipsContour() chips> ci.color = "lime" chips> ci.style = "solid" chips> add_contour([[1,1,1], [1,3,1], [1,1,1]], 3,3, ci) Add a contour with line color and style attributes specified via settings in the ChipsContour object. Example 10chips> add_contour([[1,1,1], [1,3,1], [1,1,1]], 3,3, [1.1,1.5,2,2.5]) chips> set_contour(["color","lime", "style","solid"]) Add a contour using user-specified levels, line color, and style attributes. BugsSee the bugs pages on the ChIPS website for an up-to-date listing of known bugs. |
![]() |
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. |