You will frequently want to examine or process only a portion of your dataset, be it to focus on a given object in an image, or a single spectrum between nominated wavelengths, or a plane of a cube. You could use NDFCOPY or MANIC in some circumstances to make a new NDF containing the required data, but this would be inconvenient as you would need more disc space, and to invent and remember a new filename. You will be pleased to learn that there is a succinct and powerful alternative that obviates the need to create a new file--the NDF section. The application just processes a `rectangular' subset, or section, of the NDF that you nominate. Certainly, it requires you to learn a little syntax, but after you use it a few times it will seem cheap at the price for the advantages it offers.
An NDF section is defined by specifying the bounds of the portion of the NDF to be processed immediately following the name of the NDF. You can do this in any place where an NDF name alone would suffice, for example, on the command line or in response to a prompt or as a default in an interface file. The syntax is a series of subscripts within parentheses and may be given in several ways. Here is a simple example.
ICL> stats cluster(101:200,51:150)
This would derive statistics of a 100 100-pixel region starting at pixel indices (101, 51) in the NDF called cluster. Alternatively, ranges of axis co-ordinates may be given instead of pixel indices. Besides giving lower and upper bounds as above, you may specify a centre and extent. Sections are not limited to subsets--supersets are allowed. See the paragraphs below for more details of these features.
If you do want to make a new NDF from a portion of an existing one, you should use the command NDFCOPY. An NDF's shape may be changed in situ by SETBOUND.
Note if you supply an NDF section on a C-shell command line, you must escape the parentheses. For example, the following are both equivalent to the earlier example.
% stats cluster"(101:200,51:150)" % stats cluster\(101:200,51:150\)
KAPPA --- Kernel Application Package