Control of the editing can be through parameters, or from a text file whose format is described in topic "File Format".
The keywords " ", "COMMENT", and "HISTORY" are comment cards and do not have a value.
The keyword must exist except for the "Amend", "Write", and "Exist" commands.
Both KEYWORD and POSITION keywords may have an occurrence specified in brackets [] following the name. This enables editing of a keyword that is not the first occurrence of that keyword, or locate a edited keyword not at the first occurrence of the positional keyword. Note that it is not normal to have multiple occurrences of a keyword in a FITS header, unless it is blank, COMMENT or HISTORY. Any text between the brackets other than a positive integer is interpreted as the first occurrence.
The new keywords are inserted immediately before each corresponding position keyword. If any name in it does not exist in FITS array, or the null value (!) is supplied the consequences will be as follows. For a "Write", "Amend" (new keyword), or "Move" edit, the KEYWORD keyword will be inserted just before the END card or appended to FITS array when the END card does not exist; for an "Update" or "Amend" (new keyword) edit, the edit keyword is not relocated.
A positional keyword is only accessed by the "Move", "Amend", "Write", and "Update" editing commands.
The format is summarised below:
command keyword{[occurrence]}{(keyword{[occurrence]})} {value {comment}}
where braces indicate optional values, and occur is the occurrence of the keyword. In effect there are four fields delineated by spaces that define the edit operation, keyword, value and comment.
Both the editing keyword and position keyword may be compound to handle hierarchical keywords. In this case the form is keyword1.keyword2.keyword3 etc. All keywords must be valid FITS keywords. This means they must be no more than eight characters long, and the only permitted characters are uppercase alphabetic, numbers, hyphen, and underscore. Invalid keywords will be rejected.
Both the edit and position keyword may have an occurrence specified in brackets []. This enables editing of a keyword that is not the first occurrence of that keyword, or locate a edited keyword not at the first occurrence of the positional keyword. Note that it is not normal to have multiple occurrences of a keyword in a FITS header, unless it is blank, COMMENT or HISTORY. Any text between the brackets other than a positive integer is interpreted as the first occurrence.
Use a null value (' ' or " ") if you want the card to be a comment with keyword other than COMMENT or HISTORY. As blank keywords are used for hierarchical keywords, to write a comment in a blank keyword you must give a null edit keyword. These have no keyword appearing before the left parenthesis or bracket, such as (), [], [2], or (EPOCH).
For the Update, Write, and Amend modifications there is a special value, $V, which means use the current value of the edited keyword, provided that keyword exists. This makes it possible to modify a comment, leaving the value unaltered. In addition $V(keyword) requests that the value of the keyword given between the parentheses be assigned to the keyword being edited.
The value field is ignored when the keyword is COMMENT, HISTORY or blank, and the modification is to Update, Write, or Amend.
There is a special value, $C, which means use the current comment of the edited keyword, provided that keyword exists. This makes it possible to modify a value, leaving the comment unaltered. In addition $C(keyword) requests that the comment of the keyword given between the parentheses be assigned to the edited keyword.
To obtain leading spaces before some commentary, use a quote (') or double quote (") as the first character of the comment. There is no need to terminate the comment with a trailing and matching quotation character. Also do not double quotes should one form part of the comment.
KAPPA --- Kernel Application Package