subroutine BoxInput(key,dataset,boxes,maxboxes) subroutine BoxSet(boxes,naxis,nsize,flags) subroutine BoxInfo(boxes,naxis,blc,trc)All routines require an integer array, boxes, which is used to accumulate a description of the region of interest. Its size is given by argument maxboxes. The required size is a function of the complexity of the region of interest, etc. Typically 1024 elements should be adequate.
BoxInput reads the task parameters that the user gives to specify the region of interest. The way this is specified is moderately general and (consequently) complex. See the description in the users guide. Included is the ability to give the region specification in a variety of units. To convert between some units and absolute pixels, BoxInput needs information about the coordinate system being used (e.g. parameters crval, crpix and cdelt). BoxInput determines these from the Miriad data-set given by dataset. Normally this is the name of the image dataset which we are interested in. If dataset is blank, BoxInput still functions correctly, but cannot perform unit conversion.
BoxInput breaks up the specification into an intermediate form, and stores it in the boxes array. The keyword associated with the task parameter is key, which would normally be 'region'. If the key argument is blank, BoxInput does not attempt to get a region-of-interest specification, but instead just initialises the boxes array with the default region-of-interest.
The programmer passes to BoxSet information about the size of the image of interest. This is given in the integer array nsize, which consists if naxis elements (as with the corresponding arguments to xyopen). The flags argument is an input character string, giving information about the default region of interest. It can consist of:
BoxInfo returns integer arrays blc and trc, which give the bottom left corner and top right corner of the region which encloses the overall region of interest. Both these arrays are of size naxis integers.