### AST_POLYCOEFFS

Retrieve the coefficient values used by a PolyMap

#### Description:

This function returns the coefficient values used by either the forward or inverse transformation of a PolyMap, in the same form that they are supplied to the PolyMap constructor.

Usually, you should call this method first with NEL set to zero to determine the number of coefficients used by the PolyMap. This allows you to allocate an array of the correct size to hold all coefficient data. You should then call this method a second time to get the coefficient data.

#### Invocation

CALL AST_POLYCOEFFS( THIS, FORWARD, NEL, COEFFS, NCOEFF, STATUS )

#### Arguments

##### THIS = INTEGER (Given)
Pointer to the original Mapping.
##### FORWARD = LOGICAL (Given)
If .TRUE., the coefficients of the forward PolyMap transformation are returned. Otherwise the inverse transformation coefficients are returned.
##### NEL = INTEGER (Given)
The length of the supplied COEFFS array. It should be at least " ncoeff$\ast$( nin $+$ 2 )" if FORWARD is .TRUE., and " ncoeff$\ast$( nout $+$ 2 )" otherwise, where " ncoeff" is the number of coefficients to be returned. If a value of zero is supplied, no coefficient values are returned, but the number of coefficients used by the transformation is still returned in NCOEFF.
##### COEFFS( NEL ) = DOUBLE PRECISION (Returned)
An array in which to return the coefficients used by the requested transformation of the PolyMap. Ignored if NEL is zero. The coefficient data is returned in the form in which it is supplied to the PolyMap constructor. That is, each group of " 2 $+$ nin" or " 2 $+$ nout" adjacent elements describe a single coefficient of the forward or inverse transformation. See the PolyMap constructor documentation for further details.

If the supplied array is too short to hold all the coefficients, trailing coefficients are excluded. If the supplied array is longer than needed to hold all the coefficients, trailing elements are filled with zeros.

##### NCOEFF = INTEGER (Returned)
The number of coefficients used by the requested transformation. A value of zero is returned if the transformation does not have any defining polynomials. A value is returned for this argument even if NEL is zero.
##### STATUS = INTEGER (Given and Returned)
The global status.