1.1.2 Create a world mask region
Description
NOT IMPLEMENTED IN CASA
This function creates a mask region. This region can be applied on-the-fly to images. The expression must be Boolean.
Arguments
| Inputs |
| ||
| expr |
| Boolean expression
| |
| allowed: | string |
|
| Default: | String |
|
Example
- ia.imagemaketestimage(’zz’)
- r = rg.wmask(expr=’zz>0’) - ia.statistics(region=r.torecord()) |
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
- ia.imagemaketestimage(’zz’)
- rg.setcoordinates(ia.coordsys().torecord() ) # - r1 = rg.wbox(...) # Make a world box - r2 = rg.wmask(expr=’zz>0’) # Make a mask region - r3 = rg.intersection (r1,r2) # Intersect them - ia.statistics(region=r3) # Find statistics |
In this example, the mask is only applied when the pixels fall in the specified box.
Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu
Copyright © 2008 Associated Universities Inc., Washington, D.C.
This code is available under the terms of the GNU General Public Lincense
Home |
Contact Us |
Directories |
Site Map |
Help |
Privacy Policy |
Search
Updated daily during alpha development.