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 2007

URL: http://cxc.harvard.edu/chips4.0/info.sl.html
AHELP for ChIPS 4.0 info Context: sl.chips

Synopsis

Returns a string containing a listing of objects.

Syntax

info([ ChipsId] );

Description

  • ChipsId - an optional ChipsId structure containing values to specify the window and frame from which to receive information.

The info command provides a means of seeing what objects the user has created and to find basic information regarding those objects. The info command returns a list of objects created, which objects contain other objects, and the ids associated with each object.

The general format of the output string for each line is: the object type (Window, Frame, Plot, Coord Sys Id, etc.), a space, an open square bracket, the id of the object, and a close square bracket. An indentation before the object type shows that the object belongs to the object preceding it. Objects are listed in the order in which they were created within the parent object.

For example:

   Window [window 1]
     Frame [frame 1]
       Plot [alpha]   (0.15,0.15)  .. (0.90,0.90)
     Frame [frame 2]
       Plot [beta]   (0.15,0.15)  .. (0.90,0.90)
      

In this example, "frame 1" and "frame 2" belong to (i.e. are contained by) "window 1". Plot "alpha" belongs to frame 1, while plot "beta" belongs to frame 2.

There are two exceptions to this format: plots and plot border axes.

     Plot [plot1]   (0.15,0.15)  .. (0.90,0.90)
       Border bottom [bx1]  top [bx2]  left [by1]  right [by2]
      
  • Plots: the line includes the dimensions of the plot after the id. The syntax is "(x1, y1) .. (x2, y2)", where (x1, y1) is the lower left corner of the plot area and (x2, y2) is the upper right corner of the plot area.
  • Plot border axes: the plot border axes are treated as a single entity with information on the four axes put on a single line. The line starts with object title of 'Border' and continues by listing each side (bottom, top, left, and right), followed by the id for that axis.

Using a ChipsId

A ChipsId may be included to refine the context from which information will be displayed. Setting the window or frame member of a ChipsId and calling info with that id will return information pertaining only to the specified window or frame. (Currently this feature only works with windows and frames.)

Customizing the info Command

There are a few preferences in the info command, which allow more information about each object to be included in the output. All extra information about the objects is displayed after the object id and close bracket.

The set_preference and set_preferences commands are used to change the info preference values.

Argument Description Options Default
coord Appends the coordinate system of all applicable objects as "cs <coordinate system>". If the object is in data coordinates, the data coordinate id is included: "cs DATA:<id>". see the Booleans section of "ahelp sl.chips chipsopt" false
current Displays the current objects in reverse video. Several characters are added around the ids, which should be taken into account if parsing the string. see the Booleans section of "ahelp sl.chips chipsopt" false
depth Appends the depth of all applicable objects as "d <depth>". see the Booleans section of "ahelp sl.chips chipsopt" false

Example 1

chips> add_curve([0:9], [0:9]);
chips> info();
Window [win1]
  Frame [frm1]
    Plot [plot1]   (0.15,0.15)  .. (0.90,0.90)
      Border bottom [bx1]  top [bx2]  left [by1]  right [by2]
      X Axis [ax1]
      Y Axis [ay1]
      Curve [crv1]
          

Print the info after adding a simple curve.

Example 2

chips> add_curve([0:9], [0:9]);
chips> add_histogram([1,2,3], [4,5,6], "id=\"my hist\"");
chips> add_label(1,8, "Curve and Histogram");
chips> add_frame();
chips> add_label(.1,.9, "New Curve");
chips> add_curve([0:2*PI], sin ([0: 2*PI]), "plot.topmargin=.3");
chips> info();
Window [win1]
  Frame [frm1]
    Plot [plot1]   (0.15,0.15)  .. (0.90,0.90)
      Border bottom [bx1]  top [bx2]  left [by1]  right [by2]
      X Axis [ax1]
      Y Axis [ay1]
      Curve [crv1]
      Histogram [my hist]
    Label [lbl1]
  Frame [frm2]
    Plot [plot2]   (0.15,0.15)  .. (0.90,0.70)
      Border bottom [bx1]  top [bx2]  left [by1]  right [by2]
      X Axis [ax1]
      Y Axis [ay1]
      Curve [crv1]
    Label [lbl1]
          

The info displayed from a slightly more complicated ChIPS session several plots, curves, and annotations.

Example 3

chips> add_curve([0:9], [0:9]);
chips> add_histogram([1,2,3], [4,5,6], "id=\"my hist\"");
chips> add_label(1,8, "Curve and Histogram");
chips> id = ChipsId;
chips> add_frame(id);
chips> add_label(.1,.9, "New Curve");
chips> add_curve([0:2*PI], sin ([0: 2*PI]), "plot.topmargin=.3");
chips> info(id);
Window [win1]
  Frame [frm2]
    Plot [plot2]   (0.15,0.15)  .. (0.90,0.70)
      Border bottom [bx1]  top [bx2]  left [by1]  right [by2]
      X Axis [ax1]
      Y Axis [ay1]
      Curve [crv1]
    Label [lbl1]
          

Display all object which are in the current window and the the second frame by passing a ChipsId to the info command. The frame member of the ChipsId was populated with "frm2" when calling the add_frame command.

Example 4

chips> add_contour([[1,1,1],[1,3,1],[1,1,1]], 3,3);
chips> add_hline(1.5,"color=red");
chips> id=ChipsId;
chips> id.coord_sys = FRAME_NORM;
chips> add_label(id, .1, .95, "Simple Contour");
chips> set_preference("info.coord", "true");
chips> info();
Window [win1]
  Frame [frm1]
    Plot [plot1]   (0.15,0.15)  .. (0.90,0.90)
      Border bottom [bx1]  top [bx2]  left [by1]  right [by2]
      X Axis [ax1]          cs PLOT_NORM
      Y Axis [ay1]          cs PLOT_NORM
      Contour [ctr1]        cs DATA:plot1_ax1ay1
    Line [line1]            cs DATA:plot1_ax1ay1
    Label [lbl1]            cs FRAME_NORM
          

Display all objects currently created in the ChIPS session, including the coordinate systems of all objects.

Example 5

chips> add_axis(XY_AXIS, .5, 0, 10, "depth=90");
chips> add_curve([-10:9], [-10:9]^2);
chips> add_region(4, 0, 0, 5, "fill.visible=true depth=95");
chips> set_preference("info.depth", "true");
chips> info();
Window [win1]
  Frame [frm1]
    Plot [plot1]   (0.15,0.15)  .. (0.90,0.90)
      Border bottom [bx1]  top [bx2]  left [by1]  right [by2]
      X Axis [ax1]          d 90
      Y Axis [ay1]          d 90
      Curve [crv1]          d 100
    Region [reg1]           d 95
          

Display all objects currently created in the ChIPS session, including the depths.

Example 6

chips> add_histogram([1,-1,5,7,6], [5,6,7,8,9],
[5.5,6.5,7.5,8.5,9.5],"plot.bottommargin=.5");
chips> add_plot("topmargin=.5");
chips> add_curve([5,6,7,8,9], [1,-1,5,7,6], "axis.x.id=x_axis
axis.y.id=y_axis");
chips> add_frame();
chips> add_label(.5, .5, "Frame II");
chips> current_frame("frm1");
chips> set_preference("info.current", "true");
chips> info();
Window [win1]
  Frame [frm1]
    Plot [plot1]   (0.15,0.50)  .. (0.90,0.90)
      Border bottom [bx1]  top [bx2]  left [by1]  right [by2]
      X Axis [ax1]
      Y Axis [ay1]
      Histogram [hist1]
    Plot [plot2]   (0.15,0.15)  .. (0.90,0.50)
      Border bottom [bx1]  top [bx2]  left [by1]  right [by2]
      X Axis [x_axis]
      Y Axis [y_axis]
      Curve [crv1]
  Frame [frm2]
    Label [lbl1]
          

When printed to the screen, ids of objects which are current will be highlighted using reverse video. In this case: 'win1', 'frm1', 'plot2', 'x_axis', 'y_axis', and 'crv1'.

Bugs

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

Last modified: December 2007



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.