|
|||
NRAO Home > CASA > CASA Toolkit Reference Manual |
|
regionmanager.complement - Function
1.1.2 Create the complement of a world region
Description
This function (short-hand name comp) creates the complement of a world
region(s).
The region parameter can be a single region record defining a simple or complex region or it can contain several region records in a Python dictionary. If multiple regions are given then the union of this set of regions is taken first, and the complement is found from the union.
NOTE: ia.statistics() is UNABLE to handle complement regions in CASA yet.
Arguments
Inputs |
| ||
region |
| The world region
| |
| allowed: | any |
|
| Default: | variant Region tool |
|
comment |
| A comment stored with the region
| |
| allowed: | string |
|
| Default: | String |
|
record
Example
- ia.open(’hcn’)
- csys = ia.coordsys()
- ia.shape()
[155 178]
-
- blc = "17:42:29.303 -28.59.18.600"
- trc = "17:42:28.303 -28.59.10.600"
- r2 = rg.wbox(blc,trc,[1,2],csys.torecord())
- r3 = rg.complement(r2);
-
- ia.statistics(region=r2) # Some output discarded
Selected bounding box [90, 90] to [103, 98]
No pts = 126
-
- ia.statistics(region=r3)
Selected bounding box [1, 1] to [155, 178] # Some output discarded
No pts = 27464
As expected, the number of pixels in the complement
is $(155*178)-126=27464$
__________________________________________________________________
More information about CASA may be found at the
CASA web page
Copyright © 2016 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