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 2008

URL: http://cxc.harvard.edu/chips4.1/get_window.py.html
AHELP for ChIPS 4.1

get_window

Context: py.chips

Synopsis

Retrieves the attribute value(s) of the window.

Syntax

get_window()
get_window(id [,attribute])

Description

  • id - an optional ChipsId structure containing values to modify the currency state for the command or a string id to specify the window.
  • attribute - a string containing the name of the attribute to retrieve

The get_window command returns a structure containing all the attribute values of the window. 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 windows are:

Attribute Description
bgcolor Background Color of the window

Note that the window title is not included in the attributes. In order to get that value, use the get_window_title command.

Advanced Functions

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

get_window_bgcolor
get_window_redraw

Example 1

chips> add_window()
chips> print(get_window())

A window is created and becomes current. Calling get_window with no argument returns all the attributes of the object.

Example 2

chips> get_window('win1','bgcolor')

get_window is called to return the "bgcolor" attribute of win1.

Example 3

chips> add_window()
chips> add_window( "id=M33")
chips> id = ChipsId()
chips> id.window = "win1"
chips> print(get_window(id))

A ChipsId structure is created and the id.window field is set to "win1". get_window is called with the ChipsId.

Example 4

chips> winatt = get_window()
chips> print(winatt)

Retrieve a structure containing the attribute values of the current window and store the results in "winatt". Print the contents of "winatt".

Bugs

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

Last modified: December 2008



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.