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

URL: http://cxc.harvard.edu/chips/ahelp/set_region.html
AHELP for CIAO 4.6 ChIPS v1

set_region

Context: regions

Synopsis

Modifies the attributes of an existing region.

Syntax

set_region(attributes)
set_region(id, attributes)

Description

The function arguments.

Argument Description
id A ChipsId structure identifying the item, or a string containing the name of the object.
attributes Configure object properties by giving an attribute string (a space-separated list of key=value pairs), list, dictionary, or a ChIPS object.

The set_region command sets the specified attributes to the provided values. The modified region becomes current. Multiple regions may be modified with a single command by setting the currency to "all".

Customizing the Region

There are several attributes that control the characteristics of regions. The set_region command may be used to modify the attribute values of an existing region at any time during a ChIPS session. See "ahelp attributes" and "ahelp setget" for more general information.

If multiple attributes are being set simultaneously and one of them fails, the entire command will fail and the region will not be modified.

Please see the section "Region Preferences and Attributes" below the examples for a list of the region attributes.

Advanced Functions

The module of advanced ChIPS functions contains other commands for setting attribute values (refer to "ahelp chips" for information on loading the module):

set_region_depth
set_region_edgecolor
set_region_edgestyle
set_region_edgethickness
set_region_fill
set_region_fillcolor
set_region_opacity

Example 1

chips> set_region(["edge.color", "plum", "edge.style", "dot"])

Using attribute/value pairs, set the region edge color to plum and the edge stipple pattern to dot.

Example 2

chips> set_region({"edge.color": "plum", "edge.style": "dot"})

This is a repeat of the previous example, using a dictionary rather than a list to define the attributes to change.

Example 3

chips> reg = ChipsRegion()
chips> reg.fill.color = "blue"
chips> reg.edge.thickness = 2
chips> set_region("reg1", reg)

Populate the "reg" structure with attribute values, then use it to set reg1 edge to be blue with a thickness of 2.

Region Preferences and Attributes

The attributes associated with regions are given in the following table, where the "Set?" column refers to whether the attribute can be changed using the set_region() command. To change the region preference settings prepend "region." to the attribute name.

Attribute Description Options Default Set?
angle Angle, in degrees, at which the region is drawn -360.0 to 360.0 0.0 Yes
coordsys coordinate system for the region PIXEL, WINDOW_NORM, FRAME_NORM, PLOT_NORM, DATA see "ahelp coordsys" No
depth Integer value indicating region depth see the Depth section of "ahelp chipsopt" default Yes
edge.color region edge color name or hex; see the Color section of "ahelp chipsopt" green Yes
edge.style stipple pattern used to draw the region edges see the Line Style section of "ahelp chipsopt" chips_solid Yes
edge.thickness Thickness of the region edge 0.5 to 10.0; see the Thickness section of "ahelp chipsopt" 1 Yes
fill.color region fill color name or hex; see the Color section of "ahelp chipsopt" green Yes
fill.style Fill style for the region see the Fill Pattern section of "ahelp chipsopt" 0 (no fill) Yes
opacity Opacity of the region fill 0.0 to 1.0, inclusive, where 0 is fully transparent and 1 is fully opaque 0.5 Yes
stem stem used for region id An alpha-numeric character sequence that does not contain a space reg No

Bugs

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

See Also

concepts
setget
contrib
chips_regions
regions
add_region, current_region, delete_region, display_region, get_region, hide_region, move_region, shuffle_region
utilities
load_fill, set_current

Last modified: December 2013
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:   cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2014. All rights reserved.