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

get_attribute

Context: py.chips

Synopsis

Retrieves attribute value(s) for an object.

Syntax

get_attribute([id,] object_type [,attribute])

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"
  • attribute - an optional string containing the name of the attribute to retrieve

The get_attribute command retrieves the value of a specific attribute. If an attribute is not specified, the values of all attributes of the specified object are returned.

The command can only operate on a single object. An error is returned if currency is set to "all".

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.

Example 1

chips> crvatt = get_attribute(chips_curve)
chips> print(crvatt)

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

Example 2

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

Retrieve the "bgcolor" value for "win1".

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.