|
|
|
|
SynopsisRetrieves the attribute value(s) of the contour. Syntaxget_contour() get_contour(id [,attribute]) Description
The get_contour command returns a structure containing all the attribute values of the contour. To retrieve the value of a specific attribute, provide the attribute name and the id or ChipsId of the object. Some values are set to "None" in the returned structure. These entries generally correspond to attributes which may only be modified at creation time, such as the object id. The attributes associated with contours are:
Data RangeThe get_contour_range command returns the X and Y ranges of the current contour. The values are returned as [xmin, xmax, ymin, ymax]. There are also individual commands for retrieving just the x, y, or z range: get_contour_xrange, get_contour_yrange, and get_contour_zrange. To see if a contour is hidden or visible, use the get_contour_visible command. Advanced FunctionsThe module of advanced ChIPS functions contains other commands for retrieving attribute values (refer to "ahelp chips" for information on loading the module): get_contour_algorithm get_contour_color get_contour_depth get_contour_interval get_contour_mode get_contour_numlevels get_contour_style get_contour_thickness get_contour_transform Example 1
chips> add_contour("img.fits","color=red")
chips> print get_contour()
algorithm = 1
color = red
depth = 100
id = None
interval = 10.0
levels = [55.0, 60.0, 65.0, 70.0, 75.0, 80.0]
mode = nice
numlevels = 5
stem = None
style = solid
thickness = 1.0
wcs = None
chips> print get_contour().levels
[55.0, 60.0, 65.0, 70.0, 75.0, 80.0]
chips> print get_contour("ctr1", "color")
defaultA contour is created and becomes current. Calling get_contour with no argument returns all the attributes of the object. The remaining calls show how get_contour can be used to access individual attributes of the contour. Example 2
chips> add_contour("img.fits","color=red")
chips> add_contour([[1,1,1], [1,3,1], [1,1,1]], 3,3)
chips> print get_contour("ctr1")Two contours are created. get_contour is called with the id of the first contour, returning all attributes. Example 3chips> id = ChipsId() chips> id.contour = "ctr1" chips> print get_contour(id) A ChipsId structure is created and the id.contour field is set to "ctr1". get_contour is called with the ChipsId. Example 4chips> ctratt = get_contour() chips> print ctratt Retrieve a structure containing the attribute values of the current contour and store the results in "ctratt". Print the contents of "ctratt". CHANGES IN CIAO 4.1The attribute "levels" which refers to the requested number of levels for a given contour in count mode has been changed to "numlevels." When setting the attribute, "levels" now refers to a list of exact levels the user wants the contour to display (when the mode is set to "arbitrary"). When using get_contour(), the "levels" attribute contains the numeric values of the contour levels. BugsThe list of contour levels may contain repeated valuesThe values returned in the levels attribute of get_contour() may contain repeated values; for instance in the example below the 60.0 value is repeated twice. chips> get_contour().levels [55.0, 60.0, 60.000000000000007, 65.0, 70.0, 75.0, 80.0] See 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. |