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 2007

URL: http://cxc.harvard.edu/chips4.0/set_region.sl.html
AHELP for ChIPS 4.0 set_region Context: sl.chips

Synopsis

Modifies the attributes of an existing region.

Syntax

set_region([id,] values);

Description

  • id - an optional ChipsId structure containing values to modify the currency state for the command or a string id to modify a region within the current frame.
  • values - a list containing attribute value pairs or a ChipsRegion 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 sl.chips attributes" and "ahelp sl.chips 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.

The attributes associated with regions are:

Attribute Description Options Default
depth Integer value indicating region depth see the Depth section of "ahelp sl.chips chipsopt" 100
edge.color Color of the region edge see the Color section of "ahelp sl.chips chipsopt" green
edge.style stipple pattern used to draw the region edges see the Line Style section of "ahelp sl.chips chipsopt" chips_solid
edge.thickness Thickness of the region edge 0.5:10 1
fill.color Color of the region fill, if visible see the Color section of "ahelp sl.chips chipsopt" green
fill.visible Should the region be filled or not false|true; see the Booleans section of "ahelp sl.chips chipsopt" false
opacity Opacity of the region fill, if visible 0.0:1.0 0.5

These individual commands are also available for setting attribute values:

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> settings = ChipsRegion;
chips> settings.edge.color = "blue";
chips> settings.edge.thickness = 2;
chips> set_region("reg1",settings);

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

Example 3

chips> a=struct {edge,fill};
chips> a.edge =struct {color};
chips> a.fill =struct {color};
chips> a.edge.color="red";
chips> a.fill.color="blue";
chips> set_region(a);

Create a user-defined structure with edge.color and fill.color fields. Use the structure to modify the values of the current region.

Example 4

chips> a=struct {depth};
chips> a.depth=50;
chips> set_region(a);

Create a user-defined structure with depth field. Use the structure to modify the values of the current region.

Bugs

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

Last modified: December 2007



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.