NRAO Home > CASA > CASA Toolkit Reference Manual
##### image.twopointcorrelation - Function

1.1.1 Compute two point correlation function from the image

Description

This function computes two-point auto-correlation functions from an image.

By default, the auto-correlation function is computed for the Sky axes. If there is no sky in the image, then the first two axes are used. Otherwise you can specify which axes the auto-correlation function lags are computed over with the axes argument (must be of length 2).

Presently, only the Structure Function is implemented. This is defined as :

where lx,ly are integer lags in the x (0-axis) and y (1-axis) directions. The ensemble average is over all the values at the same lag pair. This process is extremely compute intensive and so you may have to be patient.

In an auto-correlation function image there are some symmetries. The first and third quadrants are symmetric, and the second and fourth are symmetric. So in principle, all the information is in the top or bottom half of the image. We just write it all out to look nice. The long lags don’t have a lot of contributing values of course.

Arguments

 Inputs outfile Output image file name. Default is unset. allowed: string Default: region Region selection. See ”help par.region” for details. Default is to use the full image. allowed: any Default: variant mask Mask to use. See help par.mask. Default is none. allowed: any Default: variant axes The pixel axes to compute structure function over. The default is sky or first two axes. allowed: intArray Default: -1 method The method of computation. String from ’structurefunction’. allowed: string Default: structurefunction overwrite Overwrite (unprompted) pre-existing output file? allowed: bool Default: false stretch Stretch the mask if necessary and possible? See help par.stretch. Default False allowed: bool Default: false
Returns
bool

Example

"""
#
print "\t----\t twopointcorrelation Ex 1 \t----"
ia.maketestimage();        # Output image is virtual
ia.twopointcorrelation()   # Output image is virtual
#
"""

__________________________________________________________________