Документ взят из кэша поисковой машины. Адрес оригинального документа : http://hea-www.harvard.edu/RD/saotng/regionnames.html
Дата изменения: Unknown
Дата индексирования: Tue Oct 2 00:43:35 2012
Кодировка:

Поисковые слова: galactic center
Region Names and Colors

Region Names and Colors

SAOtng can associate names with region markers in order to aid users in remembering the significance of the region. You can use the same name with multiple regions, thus creating classes of regions instead of individually named regions. Region marker retrieval and deletion can act on these classes or in individually named regions.

By default, marker regions that you create in SAOtng are defined to be either "source" regions or "background" regions and are colored green and red, respectively. ("Include" and "exclude" variations of these regions are delineated with solid and dotted lines.) This type name is controlled by the "Set Type (and Color)" option in the marker menu (activated using the right mouse button within a region).

When these markers are retrieved via the "regions" public access point, their region name is specified as a comment after the region:

    # filename:     /proj/rd/data/coma.fits
    # format:       pixels
    +circle(364,593,20)     # source
    +circle(251,186,28)     # background
When a file containing the regions is loaded into SAOtng, the region types are again given the appropriate colors, as described below.

Regions can be retrieved (or deleted) by name using glob-style pattern matching. For example, if you name a set of regions using the same name "source" then you can retrieve all of these regions using:

    xpaget SAOtng regions source
and delete them using:
    echo "regions delete source" | xpaset SAOtng
If you name a set of regions using "source1", "source2", ..., source100, then you can retrieve these regions using:
    xpaget SAOtng regions "source*"
and delete them using:
    echo "regions delete source*" | xpaset SAOtng
The first 9 regions can be retrieved using:
    xpaget SAOtng regions "source[1-9]"
and deleted using:
    echo "regions delete source[1-9]" | xpaset SAOtng
Note that patterns must be enclosed in quotes to avoid problems with the shell.

Colors can be associated with names for regions. An initial set of name/color associations can be specified using the -rnames command switch. This switch takes a file of region names/colors as an argument. It tells SAOtng to associate a new set of names with the specified colors. For example:

  # This is an example of the rnames support ...
  # The file format is:
  # NAME			Color
  #--------------		-----
  Galaxy			blue
  Star				red
  "Unknown Object"	 	yellow
will associate colors with 3 new classes of objects. The "Set Type (and Color)" menu will contain these 3 types instead of the default "source" and "background", and xpaget will return these names as object types. Note that names containing whitespace must be enclosed in quotes. Names and colors are separated by whitespace. Valid colors are black, white, red, green, blue, cyan, yellow, magenta, purple, and darkslategray.

It is possible to change the name/color associations on the fly using the "Edit Region/Color Association" menu option in the Markers menu. Use ^N to move forward between lines and ^P to move back. You can edit the names and/or colors. You can add a new name by typing ^M and (which adds a blank line), ^P to back up to that line, and then insert the name/color pair, separated by whitespace. The "Update Markers to Current Association" menu option will change the current markers to match the new color specification. (Of course, all markers created from then on will utilize the new name/color association.)

If a region name is used for which no color is defined, the associated region marker is given a default color (which is either green or the first color in a list of names/color associations). Thus, for example, you can load a set of markers such as:

    # filename:     /proj/rd/data/coma.fits
    # format:       pixels
    +circle(364,593,20)     # target_source
    +circle(251,186,28)     # target_background
without the "target_*" names having to be defined in a name/color association file.
Last Updated February 10, 1998