Subset Frames


Most GIPSY applications do something on parts of subsets. They allow the user to specify a frame inside (or in some case outside) the subset to work on. This is done with subroutine GDSBOX which returns two arrays containing the grid coordinates of the frame.

The arrays which receive the grid coordinates can easily be converted to coordinate words with the function GDSC_FILL. If a task produces output data, it should write BLANKs (undefined values) outside the frame returned by GDSBOX.

There is a set of routines which keep track automatically of whether a chunk of data just read lies inside or outside the frame specified with GDSBOX. The routine INITPTR is used in combination with GDSI_READ or GDSI_WRITE. GDSI_READ returns the number of pixels just read, which is input to INITPTR in order to initialize the logical functions INSIDEPTR and OUTSIDEPTR. Further arguments to INITPTR are the dimension of the subset, the grid coordinates of the edges of the subsets and the grid coordinates returned from GDSBOX.

The use of these routines is illustrated in an example.


Programming GIPSY