<casaxml xsi:schemaLocation="http://casa.nrao.edu/schema/casa.xsd file:///opt/casa/code/tools/xml/casa.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://casa.nrao.edu/schema/psetTypes.html">
<tool module="synthesismaskhandler" name="synthesismaskhandler">
<shortdescription>tool for mask handling in sysnthesis imaging </shortdescription>
synthesismaskhandler is a tool to manupilate mask image used in imager
<include>synthesismaskhandler_forward.h</include>
<include>synthesismaskhandler_private.h</include>
<method name="synthesismaskhandler" type="constructor">
<shortdescription>Construct an synthesismaskhandler tool</shortdescription>
This is used to construct {\tt synthesismaskhandler} tool.
<returns type="synthesismaskhandler"/>
# create a synthesismaskhandler tool
maskhandler=casac.synthesismaskhandler()
nchan=5 # input mask is a cube of 5 channel
#define channel flag: 1 to skip the channel for pruning
chanflag = np.zeros(nchan) # prune every channel
maskhandler.pruneregions('testMask.image',2.0, chanflag)
# output python dictionary contains the number of origin regions
and the number of regions removed at each channel, and prunesize used.
For skipped channels, N_reg and N_reg_pruned elements will be -1.
{'N_reg': array([5, 0, 0, 1, 1], dtype=uint32),
'N_reg_pruned': array([4, 0, 0, 1, 1], dtype=uint32),
# the resultant pruned mask is create as testMask.image.pruned
maskhandler.done() # to close the synthesismaskhandler tool
<method name="pruneregions" type="function">
<shortdescription>prune mask regions</shortdescription>