next up previous 264
Next: Mapping - Inter-relate two coordinate systems
Up: AST Class Descriptions
Previous: KeyMap - Store a set of key/value pairs


LutMap - Transform 1-dimensional coordinates using a lookup table

Description:
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 either of the entries used for the interplation has a value of AST__BAD, then the interpolated value is returned as AST__BAD.

If the lookup table entries increase or decrease monotonically (ignoring any flat sections), then the inverse transformation may also be performed.

Constructor Function:
astLutMap
Inheritance
The LutMap class inherits from the Mapping class.
Attributes
In addition to those attributes common to all Mappings, every LutMap also has the following attributes:

  • LutInterp: The interpolation method to use between table entries.
Functions
The LutMap class does not define any new functions beyond those which are applicable to all Mappings.


next up previous 264
Next: Mapping - Inter-relate two coordinate systems
Up: AST Class Descriptions
Previous: KeyMap - Store a set of key/value pairs

AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 211
R.F. Warren-Smith & D.S. Berry
25th February 2013
E-mail:starlink@jiscmail.ac.uk

Copyright (C) 2014 Science \& Technology Facilities Council