next up previous 210
Next: Assignment of Keyword Values
Up: Values within the Pixel Mask
Previous: Values within the Pixel Mask

Background Pixels

The .NOT. operator adds a few complications in that it requests pixels to be included which are not within a given region. For instance:

      .NOT.CIRCLE( 0, 0, 10)

includes all pixels which are not within the circle of radius 10 centred on the origin. If (say) the value 2 was used to represent the CIRCLE region, what value should be used to represent the pixels which are not within the circle? The solution adopted by ARD is to consider all pixels not within a region to be ``background'' pixels, and to reserve the value 1 to represent such pixels. All .NOT. operators in an ARD description use the value 1 to represent included background pixels. Note, ARD doesn't know if a pixel is truly part of the background or not, it just assumes that all pixels selected by a .NOT. operator will be background. This gives rise to a possible anomaly which can be illustrated by the ARD description:

      .NOT. ( .NOT. CIRCLE( 0, 0, 10 ) )

One might expect this to be equivalent to the ARD description:

      CIRCLE( 0, 0, 10 )

but there will be a difference. The two ARD descriptions will store positive values at the same pixels (i.e. those within the circle), but the values stored will be different. In the first ARD description, the included pixels are generated by a .NOT. operator and so will be considered to be ``background'' pixels and will be represented by the value 1. In the second ARD description, the included pixels are generated directly by the CIRCLE keyword and will be represented by the value assigned to the keyword (which will be larger than 1).

The .EQV. operator can also cause background pixels to be included in the returned mask, and such background pixels are again represented by the value 1. The ARD description:

      CIRCLE( 0, 0, 10 ) .EQV. CIRCLE( 10, 0, 10)

selects pixels which are either within both circles or within neither circle. Pixels which are within neither circle form part of the background, and are represented by the value 1. Pixels which are within both circles are represented by the larger of the two values assigned to the two keywords.



next up previous 210
Next: Assignment of Keyword Values
Up: Values within the Pixel Mask
Previous: Values within the Pixel Mask

ARD A Textual Language for Describing Regions within a Data Array
Starlink User Note 183
D.S. Berry
2nd October 2007
E-mail:starlink@jiscmail.ac.uk

Copyright © 2013 Science and Technology Facilities Council