1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878
|
<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="GENERATOR" content="Mozilla/4.78 [en] (X11; U; Linux
2.4.7-10 i686) [Netscape]">
<title>Analysis</title>
</head>
<body link="#0000ee" alink="#ff0000" bgcolor="#ffffff" text="#000000"
vlink="#551a8b">
<h3><img alt="" src="../sun.gif" height="98" align="middle"
width="100"> Analysis</h3>
<blockquote>
<p>Each file type known to DS9 can have user-defined analysis
commands associated with it. These analysis commands are defined
at start-up time , or loaded by the user, by means of an ASCII
analysis description file. The analysis commands are available
for execution, either via the <i>Analysis Menu </i>or the XPA
point <i>Analysis</i>. In addition, commands may be <i>bound</i>
to events, such as keystrokes or mouse clicks. This type of
command is called a bind command.<br>
</p>
<p>DS9 searches for an analysis file named <tt>ds9.ans</tt> or <tt>ds9.analysis</tt>
in the current directory and <tt>$HOME</tt> to be loaded at
startup. In addition, DS9 will search the following directories
for any analysis files to be loaded at startup in the form of <tt>*.ds9</tt>:
the current directory, <tt>$HOME/bin</tt>, <tt>/usr/local/bin</tt>,
<tt>/opt/local/bin</tt>, and <tt>/soft/saord/bin</tt>. Finally,
the user may specify analysis files to be loaded at startup in
the preferences analysis panel. The user may also load or clear
current analysis commands via command line options or the <i>Analysis
m</i>enu<i>.</i></p>
<p>When activated, either from the menu, XPA, or bound event, an
analysis command first is macro-expanded to fill in user-defined
arguments and then is executed externally. Results may be
displayed in a separate text window, plot window, or in a image
frame. </p>
<a href="#Syntax">Syntax</a> <br>
<a href="#CommandType">Command Type</a> <br>
<a href="#Macros">Macros</a> <br>
<a href="#Help">Help</a> <br>
<a href="#Web"> </a><a href="#Parameters">Parameters</a> <br>
<a href="#HierarchicalMenus">Hierarchical Menus</a> <br>
<a href="#Sample">Sample</a>
<p><b><a name="Syntax"></a>Syntax</b></p>
The analysis file that defines the known analysis commands
consists of one or more file descriptors, each of which has the
following format:
<blockquote> <tt>Menu label to be used</tt> <br>
<tt>A space separated list of file templates</tt> <br>
<tt>Command type [menu | bind <event>]</tt> <br>
<tt>The command line for the analysis program</tt> </blockquote>
<p>Task names may contain space characters. All lines may be
indented. Also, the '#' character is a comment character. A
separator can be inserted in the menu by specifying the
following sequence '---'.</p>
<tt>Example:</tt>
<blockquote> <tt># this will insert a menu separator</tt> <br>
<tt>---</tt> </blockquote>
<p><b><a name="CommandType"></a>Command Type</b></p>
<p>The third line indicates the type of command. </p>
<blockquote>
<p><b>menu</b></p>
<p>A <tt>menu</tt> command creates an menu option under the <i>Analysis
</i>menu option, and can be invoked by the user via the GUI or
XPA.</p>
<tt>Example:</tt>
<blockquote> <tt># Menu command example</tt><br>
<tt>My Analysis Task</tt><br>
<tt> </tt><tt>*.fits</tt> <br>
<tt>menu</tt> <br>
<tt>$data | doit | $text</tt> </blockquote>
<p><b>bind</b></p>
<p>A <tt>bind</tt> command is a command that is bound to an
event. When the event occurs, the command is executed. Types
of events available include all TK events, including all <i>keystrokes</i>
and <i>mouse clicks.</i> If a command is bound to an event
other that a <i>keystroke</i>, care must be taken to not to
interfere with other internal DS9 events. </p>
<p>To bind to a key stroke, use the following command type:</p>
<blockquote> <tt>bind <keystroke> </tt><br>
</blockquote>
<tt>Example:</tt>
<blockquote> <tt># Bind command example</tt><br>
<tt>Print coordinates</tt><br>
<tt>*.fits</tt><br>
<tt>bind x</tt><br>
<tt>echo "$x $y" | $text</tt><br>
</blockquote>
<p><b>web</b></p>
<p>A <tt>web</tt> command allows the user to invoke the
internal web browser from the analysis menu.</p>
<tt>Example:</tt>
<blockquote> <tt> # web command example<br>
HTTP based<br>
*<br>
web<br>
http://hea-www.harvard.edu/RD/ds9/ref/index.html<br>
<br>
File based<br>
*<br>
web<br>
file:/home/joye/index.html<br>
</tt> </blockquote>
</blockquote>
<p><b><a name="Macros"></a>Macros</b></p>
<p>The following macros are macro-expanded to fill in user-defined
arguments before the command is executed. Strings that contain
$<macroname> that user does not want to be expanded may be
escaped by using $$<macroname>. All strings that contain
$<string> that are not a macro name will not be
affected.</p>
<p>For example:</p>
<blockquote> <tt>echo "$$data $foo" | $text</tt><br>
</blockquote>
<p>will display a text dialog that contains "$data $foo"</p>
<p><b>$width<br>
$height<br>
$depth</b></p>
<p>Substitute the width, height, or depth of the data file in the
command line. </p>
<tt>Syntax:<br>
</tt> <tt> $width</tt><br>
<tt> $height</tt><br>
<br>
<tt>Example:<br>
</tt> <tt> echo "$width $height $depth" | $text</tt>
<br>
<p><b>$bitpix</b></p>
<p>Substitute the bitpix of the data file in the command line. </p>
<tt>Syntax:<br>
</tt> <tt> $bitpix</tt> <br>
<br>
<tt>Example:<br>
</tt> <tt> echo "$bitpix" | $text</tt>
<p><b>$data</b></p>
<p>Data from the current frame becomes the input data to the
command string. This data is in the form of a FITS image. This
macro can only used at the beginning of the command string. </p>
<tt>Syntax:<br>
</tt> <tt> $data</tt> <br>
<br>
<tt>Example:<br>
</tt> <tt> $data | dosomething | $text</tt>
<p><b>$entry</b></p>
<p>Display an entry modal dialog. The returned string is
substituted. If <tt>cancel</tt> is selected, the command line
is not executed. </p>
<tt>Syntax:<br>
</tt> <tt> $entry(<message>)</tt><br>
<br>
<tt>Example:<br>
</tt> <tt> echo "$entry(Enter something here)"
| $text</tt>
<p><b>$env</b></p>
<p>Substitute the value of a shell environment variable. </p>
<tt>Syntax:<br>
</tt> <tt> $env(<shell variable>)</tt><br>
<br>
<tt>Example:<br>
</tt> <tt> echo "$env(PATH)" | $text</tt>
<p><b>$filedialog</b></p>
<p>Display the standard file dialog. Substitutes the returned
pathname. Argument specifies if an open file or save file dialog
is invoked.</p>
<tt>Syntax:<br>
</tt> <tt> $filedialog([open|save])</tt><br>
<br>
<tt>Example:<br>
</tt> <tt> echo "$filedialog(open)" | $text</tt><br>
<p><b>$filename</b></p>
<p>Substitute the filename of the data file in the command line. A
full filename includes any absolute or relative path. A root
filename contains no path. A (2D) subsection defines a subimage
from <tt>xmin,ymin</tt> to <tt>xmax,ymax</tt>. For Frame3D, a
2D subsection will also include the current slice (PLANE=)
parameter if not 1. A 3D subsection defines a subimage from <tt>xmin,ymin,zmin</tt>
to <tt>xmax,ymax,zmax</tt> and no PLANE parameter.<br>
</p>
<tt>Syntax:<br>
</tt> <tt> $filename # filename with extname,
(2d) subsections, filters</tt><br>
<tt> $filename(root|root,base) # root filename
with </tt><tt>with extname, </tt><tt>no subsections, no
filters)</tt> <br>
<tt> $filename(full|full,base) # full filename </tt><tt>with
extname, </tt><tt>no subsections, no filters)</tt> <br>
<br>
<tt>Example:<br>
</tt> <tt> dosomething $filename | $text</tt> <br>
<tt> dosomething $filename(root) | $text<br>
</tt><br>
<b>$filename[$regions]</b>
<p>Combination of <tt>$filename </tt>and <tt>$regions </tt>macros.
Generates
a
series of filenames, each with a region. </p>
<tt>Syntax:<br>
</tt> <tt> $filename[$regions]</tt> <br>
<tt> $filename[$regions(<options>)]</tt> <br>
<br>
<tt>Example:<br>
</tt> <tt> dosomething $filename[$regions] |
$text</tt>
<p><b>$geturl</b></p>
<p>This macro differs from all other macros, including $<tt>url</tt>,
in that no subprocess pipe is created. Only HTTP is supported.
The contents of the url are retrieved and sent to $<tt>text</tt>,
$<tt>plot</tt>, or $<tt>image.</tt> No other processing is
allowed. The primary purpose of this macro is to support
external analysis for the Windows platform, which has no
subprocess support. </p>
<tt>Syntax:<br>
</tt> <tt>
$geturl(http://<hostname>:<port>/<query>)</tt>
<br>
<br>
<tt>Example:<br>
</tt> <tt> $geturl(http://foo.bar.edu/foo.html)
| $text</tt><br>
<p><b>$image</b></p>
<p>The resulting image data is display in a DS9 frame. This macro
should be the last macro of a command line. Optional parameter
indicates if a new frame and what type of frame is created for
the new data. The macro is removed from the command line before
execution. </p>
<tt>Syntax:<br>
</tt> <tt> $image</tt> <br>
<tt> $image([new|rgb|3d|current])</tt> <br>
<br>
<tt>Example:<br>
</tt> <tt> doit | $image(new)</tt>
<p><b>$message</b></p>
<p>Display a message dialog box, with option buttons. After
displaying the message, the macro is removed from the command
line before execution. If <tt>cancel</tt> or <tt>no</tt> is
selected, the command line is not executed. </p>
<tt>Syntax:<br>
</tt> <tt> $message(<message>)</tt> <br>
<tt>
$message([ok|okcancel|yesno],<message>)</tt><br>
<br>
<tt>Example:<br>
</tt> <tt> $message(okcancel,This is a
Message)| doit | $text</tt>
<p><b>$null</b></p>
<p>Expect no output or results from analysis task. Note: no error
message will be returned if the analysis task fails to execute
correctly. </p>
<tt>Syntax:<br>
</tt> <tt> $null</tt><br>
<br>
<tt>Example:<br>
</tt> <tt> echo "Hello, world" > foo | $null</tt>
<p><b>$pan</b></p>
<p>Substitute current pan location of the particular data file are
returned. The default coordinate system is <tt>physical</tt>. </p>
<tt>Syntax:<br>
</tt> <tt> $pan<br>
</tt> <tt> $pan(<coordinate
system>,<format>)</tt> <br>
<p>where:</p>
<tt> coordinate system =
[image|physical|detector|amplifier|wcs|wcsa...wcsz]</tt> <br>
<tt> sky
frame =
[fk4|fk5|icrs|galactic|ecliptic]</tt> <br>
<tt> sky
format =
[hms|sexagesimal|degrees]</tt><br>
<br>
<tt>Example:<br>
</tt> <tt> echo $pan(fk5,sexagesimal) | $text</tt><br>
<p><b>$plot</b></p>
<p>Display data in plot window. This macro should be the last
macro of a command line. The data is read via <tt>STDIN</tt>
and consist of a pair of coordinates, with option error values.
(<tt>xy, xyex, xyey, xyexe</tt>y) Default dimension is <tt>xy.</tt>
The macro is removed from the command line before execution. </p>
<p>For <tt>$plot(stdin)</tt> only: </p>
<p>The title, x axis label, and y axis label are assumed to be on
the first line of input, delimited with a new-line. However, if
the data starts with $<tt>BEGINTEXT</tt>, all text between $<tt>BEGINTEXT</tt>
and $<tt>ENDTEXT</tt> will be removed from the data and
displayed in a separate text dialog window, with the remaining
data, including the title, x axis label, and y axis label, will
be displayed in a plot window. Furthermore, if the data contains
the string $<tt>ERROR,</tt> an error is assumed to have occurred
and a text dialog window is displayed only. </p>
<tt>Syntax:<br>
</tt> <tt> $plot</tt> <br>
<tt> $plot(,,,)</tt> <br>
<tt> $plot(<title>,<x axis
label>,<y axis label>,[xy|xyex|xyey|xyexey])</tt> <br>
<tt> $plot(stdin)</tt> <br>
<br>
<tt>Example:<br>
</tt> <tt> doit | $plot(This is aTitle,X Axis,Y
Axis)<br>
</tt> <tt> doit | $plot(stdin)</tt>
<p><b>$regions</b></p>
<p>Substitute region definition in specified region format,
coordinate system, and coordinate format. The default coordinate
system is <tt>physical</tt>, default coordinate format <tt>degrees</tt>,
and default region format <tt>DS9</tt>. Arguments may appear in
any order, as long as they are separated by ',' and no spaces.
If one or more properties are specified, only regions with
all of the specified properties will be substituted. </p>
<tt>Syntax:<br>
</tt> <tt> $regions</tt> <br>
<tt> $regions(<options>)</tt>
<p>where options are one of the following: </p>
<tt> regions format =
[ds9|ciao|saotng|saoimage|pros|xy]</tt> <br>
<tt>
property =
[include|exclude|source|background]</tt> <br>
<tt> coordinate system =
[image|physical|detector|amplifier|wcs]</tt> <br>
<tt> sky
frame =
[fk4|fk5|icrs|galactic|ecliptic]</tt> <br>
<tt> sky
format =
[sexagesimal|degrees]</tt>
<p>also, the old <i>SAOTNG</i> formats are also supported: </p>
<tt> $regions_pixels</tt> <br>
<tt> $regions_degrees</tt> <br>
<tt> $regions_hms</tt> <br>
<tt> $include_regions</tt> <br>
<tt> $include_regions_pixels</tt> <br>
<tt> $include_regions_degrees</tt> <br>
<tt> $include_regions_hms</tt> <br>
<tt> $exclude_regions</tt> <br>
<tt> $exclude_regions_pixels</tt> <br>
<tt> $exclude_regions_degrees</tt> <br>
<tt> $exclude_regions_hms<br>
</tt> <br>
<tt>Example:<br>
</tt> <tt> dosomething $regions | $text</tt> <br>
<tt> dosomething $regions(pros) | $text</tt> <br>
<tt> dosomething $regions(source,wcs,fk5) |
$text</tt> <br>
<tt> dosomething
$regions(saotng,background,exclude,ecliptic,sexagesimal) | $text</tt>
<p><b>$text</b></p>
<p>Display text in a text dialog window. This macro should be the
last macro of a command line. To display text from only STDOUT
use '|' as the pipe command. To display text from both STDOUT
and STDERR, use '|&' as the pipe command. No parameters are
required. The macro is removed from the command line before
execution. </p>
<tt>Syntax:<br>
</tt> <tt> $text</tt> <br>
<br>
<tt>Example:<br>
</tt> <tt> doit | $text # stdout<br>
doit |& $text # stdout and stderr<br>
</tt>
<p><b>$url</b></p>
<p>URLs are processed and stored in a temporary file. Only HTTP
and anonymous FTP are supported. </p>
<tt>Syntax:<br>
</tt> <tt>
$url(http://<hostname>:<port>/<query>)</tt> <br>
<tt>
$url(ftp://<hostname>/<filename>)</tt><br>
<br>
<tt>Example:<br>
</tt> <tt>
$url(http://legacy.gsfc.nasa.gov/rosat/data/p000s26b.img.Z) |
uncompress | $image</tt> <br>
<tt>
$url(ftp://legacy.gsfc.nasa.gov/rosat/data/hri/images/rh100193_img.fits)
| $image<br>
</tt>
<p><b>$vo_method</b></p>
<p>Returns the vo method. </p>
<tt>Syntax:<br>
</tt> <tt> $vo_method</tt> <br>
<br>
<tt>Example:<br>
</tt> <tt> echo '$vo_method' | $text</tt><br>
<p><b>$value<br>
</b></p>
<p>Substitute the value at the location of the cursor of an bind
event.<br>
</p>
<tt>Syntax:<br>
</tt> <tt> $value<br>
<br>
Example:<br>
echo "$value" | $text</tt><br>
<p><b>$x<br>
$y<br>
$z<br>
</b></p>
<p>Substitute coordinates of an bind event. When a bind event is
triggered, the <i>x,y </i>coordinates of the mouse of the
particular data file are returned. The default coordinate system
is <tt>physical</tt>. This macro is only available for bind
commands. For datacubes, the z coordinate is returned based on
the current slice selected.<br>
</p>
<tt>Syntax:<br>
</tt> <tt> $x</tt> <br>
<tt> $x(<coordinate
system>,<format>)</tt> <br>
<tt> $y</tt> <br>
<tt> $y(<coordinate
system>,<format>)<br>
$z<br>
$z(<coordinate system>)<br>
</tt>
<p>where:</p>
<tt> coordinate system =
[image|physical|detector|amplifier|wcs|wcsa...wcsz]</tt> <br>
<tt> sky
frame =
[fk4|fk5|icrs|galactic|ecliptic]</tt> <br>
<tt> sky
format =
[hms|sexagesimal|degrees]</tt> <br>
<br>
<tt>Example:<br>
</tt><tt> echo "$x $y" | $text<br>
echo "$x $y $z" | $text<br>
echo "$x(fk5,sexagesimal)
$y(fk5,sexagesimal)" | $text<br>
</tt><tt> echo "$x(wcs) $y(wcs) $z(wcs)" | $text</tt><br>
<p><b>$xpa</b></p>
<p>Returns the xpa access point name. </p>
<tt>Syntax:<br>
</tt> <tt> $xpa</tt> <br>
<br>
<tt>Example:<br>
</tt> <tt> echo '$xpa' | $text</tt>
<p><b>$xpa_method</b></p>
<p>Returns the xpa method. </p>
<tt>Syntax:<br>
</tt> <tt> $xpa_method</tt> <br>
<br>
<tt>Example:<br>
</tt> <tt> echo '$xpa_method' | $text</tt>
<p><b><a name="Help"></a>Help</b></p>
<p>The user may define his own <tt>HELP</tt> message. This
message will be available to the user as a menu item. An
optional label maybe specified. The default label is <tt>Help</tt>.
When invoked, an text dialog window will appear, containing the
message. Multiple <tt>HELP</tt> items maybe defined within a
menu or across hierarchical menus. </p>
<tt>Example:</tt>
<blockquote><tt>help Main Help</tt> <br>
<tt>A help message may contain</tt> <br>
<tt>multiple lines of description of the tasks</tt> <br>
<tt>in the menu or menus</tt> <br>
<tt>endhelp</tt> </blockquote>
<p><b><a name="Parameters"></a>Parameters</b></p>
<p>The user may define his own macros or parameters to be
evaluated before the command line is executed. To do this, the
user defines a param segment that is referenced in the command
line. The param definition has the follow format: </p>
<blockquote> <tt>param <name></tt> <br>
<tt><variable> <entry | checkbox | menu>
<title> <default> <{comment}></tt> <br>
<tt>...</tt> <br>
<tt>endparam</tt> </blockquote>
<p>or </p>
<blockquote> <tt>param <name></tt> <br>
<tt>@<iraf param filename></tt> <br>
<tt>end</tt> </blockquote>
<p>The definition either consisted of a number of variables, one
per row, or the name of a IRAF style parameter file. DS9 will
look for the IRAF parameter file in: </p>
<blockquote> <tt>./<filename></tt> <br>
<tt>$UPARM/<filename></tt> <br>
<tt>$HOME/iraf/<filename></tt> </blockquote>
<tt>Example:<br>
</tt>
<blockquote> <tt>param foobar</tt> <br>
<tt>var1 entry {Variable 1} default {this is a entry}</tt> <br>
<tt>var2 checkbox {Variable 2} 1 {this is a checkbox}</tt> <br>
<tt>var3 menu {Variable 3} AAA|BBB|CCC {this is a menu}</tt> <br>
<tt>endparam</tt> </blockquote>
<p>To use parameters, specify the param name at the beginning of
your command line: </p>
<blockquote> <tt>Parameter Test</tt> <br>
<tt>*</tt> <br>
<tt>menu</tt> <br>
<tt>$param(foobar); echo "$var1 $var2 $var3" | $text</tt> </blockquote>
<p>When the menu item is selected, the user will be presented with
a dialog box that contains <i>entry, checkbox, or menu </i>choices
for each variable specified. If the user clicks ok, the values
are substituted in the command line before execution. </p>
<p><b><a name="HierarchicalMenus"></a>Hierarchical Menus</b></p>
<p>The user may define hierarchical menus. Use this to organized
crowded menus. To do this, frame menu entries with <tt>hmenu
<label> </tt>and <tt>endhmenu</tt>. Hierarchical menu
labels may contain spaces. Multiple levels maybe implemented. </p>
<tt>Example:<br>
</tt>
<blockquote> <tt>hmenu Stuff</tt> <br>
<tt> hello</tt> <br>
<tt> *</tt> <br>
<tt> menu</tt> <br>
<tt> echo "Hello" | $text</tt>
<p><tt> world</tt> <br>
<tt> *</tt> <br>
<tt> menu</tt> <br>
<tt> echo "World" | $text</tt> </p>
<p><tt> hmenu More Stuff</tt> <br>
<tt> hello world</tt>
<br>
<tt> *</tt> <br>
<tt> menu</tt> <br>
<tt> echo "Hello
World" | $text</tt> <br>
<tt> endhmenu</tt> <br>
<tt>endhmenu</tt></p>
</blockquote>
<p>Will create an hierarchical menu with two members, <tt>hello</tt>
and <tt>world</tt>. </p>
<p><b><a name="Sample"></a>Sample</b></p>
<tt>#<br>
# Analysis command descriptions:<br>
# menu label<br>
# file templates<br>
# menu/bind<br>
# analysis command line<br>
<br>
param foo<br>
var1 entry entry 40 {this is a entry}<br>
var2 checkbox checkbox 1 {this is a checkbox}<br>
var3 menu menu AAA|BBB|CCC {this is a menu}<br>
endparam<br>
<br>
param bar<br>
@analysis.par<br>
endparam<br>
<br>
param foobar<br>
@tvdisply.par<br>
endparam<br>
<br>
param ltc<br>
bins entry "Enter number of [t1:t2:]bins" 0
"('0' for default number of bins)"<br>
endparam<br>
<br>
# Help Main Help<br>
<br>
help Main Help<br>
These menus contain a test for each possible feature<br>
<br>
supported by the ds9 (blank line above)<br>
endhelp<br>
---<br>
<br>
hmenu Test Web<br>
help Web Help<br>
Help for web features<br>
endhelp<br>
<br>
Web Test url<br>
*<br>
web<br>
http://hea-www.harvard.edu/RD/ds9/<br>
<br>
Web Test file<br>
*<br>
web<br>
file:/home/joye/saods9/ds9/tests/hv.html<br>
endhmenu<br>
<br>
hmenu Test Basics<br>
help Basic Help<br>
Help for basic features<br>
endhelp<br>
---<br>
Test escape char # this is a comment<br>
*<br>
menu<br>
echo "this is not a macro $$xpa" | $text<br>
<br>
Test pass thru # this is a comment<br>
*<br>
menu<br>
echo "this is not a macro $foo" | $text<br>
<br>
Test $xpa # this is a comment<br>
*<br>
menu<br>
echo $xpa | $text<br>
<br>
Test $xpa_method<br>
*<br>
menu<br>
echo $xpa_method | $text<br>
</tt><tt><br>
Test $vo_method<br>
*<br>
menu<br>
echo $vo_method | $text<br>
<br>
</tt><tt> Test $filename<br>
*.fits<br>
menu<br>
echo $filename | $text<br>
<br>
Test $filename(root)<br>
*.fits<br>
menu<br>
echo $filename(root) | $text<br>
<br>
Test $xdim $ydim $bitpix<br>
*.fits<br>
menu<br>
echo "$xdim $ydim $bitpix" | $text<br>
<br>
</tt><tt> Test $xcen $ycen<br>
*.fits<br>
menu<br>
echo "$xcen $ycen" | $text<br>
<br>
</tt><tt> Test $env<br>
*<br>
menu<br>
echo $env(PATH) | $text<br>
endhmenu<br>
<br>
hmenu Test Regions<br>
help Regions Help<br>
Help for regions features<br>
endhelp<br>
---<br>
Test $regions<br>
*.fits<br>
menu<br>
echo "$regions
ds9_s:$regions(ds9,source,image)
ciao_b:$regions(ciao,background)
saotng_i:$regions(saotng,include,wcs,fk5)
pros_e:$regions(pros,exclude,wcs,fk5,sexagesimal)
xy_be:$regions(xy,background,exclude,wcs,fk4,hms)" | $text<br>
<br>
Test $regions wcs<br>
*.fits<br>
menu<br>
echo "$regions(ds9,wcs)
$regions(ds9,wcs,fk5,sexagesimal) $regions(ds9,wcsa) " | $text<br>
<br>
Test $include_regions_pixels<br>
*.fits<br>
menu<br>
echo "ds9_s: $source_regions ds9_b:
$background_regions_pixels ds9_i: $include_regions_degrees
ds9_e: $exclude_regions_hms" | $text<br>
<br>
Test $filename $regions<br>
*.fits<br>
menu<br>
echo "$filename[$regions]" | $text<br>
<br>
Test $filename $regions()<br>
*.fits<br>
menu<br>
echo "$filename[$regions()]" | $text<br>
endhmenu<br>
<br>
hmenu Test Output<br>
help Output Help<br>
Help for output features<br>
endhelp<br>
---<br>
Test $null<br>
*<br>
menu<br>
echo "This is Text" > /dev/null | $null<br>
<br>
Test $text<br>
*<br>
menu<br>
echo "This is Text" | $text<br>
<br>
Test $text stderr<br>
*<br>
menu<br>
ls foofoofoo | $text<br>
<br>
Test $plot<br>
*<br>
menu<br>
cat xy.dat | $plot<br>
<br>
Test $plot(title,x,y,xyey)<br>
*<br>
menu<br>
cat xye.dat | $plot(Title,X Axis,Y Axis,xyey)<br>
<br>
Test $plot(title,x,y,xyexey)<br>
*<br>
menu<br>
cat xyee.dat | $plot(Title,X Axis,Y
Axis,xyexey)<br>
<br>
Test $plot(title,x,y,4)<br>
*<br>
menu<br>
cat xyey.dat | $plot(Title,X Axis,Y Axis,4)<br>
<br>
Test $plot(title,x,y,5)<br>
*<br>
menu<br>
cat xyeye.dat | $plot(Title,X Axis,Y Axis,5)<br>
<br>
Test $plot(stdin)<br>
*<br>
menu<br>
cat xye.stdin.dat | $plot(stdin)<br>
<br>
Test $plot(stdin) text<br>
*<br>
menu<br>
cat xye.stdin.text.dat | $plot(stdin)<br>
<br>
Test $plot(stdin) error<br>
*<br>
menu<br>
cat xy.stdin.error.dat | $plot(stdin)<br>
<br>
Test $data<br>
*.fits<br>
menu<br>
$data | $image(new)<br>
<br>
Test $image<br>
*<br>
menu<br>
cat img16.fits | $image<br>
endhmenu<br>
<br>
hmenu Test Dialogs<br>
help Dialogs Help<br>
Help for dialog features<br>
endhelp<br>
---<br>
Test $message(message)<br>
*<br>
menu<br>
$message(ok,This is a Message) | echo "hello"
| $text<br>
<br>
Test $message(ok,message)<br>
*<br>
menu<br>
$message(ok,This is a Message) | echo "World"
| $text<br>
<br>
Test $entry(message)<br>
*<br>
menu<br>
echo "$entry(Enter Something)" | $text<br>
endhmenu<br>
<br>
hmenu Test Params<br>
help Param Help<br>
Help for param features<br>
endhelp<br>
---<br>
Test $param<br>
*<br>
menu<br>
$param(foo); echo "$var1 $var2 $var3" | $text<br>
<br>
Test $param @file<br>
*<br>
menu<br>
$param(bar); echo "$var1 $var2 $var3" | $text<br>
endhmenu<br>
<br>
hmenu Test Network<br>
help Network Help<br>
Help for network features<br>
endhelp<br>
---<br>
Test $url(http://)<br>
*<br>
menu<br>
$url(http://legacy.gsfc.nasa.gov/FTP/rosat/data/cdrom/vol1/IMAGES/00h/p000s26b.img.Z)
|
gunzip
| $image<br>
<br>
Test $url(ftp://)<br>
*<br>
menu<br>
$url(ftp://legacy.gsfc.nasa.gov/rosat/data/hri/images/fits/rh100193_img.fits)
| $image<br>
<br>
Test $geturl $text<br>
*<br>
menu<br>
$geturl(http://hea-www.harvard.edu/RD/saord-cgi/funtools?funcnts+$filename+$regions(source,,)+$regions(background,,))|$text<br>
<br>
Test $geturl $plotstd<br>
*<br>
menu<br>
$param(ltc);
$geturl(http://hea-www.harvard.edu/RD/saord-cgi/funtools?funhist_plot+$filename[$regions]+time+$bins)|$plot(stdin)<br>
endhmenu<br>
<br>
hmenu Test Other<br>
help Other Help<br>
Help for other features<br>
endhelp<br>
---<br>
Test $param @tvdisply<br>
*<br>
menu<br>
$param(foobar); echo "$frame $erase" | $text<br>
<br>
hmenu Test MultiLevel<br>
test<br>
*<br>
menu<br>
echo "Hello World" | $text<br>
endhmenu<br>
endhmenu<br>
<br>
$x $y<br>
*.fits<br>
bind x<br>
echo "$x $y" | $text<br>
<br>
$x(fk5,hms) $y(fk5,hms)<br>
*.fits<br>
bind y<br>
echo "$x(fk5,hms) $y(fk5,hms)" | $text<br>
<br>
$x(wcs,fk5,hms) $y(wcs,fk5,hms)<br>
*.fits<br>
bind z<br>
echo "$x(wcs,fk5,hms) $y(wcs,fk5,hms)" | $text<br>
</tt> </blockquote>
</body>
</html>
|