Example:tvmark.sh

From FITSH
Revision as of 22:07, 8 September 2016 by Apal (Talk | contribs)

Jump to: navigation, search

A well-known feature of IRAF is the tvmark task, intended to mark objects on images displayed by, most frequently, DS9. With the aid of the XPA libraries, we can implement this feature using simple shell scripting. The full working script can be download from here: tvmark.sh.

The option -h or --help prints some information about the usage of this script as a command line driven program:

Usage:  ./tvmark.sh [-h|--help] [-v|--version]
        [<input>]
        [-x|--col-xy <column_index_x>,<column_index_y>] 
        [-e|--circle [-r|--radius <r>]]
        [-q|--square [-s|--size <s>]]
        [-c|--color <c>]
        [-l|--col-label <column_index_label>
        [-f|--label '<label_format>']
        [-a|--label-color <c>]
        [-d|--delete]
 - in the label string, $<N> is replaced by the content of the <N>th column
   (like in AWK)
 - default format: --col-xy 1,2 --circle --color green --radius 4

This script can read its formatted input either from standard input or any simple text file. By default, the X and Y coordinates of the objects are expected to be in the first and second column, respectively. Lines starting with # are treated as comments.

Personal tools