m |
m |
||
Line 1: | Line 1: | ||
A well-known feature of IRAF is the [http://stsdas.stsci.edu/cgi-bin/gethelp.cgi?tvmark 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: [http://fitsh.net/static/scripts/tvmark/tvmark.sh tvmark.sh]. | A well-known feature of IRAF is the [http://stsdas.stsci.edu/cgi-bin/gethelp.cgi?tvmark 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: [http://fitsh.net/static/scripts/tvmark/tvmark.sh tvmark.sh]. | ||
+ | |||
+ | === Usage === | ||
The option <code>-h</code> or <code>--help</code> prints some information about the usage of this script as a command line driven program: | The option <code>-h</code> or <code>--help</code> prints some information about the usage of this script as a command line driven program: | ||
Line 19: | Line 21: | ||
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 <code>#</code> are treated as comments. | 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 <code>#</code> are treated as comments. | ||
+ | |||
+ | === Notes === | ||
+ | |||
+ | * If you intend to use this script conveniently, install it to a directory which is in your path (see <code>echo $PATH</code>). Here, ''installation'' means downloading and granting permission for execution (for instance, using <code>chmod +x tvmark.sh</code). | ||
+ | * If you intend to install this script system-wide, copy it as root to the directory <code>/usr/local/bin</code> and grant permission for code execution (for instance, using <code>chmod +x tvmark.sh</code). | ||
+ | * While this bash script can be retrieved here as <code>tvmark.sh</code>, you can safely rename it to <code>tvmark</code> and use it accordingly. |
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.
echo $PATH
). Here, installation means downloading and granting permission for execution (for instance, using chmod +x tvmark.sh</code).
/usr/local/bin
and grant permission for code execution (for instance, using chmod +x tvmark.sh</code).
tvmark.sh
, you can safely rename it to tvmark
and use it accordingly.