next up previous
Next: AST_MAPBOX - Find a bounding box for a Mapping
Up: AST Routine Descriptions
Previous: AST_ISA<CLASS> - Test membership of a class by an Object

AST_LUTMAP - Create a LutMap   

Description:
This function creates a new LutMap and optionally initialises its attributes. A LutMap is a specialised form of Mapping which transforms 1-dimensional coordinates by using linear interpolation in a lookup table. Each input coordinate value is first scaled to give the index of an entry in the table by subtracting a starting value (the input coordinate corresponding to the first table entry) and dividing by an increment (the difference in input coordinate value between adjacent table entries).

The resulting index will usually contain a fractional part, so the output coordinate value is then generated by interpolating linearly between the appropriate entries in the table. If the index lies outside the range of the table, linear extrapolation is used based on the two nearest entries (i.e. the two entries at the start or end of the table, as appropriate).

If the lookup table entries increase or decrease monotonically, then the inverse transformation may also be performed.

Invocation:
RESULT = AST_LUTMAP( NLUT, LUT, START, INC, OPTIONS, STATUS )

Arguments:
NLUT = INTEGER (Given)
The number of entries in the lookup table. This value must be at least 2.
LUT( NLUT ) = DOUBLE PRECISION (Given)
An array containing the lookup table entries.
START = DOUBLE PRECISION (Given)
The input coordinate value which corresponds with the first lookup table entry.
INC = DOUBLE PRECISION (Given)
The lookup table spacing (the increment in input coordinate value between successive lookup table entries). This value may be positive or negative, but must not be zero.
OPTIONS = CHARACTER * ( * ) (Given)
A character string containing an optional comma-separated list of attribute assignments to be used for initialising the new LutMap. The syntax used is identical to that for the AST_SET routine.
STATUS = INTEGER (Given and Returned)
The global status.

Returned Value:
AST_LUTMAP = INTEGER
A pointer to the new LutMap.

Notes:
  • If the entries in the lookup table either increase or decrease monotonically, then the new LutMap's TranInverse attribute will have a value of one, indicating that the inverse transformation can be performed. Otherwise, it will have a value of zero, so that any attempt to use the inverse transformation will result in an error.
  • A null Object pointer (AST__NULL) will be returned if this function is invoked with STATUS set to an error value, or if it should fail for any reason.



next up previous
Next: AST_MAPBOX - Find a bounding box for a Mapping
Up: AST Routine Descriptions
Previous: AST_ISA<CLASS> - Test membership of a class by an Object

AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 210
R.F. Warren-Smith & D.S. Berry
30th April 2003
E-mail:ussc@star.rl.ac.uk

Copyright (C) 2003 Central Laboratory of the Research Councils