Gets an AST FrameSet from the WCS component of an NDF KPG1_ASGET
Each axis of the supplied NDF is checked to see if it is significant (i.e. has a size greater than 1). The index of each significant axis is returned in SDIM, and the bounds of the axis are returned in SLBND and SUBND. If EXACT is .TRUE., an error is reported if the number of significant axes is not exactly NDIM. This mode is intended for case where (say) the user has supplied a single plane from a three-dimensional data cube to an application that requires a two-dimensional array.
If EXACT is .FALSE. an error is only reported if the number of significant dimensions is higher than NDIM. If there are fewer than NDIM significant dimensions then the insignificant dimensions are used (starting from the lowest) to ensure that the required number of dimensions are returned. This mode is intended for cases where (say) the user supplies a one-dimensional data stream to an application that requires a two-dimensional array.
The GRID Frame (i.e. the Base Frame) obtained from the NDFs WCS component is modified so that it has NDIM axes corresponding to the axes returned in SDIM (the value 1.0 is used for the other axes).
Likewise, the PIXEL Frame obtained from the NDFs WCS component is modified so that it has NDIM axes corresponding to the axes returned in SDIM (the lower pixel bound is used for the other axes). The original PIXEL Frame is retained, but with Domain changed to NDF_PIXEL.
If TRIM is .TRUE., then the Current Frame obtained from the NDFs WCS component is also modified so that it has NDIM axes. If the original Current Frame has more than NDIM axes, then the axes to use are obtained from the environment using parameter USEAXIS. A new Current Frame is then made by picking these axes from the original Current Frame, assigning the value AST__BAD to the axes which have not been chosen.
If the original Current Frame has fewer than NDIM axes, then simple axes are added into the new Current Frame to make up a total of NDIM. These axes are given the value 1.0.
Various environment parameters may be used to obtain options, etc. The names of these parameters are hard-wired into this subroutine in order to ensure conformity between applications.
If the Current Frame in the returned FrameSet has no Title, then the Title is set to the value of the NDF TITLE component (so long as the NDF TITLE is not blank or undefined).