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

get_line

Context: py.chips

Synopsis

Retrieves the attribute value(s) of the line.

Syntax

get_line()
get_line(id [,attribute])

Description

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

The get_line command returns a structure containing all the attribute values of the line. 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 lines are:

Attribute Description
color Color of the line
depth Integer value indicating line depth
extend Should the line extend to infinity (segment vs ray)
style Stipple pattern used to draw the line segment
thickness Thickness of the line

To see if a line is hidden or visible, use the get_line_visible 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_line_color
get_line_depth
get_line_extend  
get_line_stipple
get_line_style
get_line_thickness

Example 1

chips> add_line(.1,.1,.9,.9,"thickness=9 id=line1")
chips> print(get_line())
chips> print(get_line("line1","style"))

A line is created and becomes current. Calling get_line with no argument returns all the attributes of the object. get_line is called a second time to return just the "style" attribute.

Example 2

chips> add_line(.1,.1,.9,.9,"thickness=9 id=line1")
chips> add_line(.6,.1,.6,.9,"thickness=9 color=lime")
chips> print(get_line("line1"))

Two lines are created. get_line is called with the id of the first line, returning all attributes.

Example 3

chips> id=ChipsId()
chips> id.line="line1"
chips> print(get_line(id))

A ChipsId structure is created and the id.line field is set to "line1". get_line is called with the ChipsId.

Example 4

chips> lineatt = get_line()
chips> print(lineatt)

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

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.