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

Synopsis

Creates a window.

Syntax

add_window( [ChipsId,] [,attributes])
add_window( [ChipsId,] width, height, units [,attributes] )

Description

  • ChipsId - an optional ChipsId structure containing values to modify the currency state for the command.
  • width - window width
  • height - window height
  • units - units of the width and height
  • attributes - optional parameters which allow the user to configure properties though a structure, list, or attribute string.

The add_window command creates a window whose attributes are specified by user preferences or in an attribute list. The new window becomes current by default; providing a ChipsId overrides the currency state.

Customizing the Window

There are several attributes that control the window characteristics. The attributes can be set to the ChIPS defaults, values provided in the add_window command, or values from the user's preference file.

The attributes may also be modified with the set_window command at any time; see "ahelp py.chips set_window" and "ahelp py.chips setget" for more information.

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: white in the ChIPS window, black on printout
display Flag indicating whether the window should be rendered see the Booleans section of "ahelp py.chips chipsopt" true
height window height Numerical value expressed in either inches, centimeters, millimeters or pixels 360 pixels
scaleheight factor to scale window to display at approximate height positive floating point value 1.25
scalewidth factor to scale window to display at approximate width positive floating point value 1.25
smoothing use vtk's smoothing to reduce anti-aliasing see the Booleans section of "ahelp py.chips chipsopt" false
stem Stem used for window id Any Alpha-numeric character sequence win
units Units of the window width and height dimensions inches|centimeters|millimeters|pixels pixels
width window width Numerical value expressed in either inches, centimeters, millimeters or pixels 360 pixels

Example 1

chips> add_window()

Create a new window.

Example 2

chips> settings = ChipsWindow()
chips> settings.bg.color = 'blue'
chips> settings.width = 8.0
chips> settings.height = 10.0
chips> settings.units = 'centimeters'
chips> add_window(x, y, settings)

Populate the "settings" structure with the attribute values, then add a window.

Example 3

chips> add_window(["bgcolor", "navy", "id", "Figure1"])

Add a window, specifying the attribute values in a list.

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.