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

Synopsis

Modifies the attributes of an existing window.

Syntax

set_window( [id,] attributes)

Description

  • id - an optional ChipsId structure containing values to modify the currency state for the command or a string id to modify the specified window.
  • o) attributes - optional parameters which allow the user to configure properties of the window though a window attribute object, user-defined object, list, dictionary, or attribute string.

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

Customizing the Window

There are several attributes that control the characteristics of windows. The set_window command may be used to modify the attribute values of an existing window at any time during a ChIPS session. See "ahelp py.chips attributes" and "ahelp py.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 window will not be modified.

The attributes associated with windows are:

Attribute Description Options Default
bgcolor Background Color of the window see the Color section of "ahelp py.chips chipsopt" default: black in the ChIPS window, white on printout

These individual commands are also available for setting attribute values:

set_window_bgcolor
set_window_redraw
set_window_title

Note that set_window_redraw and set_window_title are independent commands; there is not a corresponding attribute in the set_window command. set_window_title specifies the title of the ChIPS window. set_window_redraw is a boolean (see the Booleans section of "ahelp py.chips chipsopt") that determines whether the window is updated as each command is executed. The default value is "True".

The syntax for each command is:

set_window_title([id,] title)
set_window_redraw([id,], toggle)

chips> set_window_title("Plotting M81")
chips> set_window_redraw(0)  # turn off redraw
      

Certain window properties, such as height and width, can not be modified after the window is created. See "ahelp py.chips add_window" for more details on setting these properties.

Example 1

chips> add_window()
chips> set_window(["bgcolor", "blue"])

Using an attribute/value pair, set the window background color to blue.

Example 2

chips> add_window(settings)
chips> settings = ChipsWindow()
chips> settings.bg.color = "blue"
chips> set_window (settings)

Using a ChIPS window attribute object, set the window background color to blue.

Example 3

chips> add_window(5,8,"inches",["bgcolor","navy"])
chips> set_window("bgcolor=green")

Add a window with a navy background, then use a list to change it to green.

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.