You should use a masking function which matches the numerical
type of the data you are processing by replacing X
in
the generic function name astMask
X
by an appropriate 1- or
2-character type code. For example, if you are masking data
with type "float", you should use the function astMaskF (see
the "Data Type Codes" section below for the codes appropriate to
other numerical types).
The number of inputs for this Mapping (as given by its Nin attribute) should match the number of axes in the supplied Region (as given by the Naxes attribute of the Region). The number of outputs for the Mapping (as given by its Nout attribute) should match the number of grid dimensions given by the value of "ndim" below.
For types of Region such as PointList which have zero volume, pixel centres will rarely fall exactly within the Region. For this reason, the inclusion criterion is changed for zero-volume Regions so that pixels are included (or excluded) if any part of the Region passes through the pixel. For a PointList, this means that pixels are included (or excluded) if they contain at least one of the points listed in the PointList.
Note that "lbnd" and "ubnd" together define the shape
and size of the input grid, its extent along a particular
(j'th) dimension being ubnd[j]-lbnd[j]1 (assuming the
index "j" to be zero-based). They also define
the input grid's coordinate system, each pixel having unit
extent along each dimension with integral coordinate values
at its centre.
The storage order of data within this array should be such that the index of the first grid dimension varies most rapidly and that of the final dimension least rapidly (i.e. Fortran array indexing is used).
On exit, the samples specified by "inside" are set to the value of "val". All other samples are left unchanged.
AST A Library for Handling World Coordinate Systems in Astronomy