next up previous contents index
Next: Scratch Files Up: Region of Interest Previous: Arbitrary Regions of

Reading and Writing Blanking Information

Though the box routines are the preferred way to read blanking information, it is possible to read the blanking information associated with an image directly. Also a routine is needed to write blanking information. Blanking information can be read and written by two sets of routines. These routines are:

      subroutine xyflgrd(tno,index,mask)
      subroutine xyflgwr(tno,index,mask)
      subroutine xymkrd(tno,index,runs,n,nread)
      subroutine xymkwr(tno,index,runs,n)
Here tno is the image handle returned by xyopen, index gives the row number (analogous to xyread and xywrite). Analogous to the working of xyread and xywrite, the plane of the masking file that the routines access is set with the xysetpl routine.

The xyflgrd and xyflgwr routines read and write the logical array mask. The mask array has a .true. value if the corresponding pixel is good, or .false. if it is bad (or blanked).

The xymkrd and xymkwr routines read and write a `` runs'' array. The runs array is a table of the form:

    imin,imax
where pixels imin to imax are good (not blanked). Note that the size of runs is n integers of n/2 pairs of ordinates. Runs is input to xywrite and output from xyread. For xyread, nread returns the number of elements of runs that have been filled in.

Because many images are completely good (i.e. no blanked pixels), it would be superfluous to always carry around blanking information. Hence the mask containing the blanking information need not exist. If it does not exist, the read routines described above will return indicating that all pixels are good. A programmer can check if the mask exists, using the logical function hdprsnt:

     logical exists
     logical hdprsnt
          .
          .
          .
     exists = hdprsnt(tno,'mask')


next up previous contents index
Next: Scratch Files Up: Region of Interest Previous: Arbitrary Regions of


Last generated by rsault@atnf.csiro.au on 14 Mar 1996