|
|
|
|
SynopsisChIPS coordinate systems: pixel, window normalized, frame normalized, plot normalized, and data. DescriptionThere are five coordinate systems in ChIPS:
All objects (except for windows) are positioned in a coordinate system. Once an object is added to a coordinate system, it is always associated with that coordinate system. There is no way to change the coordinate system to which an object belongs after it has been created. For most objects, the coordinate system that will be used is predetermined.
A coordinate system becomes current and accessible when the object which defines it becomes current and accessible. Only the current coordinate systems are considered when determining the default system. Creating and Deleting SystemsCoordinate systems are created with the objects which define them.
Deleting an object removes the coordinate system and any objects associated with that coordinate system. BindingThe object becomes bound to the coordinate system in which it is positioned. Adjusting the coordinate system (i.e. changing the boundaries) causes the object position to shift accordingly. For example, a point added to a window normalized coordinate system will be repositioned if the window size changes. ClippingA coordinate system may clip an object, e.g. hide the part of the object which falls outside of the coordinate system boundaries. Objects in data coordinates may be clipped at the boundary of the plot area. Objects in any other coordinate system may be clipped at the frame edge. info_coordinate CommandThe info_coordinate command provides a means of seeing what data coordinate systems exist, where they reside, and the ids associated with them. Refer to "ahelp sl.chips info_coordinate" for complete details. Converting Between SystemsThe convert_coordinate command converts a point from one ChIPS coordinate system to another. The conversion can be performed between any coordinate systems which have been created. For example, the value of a point in data system coordinates can be converted to the data system from a different plot. For more information and examples, refer to "ahelp sl.chips convert_coordinate" . Using a ChipsIdThe ChipsId object allows the user to set or modify the currency of ChIPS objects. It also contains entries to specify coordinate systems and coordinate system ids. The ChipsId is optional and is generally the first parameter in the command. Refer to "ahelp sl.chips chipsid" for general information on how it is used. The coord_sys entry in the ChipsId is used to specify the coordinate system to use when adding objects. For instance:
add_axis (XY_AXIS, 0, 0, 10);
id = ChipsId;
id.coord_sys = PLOT_NORM;
add_label (id, .1, .1, "My label");
By default, the label would been added in the data system created by the x and y axis. However, setting the ChipsId's the coord_sys entry to PLOT_NORM causes it to be added in plot normalized coordinates. The ChipsId also has a coord field, which can be populated with a data system id. When a data system is created, an id string is associated with it. The string is formatted as the plot id, an underscore, and the x axis id and y axis id, e.g. "plot1_ax1ay1". Both the coord and coord_sys need to be set when adding an annotation to a data system which is not the default.
add_axis (XY_AXIS, 0, 0, 10);
add_axis (XY_AXIS, 0, 0, 1000);
id = ChipsId;
id.coord_sys = DATA;
id.coord = "plot1_ax2ay2";
add_label (id, 500, 500, "My label");
The label was added to the data system defined by the second set of axes created (plot1_ax2ay2). BugsSee the bugs pages on the ChIPS website for an up-to-date listing of known bugs. See Also
|
![]() |
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. |