next up previous 264
Next: AST_SKYFRAME - Create a SkyFrame
Up: AST Routine Descriptions
Previous: AST_SHOWMESH - Display a mesh of points covering the surface of a Region


AST_SIMPLIFY - Simplify a Mapping

Description:
This function simplifies a Mapping (which may be a compound Mapping such as a CmpMap) to eliminate redundant computational steps, or to merge separate steps which can be performed more efficiently in a single operation.

As a simple example, a Mapping which multiplied coordinates by 5, and then multiplied the result by 10, could be simplified to a single step which multiplied by 50. Similarly, a Mapping which multiplied by 5, and then divided by 5, could be reduced to a simple copying operation.

This function should typically be applied to Mappings which have undergone substantial processing or have been formed by merging other Mappings. It is of potential benefit, for example, in reducing execution time if applied before using a Mapping to transform a large number of coordinates.

Invocation:
RESULT = AST_SIMPLIFY( THIS, STATUS )
Arguments:
THIS = INTEGER (Given)
Pointer to the original Mapping.
STATUS = INTEGER (Given and Returned)
The global status.
Class Applicability:
Mapping
This function applies to all Mappings.
FrameSet
If the supplied Mapping is a FrameSet, the returned Mapping will be a copy of the supplied FrameSet in which all the inter-Frame Mappings have been simplified.
Returned Value:
AST_SIMPLIFY = INTEGER
A new pointer to the (possibly simplified) Mapping.
Notes:
  • This function can safely be applied even to Mappings which cannot be simplified. If no simplification is possible, it behaves exactly like AST_CLONE and returns a pointer to the original Mapping.

  • The Mapping returned by this function may not be independent of the original (even if simplification was possible), and modifying it may therefore result in indirect modification of the original. If a completely independent result is required, a copy should be made using AST_COPY.

  • 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 264
Next: AST_SKYFRAME - Create a SkyFrame
Up: AST Routine Descriptions
Previous: AST_SHOWMESH - Display a mesh of points covering the surface of a Region

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

Copyright (C) 2009 Science \& Technology Facilities Council