| mapkeyword | ctio | mapkeyword |
mapkeyword -- Replace image header keyword values with other values.
mapkeyword input keyword table
The task first reads the mapping table, specified in the table
parameter, and stores the keyword values and their mapping values into
a table in meory. This table is used later when the image headers are
being edited.
Then, for each image in the input list, the task reads the value of the
header keyword, specified in the keyword
parameter, from the image
header and replaces its value with the mapping value from the table in
memory.
If the keyword is not found in the image header then a warning message
is issued, and and the task continues processing the
next image in the input list.
If the keyword value read from the image header is not present in the
mapping table, then a waning message is issued. The keyword value is left
unchanged in this case.
Change the filter number into a name. The following mapping table would be used for the UBV system:
ct> type filetable 1 U 2 B 3 V ct> mapkeyword image*.imh FILTERS filetable verify- show+ noop- check- Image [image1.imh], Keyword [FILTERS]: [1] -> [U] Image [image2.imh], Keyword [FILTERS]: [2] -> [B] Image [image3.imh], Keyword [FILTERS]: [3] -> [V] Image [image4.imh], Keyword [FILTERS]: [2] -> [B] ct>
When a single word keyword value is converted to a multiple word value, the keyword value is enclosed between single quotes, in order to make it a single token. The problem arises when one tries to convert a quoted value into a single word value, and then back to a multiple word value. Since in the first conversion quotes are not removed, one will end with a value enclosed by two single quotes and each side. Unfortunately the IMIO routines will interpret this as a NULL string value, because of the two leading quotes.