Allows the specification of attribute values for an AST Object KPG1_ASSET
If the user supplies a value for the attribute using the given parameter, then the Object is returned
with the attribute set to the supplied value. The user supplies the attribute values as a GRP group
expression in which each element is an AST attribute setting. The group expression may comprise
persistent and/or temporary attributes, the former preceding the latter separated by a delimiting
string (see argument PARAM). Persistent values are recorded in the parameter’
s current value and so
can be re-used, whereas temporary attributes are not recorded and only apply to the current
invocation of a task.
Otherwise, if the Object already had an explicit value set for the attribute on entry (i.e. if AST_TEST returns .TRUE. for the attribute), then the value is unchanged on exit.
Otherwise, a search is made for a default value for the attribute using the search path described below.
If a default value is found for the attribute then the Object is returned with the attribute set to the
default value. The use of these defaults can be suppressed by including the string "
CLEAR"
as
the first element in the group of attribute values supplied for the specified environment
parameter.
Defaults are specified as a group of attribute setting strings within a "
defaults"
text file. This file is
found using the following search path:
1) If the environment variable APP_PARAM is defined (APP and PARAM in upper case), its value is taken to be the full path to the defaults file.
2) If APP_PARAM is not defined, the file $HOME/app_param.def is used (app and param in lower case).
3) If the file $HOME/app_param.def cannot be accessed, the file $KAPPA_DIR/app_param.def is used.
4) If the file $KAPPA_DIR/app_param.def cannot be accessed, the value of environment variable KAPPA_PARAM is taken to be the full path to the defaults file.
5) If KAPPA_PARAM is not defined, the file $HOME/kappa_param.def is used.
6) If the file $HOME/kappa_param.def cannot be accessed, the file $KAPPA_DIR/kappa_param.def is used.
Each attribute setting within a group of settings should be of the form "
name=value"
, where name
is taken to be the name of a Object attribute (or synonym set by KPG1_ASPSY), and
value
is taken to be the value to assign to the attribute. These attributes are described in SUN/210. No error
is reported if unrecognised attribute names or illegal attribute values are specified.
Before being used, the attribute settings are edited to replace any synonyms by their corresponding AST attribute names established by earlier calls to KPG1_ASPSY. Colour names are also replaced by corresponding PGPLOT colour indices.
"
KAPPA_DISPLAY"
), for use in messages. A non-alphanumeric prefix may prepend the actual parameter name. If present, this signifies the delimiter to separate persistent from temporary attributes, otherwise all attributes are regarded as persistent. The prefix may be one to three characters long. Underscore is regarded as alphanumeric. The standard delimiter is the plus sign.
The same non-alphanumeric delimiter may also appear as a suffix. Its presence indicates that this routine is being called more than once in an application for the same parameter. The suffix should appear in all but the last invocation.
Colour attribute values may be supplied in any form recognised by KPG1_PGCOL (e.g. colour name, MIN, MAX, integer index), and the nearest colour in the current KAPPA palette is used.
If a null value is supplied for the parameter, the error is annulled and the Object is returned unchanged (except for any defaults obtained using the usual search path).