nraonrao
 
 NRAO Home > CASA > CasaDocument
image.decompose - Function

1.1.1 Separate a complex image into individual components
Description

This function is an image decomposition tool that performs several tasks, with the end result being that a strongly blended image is separated into components - both in the sense that it determines the parameters for each component (assuming a Gaussian model) and that it physically assigns each pixel in the image to an individual object. The products of these two operations are called the component list and the component map, respectively. The fitting process (which determines the component list) and the pixel-decomposition process (which determines the component map) are designed to work cooperatively to increase the efficiency and accuracy of both.

The algorithm behind the decomposition is based on the function clfind, described in Williams et al 1994, which uses a contouring procedure whereby a closed contour designates a separate component. The program first separates the image into clearly distint ’regions’ of blended emission, then contours each region to determine the areas constituting each component and passes this information on to the fitter, which determines the component list.

The contour deblending can optionally be replaced with a simpler local maximum scan, and the fitting can be replaced with a moment-based estimation method to speed up calculations on very large images or if either primary method causes trouble, but in general this will impede the accuracy of the fit.

The function works with both two and three dimensional images.

Arguments





Inputs

region

Region of interest. Default is unset.

allowed:

any

Default:

record

mask

Boolean LEL expression or mask region. Default is unset.

allowed:

any

Default:

variant

simple

Skip contour deblending and scan for local maxima

allowed:

bool

Default:

false

threshold

Value of minimum positive contour. Default is unset.

allowed:

double

Default:

-1

ncontour

Number of contours to use in deblending (¿= 2)

allowed:

int

Default:

11

minrange

Minimum number of closed contours in a component (¿ 0)

allowed:

int

Default:

1

naxis

Max number of perpendicular steps between contiguous pixels. Values of 1, 2 or 3 are allowed.

allowed:

int

Default:

2

fit

Fit to the components after deblending?

allowed:

bool

Default:

true

maxrms

Maximum RMS of fit residuals to not retry fit (¿ 0). Default is unset.

allowed:

double

Default:

-1

maxretry

Maximum number of times to retry the fit (¿= 0). Default is unset.

allowed:

int

Default:

-1

maxiter

Maximum number of iterations allowed in a single fit (¿ 0)

allowed:

int

Default:

256

convcriteria

Criterion to establish convergence (¿=0)

allowed:

double

Default:

0.0001

Returns
anyvariant

Example

"""  
#  
print "\t----\t decompose Ex 1 \t----"  
ia.maketestimage()  
print ia.decompose(threshold=2.5, maxrms=1.0)  
#Attempt 1: Converged after 22 iterations  
#Attempt 1: Converged after 16 iterations  
#1: Peak: 17.955  Mu: [0.000327928, 8.62573e-05]  
#               Axes: [0.00175981, 0.00142841]  Rotation: 1.29539  
#2: Peak: 19.8093  Mu: [1.67927e-06, -0.000374393]  
#                Axes: [0.00179054, 0.00132541]  Rotation: 1.78404  
#3: Peak: 10.1155  Mu: [6.28252, -7.09688e-05]  
#                Axes: [0.00180877, 0.00104523]  Rotation: 1.78847  
#[[  1.79549522e+01   3.27928370e-04   8.62573434e-05   1.75980886e-03  
#    8.11686337e-01   1.29538655e+00]  
# [  1.98093319e+01   1.67927124e-06  -3.74393392e-04   1.79054437e-03  
#    7.40229547e-01   1.78403902e+00]  
# [  1.01155214e+01   6.28252172e+00  -7.09688029e-05   1.80877140e-03  
#    5.77867746e-01   1.78847444e+00]]  
ia.close()  
#  
"""

Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu

Copyright © 2007 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.