next up previous
Next: ARY_STATE - Determine the state of an array (defined or undefined)
Up: Routine Descriptions
Previous: ARY_SIZE - Determine the size of an array

ARY_SSECT  -  Create a similar array section to an existing one

Description:
The routine creates a new array section, using an existing section as a template. The new section bears the same relationship to its base array as the template section does to its own base array. Allowance is made for pixel-index shifts which may have been applied so that the pixel-indices of the new section match those of the template. The number of dimensions of the input and template arrays may differ.

Invocation:
CALL ARY_SSECT( IARY1, IARY2, IARY3, STATUS )

Arguments:
IARY1 = INTEGER (Given)
Identifier for the input array from which the section is to be derived. This may be a base array or an array section.
IARY2 = INTEGER (Given)
Identifier for the template section (this may also be a base array or an array section).
IARY3 = INTEGER (Returned)
Identifier for the new array section.
STATUS = INTEGER (Given and Returned)
The global status.

Notes:
  • This routine normally generates an array section. However, if both input arrays are base arrays with identical pixel-index bounds, then there is no need to create a section in order to access the required part of the first array. In this case a base array identifier will be returned instead.

  • The new section created by this routine will have the same number of dimensions as the array (or array section) from which it is derived. If the template (IARY2) array has fewer dimensions than this, then the bounds of any additional input dimensions are preserved unchanged in the new array. If the template (IARY2) array has more dimensions, then the excess ones are ignored.

  • This routine takes account of the regions of each base array to which the input array sections have access. It may therefore restrict the region accessible to the new section (and pad with "bad " pixels) so as not to grant access to regions of the base array which were not previously accessible through the input arrays.

  • If this routine is called with STATUS set, then a value of ARY__NOID will be returned for the IARY3 argument, although no further processing will occur. The same value will also be returned if the routine should fail for any reason. The ARY__NOID constant is defined in the include file ARY_PAR.



next up previous
Next: ARY_STATE - Determine the state of an array (defined or undefined)
Up: Routine Descriptions
Previous: ARY_SIZE - Determine the size of an array



ARY A Subroutine Library for Accessing ARRAY Data Structures
Starlink User Note 11
R.F. Warren-Smith
28th April 1998
E-mail:rfws@star.rl.ac.uk