|
|
|
|
SynopsisRetrieves the attribute value(s) of the curve. Syntaxget_curve() get_curve(id [,attribute]) Description
The get_curve command returns a structure containing all the attribute values of the curve. 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 curves are:
Data RangeThe get_curve_range command returns the X and Y ranges of the current axes of the current plot. The values are returned as [xmin, xmax, ymin, ymax]. There are also individual commands for retrieving just the x or y range: get_curve_xrange and get_curve_yrange. To see if a curve is hidden or visible, use the get_curve_visible command. Advanced FunctionsThe module of advanced ChIPS functions contains other commands for retrieving attribute values (refer to "ahelp chips" for information on loading the module): get_curve_baddatamode get_curve_depth get_curve_errcolor get_curve_errdown get_curve_errleft get_curve_errright get_curve_errstyle get_curve_errthickness get_curve_errup get_curve_limitlength get_curve_limitoverride get_curve_linecolor get_curve_linestyle get_curve_linethickness get_curve_symbolangle get_curve_symbolcolor get_curve_symbolfill get_curve_symbolsize get_curve_symbolstyle Example 1
chips> add_curve("lc.fits[cols time, count _rate]")
chips> print(get_curve())
chips> print(get_curve("crv1","line.color"))A curve is created and becomes current. Calling get_curve with no argument returns all the attributes of the object. get_curve is called a second time to return just the "line.color" attribute. Example 2
chips> add_curve("lc.fits[cols time, count _rate]")
chips> x = numpy.arange(11)
chips> add_curve(x, x*x)
chips> print(get_curve("crv1"))Two curves are created. get_curve is called with the id of the first curve, returning all attributes. Example 3chips> id=ChipsId() chips> id.curve="crv1" chips> print(get_curve(id)) A ChipsId structure is created and the id.curve field is set to "crv1". get_curve is called with the ChipsId. Example 4chips> crvatt = get_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". BugsSee the bugs pages on the ChIPS website for an up-to-date listing of known bugs. |
![]() |
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. |