Chandra X-Ray Observatory (CXC)
Skip to the navigation links
Last modified: December 2012

URL: http://cxc.harvard.edu/chips/get_attribute.html
Jump to: Description · Examples · Bugs · See Also


AHELP for CIAO 4.5 ChIPS v1

get_attribute

Context: utilities

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" and there are multiple versions of the object present.

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> crv = get_attribute(chips_curve)
chips> print(crv)

Retrieve a structure containing the attribute values of the current curve and store the results in "crv". The print call is used to display the contents of the structure, and will look something like:

baddata = 1
depth = 100
err.caplength = 10
err.color = default
err.down = False
...
symbol.fill = True
symbol.size = 5
symbol.style = 4

Example 2

chips> get_attribute("win1", chips_window, "bgcolor")
'default'

Retrieve the "bgcolor" value for the window called "win1", which here happens to be "default".

Bugs

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

See Also

concepts
attributes, setget
utilities
set_attribute, set_cascading_property, set_current

Last modified: December 2012
CXC logo

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-2012. All rights reserved.