KPG1_WRTA2

Puts a set of positions into a text file as a CAT catalogue

Description:

This routine writes the supplied positions to a CAT catalogue (see SUN/181). A dump of the supplied FrameSet (if any) is included in the text file as a set of " text" lines. A column is created with name " PIDENT" to contain the integer identifiers. A column is also created for each axis of the Base Frame, with a name equal to the Symbol attribute of the Axis (AXIS_ <n > is used if the Symbol is blank). The catalogue can be read using KPG1_RDLST (and also XCATVIEW etc.).

Invocation

CALL KPG1_WRTA2( PARAM, ARRDIM, NPOS, NAX, POS, IWCS, TITLE, ID0, IDENTS, KEYMAP, LABS, HIST, STATUS )

Arguments

PARAM = CHARACTER ( ) (Given)
The name of the parameter to use.
ARRDIM = INTEGER (Given)
The size of the first dimension of the positions array. This must be larger than or equal to NPOS.
NPOS = INTEGER (Given)
The number of positions to store in the file.
NAX = INTEGER (Given)
The number of axes for each position.
POS( ARRDIM, NAX ) = DOUBLE PRECISION (Given)
The positions to store in the file. POS( I, J ) should give the axis J value for position I. The positions should be in the Base Frame of the FrameSet supplied using argument IWCS.
IWCS = INTEGER (Given)
A pointer to an AST FrameSet to store with the positions.
TITLE = CHARACTER ( ) (Given)
A title to store at the top of the text file.
ID0 = INTEGER (Given)
The integer identifier value to associate with the first supplied position. Identifiers for subsequent positions increase by 1 for each position. If this is supplied less than or equal to zero, then its value is ignored and the identifiers supplied in array IDENTS are used instead.
IDENTS( NPOS ) = INTEGER (Given)
The individual integer identifiers to associate with each position. Only accessed if ID0 is less than or equal to zero.
KEYMAP = INTEGER (Given)
An optional AST KeyMap containing data for extra columns to add to the catalogue. It can be used (for instance) to add character columns to the catalogue. If a value of AST__NULL is supplied, no extra columns are added to the catalogue. Otherwise, the column names and values can be specified using either of the following two schemes:
  • If the KeyMap contains an entry called " COLNAMES" , it is assumed to be a vector entry holding the names of the columns. For each of these column names, the value to store in a particular row of the catalogue is assumed to be held in a scalar KeyMap entry with key " <colname >_ <row number >" ( " _1" for the first row). If no such entry exists for a particular row, then the value is marked as bad in the catalogue. The data type of the column is determined from the first row value found for the column.

  • If the KeyMap does not contain an entry called " COLNAMES" , it is assumed that each entry in the KeyMap contains a vector holding all the values for a single column, in row order. The entry key is used as the column name, and the column data type is determined from the entry data type.

LABS = INTEGER (Given)
A GRP group identifier containing the labels to be associated with the positions. The number of elements in this group should be equal to NPOS. If GRP__NOID is supplied, no label column will be created.
HIST = INTEGER (Given)
A GRP group identifier containing history text to store with the catalogue. If GRP__NOID is supplied, no history information will be stored with the catalogue.
STATUS = INTEGER (Given and Returned)
The global status.