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/set_attribute.py.html
AHELP for ChIPS 4.1

set_attribute

Context: py.chips

Synopsis

Sets the attribute value(s) for the specified object.

Syntax

set_attribute([id,] object_type, values)

Description

  • id - an optional ChipsId structure containing values to modify the currency state for the command or a string id to specify the object
  • object_type - what type of object to modify, such as chips_window or chips_curve; see the Object Type section of "ahelp chipsopt"
  • values - the attribute values to set. They may be specified as an attribute object structure, an attribute string, or a list of attribute-value pairs.

The set_attribute command is used to set one or more values of the attributes of the specified object. Multiple ovbjects of the same type may be modified with a single command by setting the currency to "all".

For general information on specifying attribute values, refer to "ahelp attributes" and "ahelp setget" .

Example 1

chips> set_attribute('crv2',chips_curve,'line.style=dot
line.thickness=2')

Set the curve line style to dot and the thickness to 2.

Example 2

chips> set_attribute(chips_plot,['style','box'])

Using attribute/value pairs, set the plot style to box.

Example 3

chips> settings = ChipsContour()
chips> settings.color = 'red'
chips> settings.style = 'shortdash'
chips> set_attribute('ctr1',chips_contour,settings)

Populate the "settings" structure with attribute values, then use it to set ctr1 to be a red, short-dashed contour.

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.