next up previous 526
Next: Specifying Centre and Extent
Up: NDF Sections
Previous: NDF Sections


Specifying Lower and Upper Bounds

The subscript expression appended to an NDF name to specify a section may be given in several ways. One possible method (corresponding with the example above) is to give the lower and upper bounds in each dimension, as follows

NAME( a:b, c:d, ... )

where `a:b', `c:d', (etc.) specify the lower and upper bounds. The bounds specified need not necessarily lie within the actual bounds of the NDF, because bad pixels will be supplied in the usual way, if required, to pad out the NDF's array components whenever they are accessed. However, none of the lower bounds should exceed the corresponding upper bound.

Omitting any of the bounds from the subscript expression will cause the appropriate (lower or upper) bound of the NDF to be used instead. If you also omit the separating `:', then the lower and upper bounds of the section will both be set to the same value, so that a single pixel will be selected for that dimension. Omitting the bounds entirely for a dimension (but still retaining the comma) will cause the entire extent of that dimension to be used. Thus,

image(,64)

could be used to specify row 64 of a two-dimensional image, while

cube( 1, 257:, 100 )

would specify column 1, pixels 257 onwards, selected from plane number 100 of a three-dimensional `data cube', forming a one-dimensional section.


next up previous 526
Next: Specifying Centre and Extent
Up: NDF Sections
Previous: NDF Sections

KAPPA --- Kernel Application Package
Starlink User Note 95
Malcolm J. Currie & David S. Berry
2008 September 12
E-mail:ussc@star.rl.ac.uk

Copyright © 2008 Science and Technology Facilities Council