POW Scripting Guide

Because fv and POW are written in Tcl, they are inherently scriptable. So long as one knows the necessary data structures and function calls, everything POW does can be controlled by a user-created Tcl script running inside of POW. This, however, is a formidable task. Plus, POW's internal behavior and data are subject to change with each new release.

To make scripting possible, then, a simplified (and hence limited) script interface has been added to POW. It consists of a small set of commands which perform the basic operations of creating and modifying graphs. Future versions should contain more capabilities.


Operational Summary


There are several ways to access POW's scripting commands. The simplest is to write a Tcl script which uses the commands directly and then execute it within POW's powCmds namespace. As POW has no file capabilities nor command console of its own, this currently can be done only if implemented within an application containing POW, such as fv. (See fv's Scripting Guide for details on executing POW commands within fv.) This scripting method is useful for implementing macros which can perform certain common operations at the user's request, such as setting specific graph options.

Alternatively, POW can be scripted by other programs, allowing those programs to make use of POW's capabilities remotely. These programs, however, do not need to be written in Tcl so long as they can communicate with POW. Ced by oth appropriate) resize handles. Boxes and Ellipses have one of each type, but Points have neither. A shape is rotated or resized (for Polygons and Lines, it is more a matter of repositioning points) by clicking the relevant handle with the left mouse button and dragging it to a new location. When the mouse cursor is over one of the handles, the cursor changes to a double-arrow, indicating that point can be dragged. When the mouse button is released the dialog's list of regions and current region information are updated with the new information.

To move a region, simply click the left mouse button inside the region and drag it to the new location. Because clicking on a region makes it the current region, moving a region can be performed on any region, not just the current one. When inside a region, the cursor changes to a 4-sided arrow and the region's outline thickens. The current region can also be moved via the keyboard. When the POW window is in the foreground, shift-arrow will move the current shape one screen pixel in the arrow's direction. Control-arrow moves the shape 10 pixels.

Polygons can be modified in two additional ways. Points can be deleted by dragging a point onto one of its adjacent points. A point can also be inserted by clicking and dragging one of the handles with the right mouse button (Command-Click on Mac OS). This inserts the new point before the one clicked. If this is incorrect, immediately drag the new point back onto the first to delete it (no need to release the mouse button) and then click and drag on the next point.

The Delete button in the Region dialog deletes the current region, and the next region in the list (or previous region if deleting the last region) becomes the current region. All the regions can be deleted with the Clear All button.

Coordinate Systems

Region parameters can be displayed in one of several formats selectable by a popup menu just below the list of regions in the Region dialog. The first is Image format wherein positions and size parameters are reported in the pixel coordinates of the image. If the image has a linear scaling, the Linear format will report coordinates in this scaled coordinate system instead of pixels. If WCS information is available for the graph, region parameters can be displayed in celestial coordinates as degrees. The formats FK4, FK5, Galactic, Ecliptic, and ICRS each report region positions and sizes as degrees, but POW currently does not convert between these formats; the user must specify the appropriate system which will then be written to the region file when saved. Finally, the Degrees format signifies a mixed style used by SAOtng wherein positions are in degrees, but sizes are in pixels.

The final 2 elements of the popup menu select the formatting to use when displaying degree values. Decimal Degrees format shows values as ordinary decimals with RA ranging over 0-360 and Declination over -90 to +90. HHMMSS Degrees instead displays decimals in hour:minute:second format.

Saving/Opening Region Files

At the bottom of the Region dialog are a pair of Open and Save buttons which will read and write region files in the standard format, compatible with SAOtng. If regions already exist when opening a region file, the user will have the option of deleting the old regions or appending the new ones to the list. When saving regions, the parameters will be written in the coordinate system currently selected in the Region dialog.


The FTOOLS help hotline
Last modified: Tue Oct 27 12:20:00 EST ./usr/share/doc/fv/pow/Ruler.html0000644000000000000000000000170011034357422015567 0ustar rootroot Measure the distance

Measure the distance

User can use this simple tool to measure the distance between two points in pixels or angle. When the measure dialog box is open, POW is in the "Ruler" mode. The user can place the mouse at the first point and click-and-drag to the second point with the right mouse button down. When the mouse button is released, the measured values will be shown on the dialog box. The user can also change the position of either end or move the whole ruler by click-and-drag the middle mouse with the left mouse. When the dialog box is closed, pow will return to the normal mode.
The FTOOLS help hotline
Last modified: Tue Oct 27 12:20:00 EST ./usr/share/doc/fv/pow/Scripting.html0000644000000000000000000005213211034357422016445 0ustar rootroot POW Scripting

POW Scripting Guide

Because fv and POW are written in Tcl, they are inherently scriptable. So long as one knows the necessary data structures and function calls, everything POW does can be controlled by a user-created Tcl script running inside of POW. This, however, is a formidable task. Plus, POW's internal behavior and data are subject to change with each new release.

To make scripting possible, then, a simplified (and hence limited) script interface has been added to POW. It consists of a small set of commands which perform the basic operations of creating and modifying graphs. Future versions should contain more capabilities.


Operational Summary


There are several ways to access POW's scripting commands. The simplest is to write a Tcl script which uses the commands directly and then execute it within POW's powCmds namespace. As POW has no file capabilities nor command console of its own, this currently can be done only if implemented within an application containing POW, such as fv. (See fv's Scripting Guide for details on executing POW commands within fv.) This scripting method is useful for implementing macros which can perform certain common operations at the user's request, such as setting specific graph options.

Alternatively, POW can be scripted by other programs, allowing those programs to make use of POW's capabilities remotely. These programs, however, do not need to be written in Tcl so long as they can communicate with POW. Ced by oth appropriate) resize handles. Boxes and Ellipses have one of each type, but Points have neither. A shape is rotated or resized (for Polygons and Lines, it is more a matter of repositioning points) by clicking the relevant handle with the left mouse button and dragging it to a new location. When the mouse cursor is over one of the handles, the cursor changes to a double-arrow, indicating that point can be dragged. When the mouse button is released the dialog's list of regions and current region information are updated with the new information.

To move a region, simply click the left mouse button inside the region and drag it to the new location. Because clicking on a region makes it the current region, moving a region can be performed on any region, not just the current one. When inside a region, the cursor changes to a 4-sided arrow and the region's outline thickens. The current region can also be moved via the keyboard. When the POW window is in the foreground, shift-arrow will move the current shape one screen pixel in the arrow's direction. Control-arrow moves the shape 10 pixels.

Polygons can be modified in two additional ways. Points can be deleted by dragging a point onto one of its adjacent points. A point can also be inserted by clicking and dragging one of the handles with the right mouse button (Command-Click on Mac OS). This inserts the new point before the one clicked. If this is incorrect, immediately drag the new point back onto the first to delete it (no need to release the mouse button) and then click and drag on the next point.

The Delete button in the Region dialog deletes the current region, and the next region in the list (or previous region if deleting the last region) becomes the current region. All the regions can be deleted with the Clear All button.

Coordinate Systems

Region parameters can be displayed in one of several formats selectable by a popup menu just below the list of regions in the Region dialog. The first is Image format wherein positions and size parameters are reported in the pixel coordinates of the image. If the image has a linear scaling, the Linear format will report coordinates in this scaled coordinate system instead of pixels. If WCS information is available for the graph, region parameters can be displayed in celestial coordinates as degrees. The formats FK4, FK5, Galactic, Ecliptic, and ICRS each report region positions and sizes as degrees, but POW currently does not convert between these formats; the user must specify the appropriate system which will then be written to the region file when saved. Finally, the Degrees format signifies a mixed style used by SAOtng wherein positions are in degrees, but sizes are in pixels.

The final 2 elements of the popup menu select the formatting to use when displaying degree values. Decimal Degrees format shows values as ordinary decimals with RA ranging over 0-360 and Declination over -90 to +90. HHMMSS Degrees instead displays decimals in hour:minute:second format.

Saving/Opening Region Files

At the bottom of the Region dialog are a pair of Open and Save buttons which will read and write region files in the standard format, compatible with SAOtng. If regions already exist when opening a region file, the user will have the option of deleting the old regions or appending the new ones to the list. When saving regions, the parameters will be written in the coordinate system currently selected in the Region dialog.


The FTOOLS help hotline
Last modified: Tue Oct 27 12:20:00 EST ./usr/share/doc/fv/pow/Ruler.html0000644000000000000000000000170011034357422015567 0ustar rootroot Measure the distance

Measure the distance

User can use this simple tool to measure the distance between two points in pixels or angle. When the measure dialog box is open, POW is in the "Ruler" mode. The user can place the mouse at the first point and click-and-drag to the second point with the right mouse button down. When the mouse button is released, the measured values will be shown on the dialog box. The user can also change the position of either end or move the whole ruler by click-and-drag the middle mouse with the left mouse. When the dialog box is closed, pow will return to the normal mode.
The FTOOLS help hotline
Last modified: Tue Oct 27 12:20:00 EST ./usr/share/doc/fv/pow/Scripting.html0000644000000000000000000005213211034357422016445 0ustar rootroot POW Scripting

POW Scripting Guide

Because fv and POW are written in Tcl, they are inherently scriptable. So long as one knows the necessary data structures and function calls, everything POW does can be controlled by a user-created Tcl script running inside of POW. This, however, is a formidable task. Plus, POW's internal behavior and data are subject to change with each new release.

To make scripting possible, then, a simplified (and hence limited) script interface has been added to POW. It consists of a small set of commands which perform the basic operations of creating and modifying graphs. Future versions should contain more capabilities.


Operational Summary


There are several ways to access POW's scripting commands. The simplest is to write a Tcl script which uses the commands directly and then execute it within POW's powCmds namespace. As POW has no file capabilities nor command console of its own, this currently can be done only if implemented within an application containing POW, such as fv. (See fv's Scripting Guide for details on executing POW commands within fv.) This scripting method is useful for implementing macros which can perform certain common operations at the user's request, such as setting specific graph options.

Alternatively, POW can be scripted by other programs, allowing those programs to make use of POW's capabilities remotely. These programs, however, do not need to be written in Tcl so long as they can communicate with POW. Ced by oth appropriate) resize handles. Boxes and Ellipses have one of each type, but Points have neither. A shape is rotated or resized (for Polygons and Lines, it is more a matter of repositioning points) by clicking the relevant handle with the left mouse button and dragging it to a new location. When the mouse cursor is over one of the handles, the cursor changes to a double-arrow, indicating that point can be dragged. When the mouse button is released the dialog's list of regions and current region information are updated with the new information.

To move a region, simply click the left mouse button inside the region and drag it to the new location. Because clicking on a region makes it the current region, moving a region can be performed on any region, not just the current one. When inside a region, the cursor changes to a 4-sided arrow and the region's outline thickens. The current region can also be moved via the keyboard. When the POW window is in the foreground, shift-arrow will move the current shape one screen pixel in the arrow's direction. Control-arrow moves the shape 10 pixels.

Polygons can be modified in two additional ways. Points can be deleted by dragging a point onto one of its adjacent points. A point can also be inserted by clicking and dragging one of the handles with the right mouse button (Command-Click on Mac OS). This inserts the new point before the one clicked. If this is incorrect, immediately drag the new point back onto the first to delete it (no need to release the mouse button) and then click and drag on the next point.

The Delete button in the Region dialog deletes the current region, and the next region in the list (or previous region if deleting the last region) becomes the current region. All the regions can be deleted with the Clear All button.

Coordinate Systems

Region parameters can be displayed in one of several formats selectable by a popup menu just below the list of regions in the Region dialog. The first is Image format wherein positions and size parameters are reported in the pixel coordinates of the image. If the image has a linear scaling, the Linear format will report coordinates in this scaled coordinate system instead of pixels. If WCS information is available for the graph, region parameters can be displayed in celestial coordinates as degrees. The formats FK4, FK5, Galactic, Ecliptic, and ICRS each report region positions and sizes as degrees, but POW currently does not convert between these formats; the user must specify the appropriate system which will then be written to the region file when saved. Finally, the Degrees format signifies a mixed style used by SAOtng wherein positions are in degrees, but sizes are in pixels.

The final 2 elements of the popup menu select the formatting to use when displaying degree values. Decimal Degrees format shows values as ordinary decimals with RA ranging over 0-360 and Declination over -90 to +90. HHMMSS Degrees instead displays decimals in hour:minute:second format.

Saving/Opening Region Files

At the bottom of the Region dialog are a pair of Open and Save buttons which will re