A great advantage in accessing data via the NDF library is that you can specify a section of the data rather than the full array. The section can specify a part of the array, or it might only partially overlap with the array, or they might not overlap at all. The section can also have a different dimensionality than the array itself. Here is an example specification of a seven-dimensional section, in each dimension a different feature of the section specification syntax is used:
% istat file(3:5,21.3:44.5,17,17.0,3:,,:99) # (3:5, 1st axis: pixels 3 through 5 # 21.3:44.5, 2nd axis: pixel centre values 21.3 through 44.5 # 17, 3rd axis: pixel 17 only # 17.0, 4th axis: only the pixel with centre = 17.0 # 3:, 5th axis: pixels 3 through end of NDF # , 6th axis: all pixels # :99) 7th axis: pixels from start of NDF through to pixel 99
The commas separate the dimensions (axes) from one another. Colons mean that there's a range rather than a single value. If the start or end of a range is left out, the start or end of the NDF is used. Integer numbers are pixel indices, floating point numbers are pixel centre values (e.g. wavelengths). Instead of using a colon to separate start and end, you can also use a tilde to separate the centre of the section from the size of the section.
You can use NDF sections whenever existing data are accessed. You cannot use NDF sections to specify output data. And you cannot use NDF sections when access is to the HDS file rather than the data inside it.
FIGARO A general data reduction system