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/current_region.py.html
AHELP for ChIPS 4.0 current_region Context: py.chips

Synopsis

Set the specified region as current.

Syntax

current_region( ChipsId )
current_region( "region_id" )
current_region( "all" )

Description

The current_region command sets the region indicated by the argument as the current region; see "ahelp py.chips currency" for general information on currency.

  • ChipsId - an optional ChipsId structure containing values to modify the currency state for the command.
  • region_id - identification tag given to each object that is created; use this to select a specific region.
  • all - sets all regions to be current.

Use the info_current command to retrieve a list of all the current items in the ChIPS session, as shown in Example 1.

Example 1

chips> id = ChipsId()
chips> add_region(4, .5, .5, .4, "id=square")
chips> set_region("square", ["edge.color", "white", "fill.color",
"blue", "fill.visible", 1])
chips> add_region(6, .5, .5, .1, "id=hex")
chips> set_region("hex", ["edge.color", "white", "edge.thickness", 2])
chips> id.region = "square"
chips> current_region(id)
chips> print(info_current())

Two regions are created; the second region is current after it is created. The id.region command sets the region value of the ChipsId structure to the first region, then the current_region command makes that region current.

The output of info_current for this session is:

Window [win1]
  Frame [frm1]
    Region [square]
    Coord Sys [Frame Normalized]

Example 2

chips> add_region(4, .5, .5, .4, "id=square")
chips> add_region(6, .5, .5, .1, "id=hex")
chips> current_region("square")

Two regions are created. After the second region is created, it is current. The current_region command then sets the first region as the current region.

Example 3

chips> add_region(4, .5, .5, .4, "id=square")
chips> add_region(3, .7, .7, .2)
chips> current_region("all")

Two regions are created. After the second region is created, it is current. The current_region command then makes all regions current.

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.