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


next up previous contents index
Next: regionmanager.wrange - Function Up: regionmanager - Tool Previous: regionmanager.wpolygon - Function


regionmanager.wmask - Function



Package general
Module images
Tool regionmanager


Create a world mask region


Synopsis
wmask(expr)


Arguments

expr in Boolean expression
    Allowed: String


Returns
Region tool



Description

This function creates a mask region. This region can be applied on-the-fly to images. The expression must be Boolean.



Example
- im := imagemaketestimage('zz')
- r := drm.wmask(expr='zz>0')
- im.statistics(region=r)

The mask region effectively creates a (notional) Boolean lattice. In this example, when the pixel values are greater than zero, the lattice is True (good), else False. The statistics, when evaluated, are then only computed when the mask region is True.



Example
- im := imagemaketestimage('zz')
- drm.setcoordinates(im.coordsys())
#
- r1 := drm.wbox(...)                 # Make a world box
- r2 := drm.wmask(expr='zz>0')        # Make a mask region
- r3 := drm.intersection (r1,r2)      # Intersect them
- im.statistics(region=r3)            # Find statistics

In this example, the mask is only applied when the pixels fall in the specified box.





next up previous contents index
Next: regionmanager.wrange - Function Up: regionmanager - Tool Previous: regionmanager.wpolygon - Function   Contents   Index
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
2006-08-01