Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 803
News FAQ
Search Home


next up previous contents
Next: Regions Up: Image Calculator Previous: Tool substitution in expressions

Image Pixel Masks

See the Image tool and § 4.7 for basic information on pixel masks. See note223 for all the details of how image pixel masks are handled in LEL.

Here we just provide some basic knowledge. LEL, like other AIPS++ image handling software, applies the default mask if there is one. You can over-ride this in LEL expressions if you wish.

im := imagecalc('x1:nomask')     # Use no mask
im := imagecalc('x1:mask3')      # Use mask3 stored in image x1

You can also make what is called a transient conditional mask. Take the sub-expression sum(x1[x1<5]).

Let us say that image x1 has no pixel mask to start with. The square brackets indicate an expression mask. When the result of that condition is True (effectively creating a transient mask) then the rest of the expression is evaluated. Thus, whenever a pixel in x1 is less than 5, the value of that pixel is added to the sum.

Extending this slightly,

im := imagecalc('x2',  'x1[x1 < 5]');

In this case, the output image x2 must be created with a pixel mask. It will be T for all pixels in x1 whose value is less than 5. Otherwise it will be F. The mask given to x2 is a physical mask stored with the image, whereas the expression mask is transient.


next up previous contents
Next: Regions Up: Image Calculator Previous: Tool substitution in expressions   Contents
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2004-08-28