### A Classified KAPPA commands

A.2 DATA DISPLAY

Kappa applications may be classified in terms of their functions as follows.

#### A.1 DATA IMPORT & EXPORT

##### A.1.1 Image generation and input
 CREFRAME Generates a test two-dimensional NDF from a selection of several types. Reads a FITS  disc file composed of simple, group or table objects. Lists the headers of FITS files. Imports FITS information into an NDF extension. Reads a FITS tape composed of simple, group or table files. Evaluates mathematical expressions applied to NDF data structures. Converts free-format data into an NDF.
##### A.1.2 Preparation for output
 FITSEDIT Edits the FITS extension of an NDF. Exports NDF-extension information into an NDF FITS extension. Edits an NDF FITS extension via a text file or parameters. Creates an NDF FITS extension from a text file. Writes a new keyword to the FITS extension.

#### A.2 DATA DISPLAY

##### A.2.1 Detail enhancement
 CARPET Creates a cube representing a carpet plot of an image. Produces a colour composite image from 1, 2 or 3 individual NDFs. Performs an histogram equalisation on an NDF. Performs a Laplacian convolution as an edge detector in a two-dimensional NDF. Enhances edges in a two-dimensional NDF using a shadow effect. Edits an NDF such that array values below and above two thresholds take constant values.
##### A.2.2 Device selection
 GDNAMES Shows which graphics devices are available. Selects a current graphics device.
##### A.2.3 Display control
 CURSOR Reports the co-ordinates of points selected using the cursor. Clears a graphics device and purges its database entries. Shows the current status of a graphics device.
##### A.2.4 Graphics Database
 PICBASE Selects the BASE picture from the graphics database. Uses a cursor to select the current picture. Selects the last DATA picture from the graphics database. Defines a new graphics-database FRAME picture or an array of FRAME pictures. Finds the first empty FRAME picture in the graphics database. Finds the first unobscured and unobscuring FRAME picture in the graphics database. Selects the last FRAME picture from the graphics database. Creates an array of FRAME pictures. Finds the attributes of a picture interior to the current picture. Labels the current graphics-database picture. Selects the last picture from the graphics database. Lists the pictures in the graphics database for a device. Selects a graphics-database picture by its label. Transforms co-ordinates between the current and BASE pictures. Finds the first unobscured FRAME picture in the graphics database. Creates a new picture defined by co-ordinate bounds.
##### A.2.6 Output
 ARDPLOT Plots the boundaries of regions described in an ARD file  over an existing picture. Draws a spatial grid of line plots for an axis of a cube NDF. Contours a two-dimensional NDF. Displays a one- or two-dimensional NDF. Draws arrows parallel to the axes. Draws $±n$ standard-deviation lines on a line plot. Creates a radial or azimuthal profile of a two-dimensional image. Draws a line plot of the data values in a one-dimensional NDF. Displays the positions stored in a positions list. Outputs the values of specified NDF pixels to the screen or a text file. Draws a multi-line plot of the data values in a two-dimensional NDF. Draws the outline of a two-dimensional NDF. Displays a scatter plot between data in two NDFs. Plots a two-dimensional vector map.
##### A.2.7 Palette
 PALDEF Loads the default palette  to a colour table. Enters a colour into an graphics device’s palette. Fills the palette of a colour table from an NDF. Saves the current palette of a colour table to an NDF.

#### A.3 DATA MANIPULATION

##### A.3.1 Arithmetic
 ADD Adds two NDF data structures. Adds a scalar to an NDF data structure. Divides an NDF by a scalar. Multiplies an NDF by a scalar. Subtracts a scalar from an NDF data structure. Sums the values cumulatively in a one-dimensional NDF. Divides one NDF data structure by another. Takes the base-10 exponential of each pixel of an NDF. Takes the exponential of each pixel of an NDF (base $e$). Takes the exponential (specified base) of each pixel of am NDF. Takes the base-10 logarithm of each pixel of an NDF. Takes the logarithm of each pixel of an NDF (specified base). Takes the natural logarithm of each pixel of an NDF. Creates a signal-to-noise array from an NDF with Variance. Evaluates mathematical expressions applied to NDF data structures. Multiplies two NDF data structures. Takes the specified power of each pixel of a data array. Subtracts one NDF data structure from another. Performs a trigonometric transformation on an NDF.
##### A.3.2 Combination
 CALPOL Calculates polarisation parameters. Produces a colour composite image from 1, 2 or 3 individual NDFs. Converts between representations of complex data. Forms a higher-resolution NDF by interleaving a set of NDFs. Compares data sets using the Kolmogorov-Smirnov test. Normalises one NDF to a similar NDF by calculating a scale factor and zero difference. Tiles a group of NDFs using World Co-ordinate System information.
##### A.3.3 Compression and expansion
 CARPET Creates a cube representing a carpet plot of an image. Creates a channel map from a cube NDF by compressing slices along a nominated axis Reduces the number of axes in an NDF by collapsing it along a nominated axis. Reduces the size of an NDF by adding values in rectangular boxes. Reduces the size of an NDF by averaging values in rectangular boxes. Reduces the size of an NDF by picking equally spaced pixels. Forms a higher-resolution NDF by interleaving a set of NDFs. Compresses an NDF so that it occupies less disk space. Expands an NDF by pixel duplication. Plucks slices from an NDF at arbitrary positions. Uses an arbitrary mapping to regrid an NDF. Squashes or stretches an NDF. Aligns a group of NDFs using WCS  information.
##### A.3.4 Configuration change
 CHAIN Concatenates a series of vectorized NDFs. Reverses an NDF’s pixels along a specified dimension. Converts all or part of an NDF from one dimensionality to another. Copies an NDF (or NDF section) to a new location. Permutes the axes of an NDF. Places each pixel value in an input NDF into an output bin. Plucks slices from an NDF at arbitrary positions. Creates a one-dimensional profile through an n-dimensional NDF. Uses an arbitrary mapping to regrid an NDF. Reshapes an NDF, treating its arrays as vectors. Rotates a two-dimensional NDF about its centre through any angle. Sets new bounds for an NDF. Shifts pixels in an NDF by a given amount along each axis. Applies a translational correction to the WCS in an NDF.
##### A.3.5 Filtering
 BLOCK Smooths an NDF using an n-dimensional rectangular box filter. Convolves a pair of one- or two-dimensional NDFs together. Removes defects from a substantially flat one- or two-dimensional NDF. Performs forward and inverse Fourier transforms of one- or two-dimensional NDFs. Smooths a one- or two-dimensional image using a Gaussian filter. Performs a Richardson-Lucy deconvolution of a one- or two-dimensional array. Smooths a two-dimensional data array using a weighted median filter. Performs a Maximum-Entropy deconvolution of a two-dimensional NDF. Removes odd-even defects from a one-dimensional NDF. Applies a Wiener filter to a one- or two-dimensional array.
##### A.3.6 HDS components
 ERASE Erases an HDS object. Converts an HDS object to native machine data representation.
##### A.3.7 NDF array components
 NDFCOMPRESS Compresses an NDF so that it occupies less disk space. Copies an NDF (or NDF section) to a new location. Permutes the axes of an NDF. Assigns bad values  to pixels with given qualities. Removes named qualities  stored in an NDF QUALITY component. Sets new bad-pixel flag  values for an NDF. Sets a new value for the quality bad-bits mask  of an NDF. Sets new bounds for an NDF. Sets a new pixel origin  for an NDF. Assigns a specified quality to selected pixels within an NDF. Sets a new numeric type for the DATA and VARIANCE components of an NDF. Sets new values for the VARIANCE component  of an NDF data structure. Displays the named qualities stored in an NDF QUALITY component.
##### A.3.8 NDF axis components
 AXCONV Expands spaced axes in an NDF into the primitive form. Sets a new label value for an axis within an NDF data structure. Sets a new units value for an axis within an NDF data structure. Permutes the axes of an NDF. Sets values for an axis array component within an NDF data structure. Sets a new value for one or all of an NDF’s axis-normalisation flags.
##### A.3.9 NDF character components
 SETLABEL Sets a new label  for an NDF data structure. Sets a new title  for an NDF data structure. Sets a new units  value for an NDF data structure.
##### A.3.10 NDF extensions
 FITSEDIT Edits the FITS extension  of an NDF. Inquires whether or not a keyword exists in a FITS extension. Exports NDF-extension information into an NDF FITS extension. Lists the FITS extension of an NDF. Edits an NDF FITS extension via a text file or parameters. Creates an NDF FITS extension from a text file. Reports the value of a keyword in the FITS extension. Writes a new keyword to the FITS extension. Manipulates the contents of a specified NDF extension. Stores WCS  Information in an NDF.
##### A.3.11 NDF History
 HISCOM Adds commentary to the history of an NDF. Lists NDF history records. Sets the NDF history update mode.
##### A.3.12 NDF Provenance
 PROVADD Stores provenance information in an NDF. Modifies provenance information for an NDF. Removes selected provenance information from an NDF. Displays provenance information for an NDF.
##### A.3.13 NDF World Co-ordinate Systems
 PERMAXES Permutes the axes of an NDF. Creates a Mapping and optionally adds a new co-ordinate Frame  into the WCS component of an NDF. Aligns a group of NDFs using WCS information. Manages attribute values associated with the WCS component  of an NDF. Copies WCS information from one NDF to another. Changes the current co-ordinate Frame in the WCS component of an NDF. Tiles a group of NDFs using World Co-ordinate System information. Removes co-ordinate Frames from the WCS component of an NDF. Examines the internal structure of a WCS description. Applies a translational correction to the WCS in an NDF. Transforms a position from one NDF co-ordinate Frame to another.
##### A.3.14 Pixel editing and masking
 ARDGEN Creates a text file describing selected regions of an image. Uses an ARD file  to set some pixels of an NDF to be bad. Plots the boundaries of regions described in an ARD file over an existing picture. Replaces the values of selected pixels in an NDF. Copies the bad-pixel  mask from one NDF to another. Removes pixels with large errors from an NDF. Copies a two-dimensional NDF excluding any bad rows or columns. Removes defects from a substantially flat one- or two-dimensional NDF. Removes regions of bad values from an NDF. Replaces bad pixels in a two-dimensional image with the local median. Fits independent trends to data lines that are parallel to an axis. Creates a Multi-Order Coverage (MOC) map describing regions of an image. Replaces all occurrences of magic-value  pixels in an NDF array with a new value. Sets pixels outside a specified circle in a two-dimensional NDF to a specified value. Pastes a series of NDFs upon each other. Applies a mask to a region of an NDF. Adds a scalar to a section of an NDF data structure to correct rift-valley defects. Copies polygonal segments from one NDF to another. Replaces all occurrences of a given value in an NDF array with the bad value. Replaces all occurrences of a given value in an NDF array with another value. Edits an NDF such that array values below and above two thresholds take Replaces regions in a two-dimensional NDF by bad values or by linear interpolation.
##### A.3.15 Polarimetry
 CALPOL Calculates polarisation parameters.
##### A.3.16 Resampling and transformations
 ALIGN2D Aligns a pair of two-dimensional NDFs by minimising the residuals between them. Places each pixel value in an input NDF into an output bin. Plucks slices from an NDF at arbitrary positions. Uses an arbitrary mapping to regrid an NDF. Aligns a group of NDFs using WCS  information. Tiles a group of NDFs using World Co-ordinate System information.
##### A.3.17 Surface and vector fitting
 FITSURFACE Fits a polynomial surface to two-dimensional data array. Creates a two-dimensional NDF from the coefficients of a polynomial surface. Fits independent trends to data lines that are parallel to an axis. Fits a polynomial or spline surface to a two-dimensional data array using blocking.

#### A.4 DATA ANALYSIS

##### A.4.1 Statistics
 APERADD Derives statistics of pixels within a specified aperture of an NDF. Computes ordered statistics for an NDF’s pixels using an histogram. Computes an histogram of an NDF’s values. Does cumulative statistics over a sequence of NDFs. Counts the number of elements of an NDF with values or absolute values above or below a threshold. Computes simple statistics for an NDF’s pixels.
##### A.4.2 Other
 BEAMFIT Fits beam features in a two-dimensional NDF. Finds the centroids of star-like features in an NDF. Normalises one NDF to a similar NDF by calculating a scale factor and zero-point difference. Determines the parameters of a model star profile by fitting star images in a two-dimensional NDF. Fits a polynomial or spline surface to a two-dimensional data array.

#### A.5 SCRIPTING TOOLS

 CALC Evaluates a mathematical expression. Displays a named parameter from a group of configuration parameters. Expands a group expression into a list of explicit NDF names. Obtains the value or values of an application parameter.

#### A.6 INQUIRIES & STATUS

 GLOBALS Displays the values of the Kappa global parameters. Inquires whether or not a keyword exists in a FITS extension. Lists the FITS extension  of an NDF. Reports the value of a keyword in the FITS extension. Compares a pair of NDFs for equivalence. Displays the attributes of an NDF data structure. Resets the Kappa global parameters.

#### A.7 MISCELLANEOUS

 COMPLEX Converts between representations of complex data. Gives help about Kappa. Creates a catalogue holding a positions list. Checks the version number of the installed package.