Next Previous Up Contents
Next: addpixsample
Up: Processing Filters
Previous: Processing Filters

#### 6.1.1 `addcol`

Usage:

       addcol [-after <col-id> | -before <col-id>]
              [-units <units>] [-ucd <ucd>] [-utype <utype>] [-desc <descrip>]
              [-shape <n>[,<n>...][,*]] [-elsize <n>]
              <col-name> <expr>

Add a new column called `<col-name>` defined by the algebraic expression `<expr>`. By default the new column appears after the last column of the table, but you can position it either before or after a specified column using the `-before` or `-after` flags respectively.

The `-units`, `-ucd`, `-utype` and `-desc` flags can be used to define textual metadata values for the new column.

The `-shape` flag can also be used, but is intended only for array-valued columns, e.g. `-shape 3,3` to declare a 3x3 array. The final entry only in the shape list may be a "`*`" character to indicate unknown extent. Array values with no specified shape effectively have a shape of "`*`". The `-elsize` flag may be used to specify the length of fixed length strings; use with non-string columns is not recommended.

Syntax for the `<expr>` and `<col-id>` arguments is described in the manual.

Next Previous Up Contents
Next: addpixsample
Up: Processing Filters
Previous: Processing Filters

STILTS - Starlink Tables Infrastructure Library Tool Set
Starlink User Note256
STILTS web page: http://www.starlink.ac.uk/stilts/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@jiscmail.ac.uk